WebDAV, Caching, and Content Management and Delivery server frontend for cloud storage.

Caimito 0.11

Last updated: July 10, 2013

Caimito is an open source (Apache Software License 2.0) WebDAV,caching, and content management and delivery server frontend for cloud storage. Caimito supports Openstack Swift Storage (Rackspace, Softlayer, etc.), and Amazon S3. Caimito also features a REST API in addition to the Web interface for configuring user access. Caimito is designed with an event-driven and non-blocking architecture for Scalability. Caimito is ideal for Hosting and Reseller environments.

Requirements
Requires any Linux distro.

Download
Linux 32Bit
http://caimito-download.ngasi.com/caimito/caimito_32b.zip

Linux 64Bit
http://caimito-download.ngasi.com/caimito/caimito_64b.zip

Without Java JDK
http://caimito-download.ngasi.com/caimito/caimito_nojdk.zip

Source
http://caimito-download.ngasi.com/caimito/source.zip


Install
cd to /usr directory
unzip caimito contents to directory then copy 2 configuration files.
cd /usr unzip -q -o -a caimito.zip cp /usr/caimito/conf/Catalina/localhost/ROOT.xml.sample /usr/caimito/conf/Catalina/localhost/ROOT.xml cp /usr/caimito/webapps/WEB-INF/caimito/config.properties.sample /usr/caimito/webapps/WEB-INF/caimito/config.properties
Configure Database Caimito is installed with a default Derby Database. To change the database, edit the following file:
/usr/caimito/conf/Catalina/localhost/ROOT.xml
Resource Storage The resource storage type and access info is set in the following file:
/usr/caimito/webapps/WEB-INF/caimito/config.properties
The default storage type is "file". To change to a Cloud storage, edit the value for "resource". The value for Openstack Swift would be "openstack" (Amazon S3 support coming soon). The values for "cloud.username", "cloud.api.key_password", "cloud.url", and "cloud.store" should be populated with the appropriate information. "cloud.store" is populated with the name of an already created "container" or "bucket". Ldap For Ldap authentication edit ./WEB-INF/jamun/server.json Do a search for ldap and edit accordingly: "defaultusertype":"ldap": Sets users authentication to a LDAP Server as apposed to the default Database Server login ("defaultusertype":"db"). NOTE in LDAP login settings, the caimitoadmin Superuser is authenticated against the Database server. Run
NOTE: To use another JDK, edit the JDK path in the following file: /usr/caimito/bin/setenv.sh
cd /usr/caimito/bin ./startup.sh To run as a Deamon: ./demon.sh To Stop: ./shutdown.sh Access: Point any HTTP enabled client to: http://hostname:8619/ NOTE: Make sure access to port 8619 is enabled through any firewall. By default access is restricted so you would be prompted to login. Login with the following information:
User: caimitoadmin Password: caimito
The above is the default Super Admin user. Follow the instructions below to change the password. Configuring Users There are 4 default levels of Users. They are listed below in hierarchical order:
  • Super Admin
  • is the single user (caimitoadmin) that has overriding control over all other users. The Super Admin has the privilege to create one or more Directory Admin and assign access to the Directory Admin to a sub directory.
  • Directory Admin
  • A Directory Admin has the privilege to create one or more Client and assign access to the client to a directory owned by the Directory Admin.
  • Client
  • A Client has the privilege to create one or more End User and assign access to the End User to a directory owned by the Client.
  • End User
  • Although the End User may have directory access, the End User has no administrative privilege.
    Configuring User access is a 2 step process. First the User is created, then the specific directory access is granted. Web Interface To manage users via the web interface, point the browser to:
    http://hostname:8619/ca/admin.html
    Login with the Super Admin credentials. (The Web Interface is based on Jamun framework.) Create User
    Click the "User Manager" Button. Then click "New". Enter user1 in the User Field and enter tiger in the Password Field. Click "New" to save.
    Here a Directory Admin, user1, was created with the password tiger. Set Directory Privilege
    Click the "Path Privileges" Button. Then click "New". Select user1 in the Resource User Selection, enter dirpath1 in the Path Field, select READ/WRITE in the Privilege Selection, and enter 20 in the "Max Space" Field. Click "New" to save.
    Here user1, was assigned access to dirpath1 with a max space of 20GB. The directory path is an absolute path relative to the root directory path of the User (the root path for the Super Admin is /). So the newly protected path would look like:
    http://hostname:8619/dirpath1
    In the above example, the privilege was set with READ/WRITE access. Public Paths Authentication may not be required for all directory paths. In these situations, you set public path access - which means world read access to the directory. FIRST LOGOUT as caimitoadmin by navigating to top right of screen and hover over the "caimitoadmin" user link. Select and click "Logout". Now login as user user1 with password tiger.
    Click the "Public Paths" Button. Then click "New". In the Path field, enter dirpath1/public and Select False in the Listing Selection.
    In the above example, the path, dirpath1/public, was set to world readable access. So the public path would look like:
    http://hostname:8619/dirpath1/public
    Also in this example, the optional "listing" attribute was set to false. If "listing" is set the true, users would be able to see a list of the contents contained in the directory. Change Password
    Navigate to top right of screen and hover over the "user1" user link. Select and click "Password". Enter lion as the new password twice. Click "Update".
    The above example changes the password for user1 to lion. Delete User
    FIRST LOGOUT as user1 by navigating to top right of screen and hover over the "user1" user link. Select and click "Logout". Now login as Super Admin caimitoadmin. Select "user1". Click "Delete". Then click "Submit".
    The above example removes user1 as well as the associated "Path Privilege". REST Interface Below is the steps to configure users with the REST API. (The REST API is based on Jamun framework.) Create User
    http://hostname:8619/ca/jamunrest/jamunusermgr/create?jamunuser.new=user1&jamunpassword.new=tiger&jamunuser=caimitoadmin&jamunpassword=caimito
    Here a Directory Admin, user1, was created with the password tiger. Set Directory Privilege
    http://hostname:8619/ca/jamunrest/pathprivileges/create?jamunuser=caimitoadmin&jamunpassword=caimito&resourceuser=user1&path=dirpath1&privilege=2&maxspace=20
    Here user1, was assigned access to dirpath1 with a max space of 20GB. The directory path is an absolute path relative to the root directory path of the User (the root path for the Super Admin is /). So the newly protected path would look like:
    http://hostname:8619/dirpath1
    In the above example, the privilege was set with a value of 2. A privilege of 2 signifies READ/WRITE access. A privilege of 1 signifies READ only access.
    Privileges:
  • 1
  • READ only
  • 2
  • READ/WRITE
    Public Paths Authentication may not be required for all directory paths. In these situations, you set public path access - which means world read access to the directory.
    http://hostname:8619/ca/jamunrest/publicpaths/create?jamunuser=user1&jamunpassword=tiger&path=dirpath1/public&listing=false
    In the above example, the path, dirpath1/public, was set to world readable access. So the public path would look like:
    http://hostname:8619/dirpath1/public
    Also in this example, the optional "listing" attribute was set to false. If "listing" is set the true, users would be able to see a list of the contents contained in the directory. Change Password
    http://hostname:8619/ca/jamunrest/jamunusermgr/update?jamunpassword.new=lion&jamunuser=user1&jamunpassword=tiger
    The above example changes the password for user1 to lion. Delete User
    http://hostname:8619/ca/jamunrest/jamunusermgr/delete?jamunuser.eq=user1&jamunuser=caimitoadmin&jamunpassword=caimito
    The above example removes user1. Delete Directory Privilege
    http://hostname:8619/ca/jamunrest/pathprivileges/delete?jamunuser=caimitoadmin&jamunpassword=caimito&resourceuser.eq=user1&path.eq=dirpath1
    Here user1's privilege to dirpath1 was removed. Delete Public Paths
    http://hostname:8619/ca/jamunrest/publicpaths/delete?jamunuser=user1&jamunpassword=tiger&path.eq=dirpath1/public
    In the above example, world readable access to dirpath1/public, was removed. Cloud Setups Caimito may be configured for various Cloud Setups The following are the options for Caimito Cloud Setup (cloud.setup value in /usr/caimito/webapps/WEB-INF/caimito/config.properties configuration file):
    single_cloud_account_with_single_storage Simple setup with one pre-defined storage (AKA Container or Bucket). Access is determined by Caimito Access Control. This is ideal for end users or Content Delivery. This is the default setup. cloud_accounts_for_administration_only This is a direct proxy or pass-through setup. Access is determined by authenticated Cloud accounts to the configured Storage server. This is ideal for using Caimito as an alternative to the Cloud dashboard for administration. The defaultdigest value must be set to PLAIN in the /usr/caimito/webapps/WEB-INF/jamun/server.properties file. And each Cloud User account info (Cloud user name and API key) must be added via the User Manager.
    WebDAV Clients Now if there is ever a problem with WebDAV in general, it is the fact that NOT all WebDAV clients are created equal. Below are the compatiblity results of WebDAV clients tested with Caimito. FULL Compatibility WEB Browsers (READ ONLY) Bitkinex Gigolo Gnome Commander LIMITED Compatibility Windows XP File Manager Nautilus NOTE: It is recommended that you turn off "auto backup" if editing a document directly via WebDAV. This is the avoid littering the backend with temporary files. NOTE: If copy 0 Length files and the client reports "Length Required" error, this means the Server is being proxied by nginx. In this case copying 0 Length files to the server is not possible. You may also hack nginx to allow 0 Length content by following the link below: http://blog.schmichael.com/2010/12/28/noobs-guide-to-hacking-nginx/ Mounting Caimito as a File System Windows Right Click "Computer" Click "Add a network location" Enter the appropriate Caimito URL and login credentials. Linux Download and install one of the packages at the following link: http://pkgs.repoforge.org/davfs2/
    NOTE: A dependency for davfs2 may include libneon. Install the neon package like so: yum -y install neon
    Add Caimito access info like so echo "http://hostname:8619 caimitoadmin caimito" >> /etc/davfs2/secrets Create a directory to map the mounted file system mkdir /clouddrive Mount Caimito like so: mount -t davfs http://hostname:8619 /clouddrive Virtuozzo and OpenVZ Install fuse on the Host system like so: yum -y install fuse Then set the following for the VPS like so: vzctl set 227 --devnodes fuse:rw --save Load Balancing Configuring Caimito for Load Balancing either for HA (High Availability) or CDN (Content Delivery Network) is straight-forward. All the Caimito install nodes in the cluster must have the same configuration (/usr/caimito/webapps/WEB-INF/caimito/config.properties). And they must all point to the same database (/usr/caimito/conf/Catalina/localhost/ROOT.xml).

    Community

    Contact: gabrielw(AT)ngasi.com

    Copyright (c) 2011-2013, the Caimito project Authors.