| 1 | == Basic usage == |
|---|
| 2 | |
|---|
| 3 | The Cleverbox implements a "client has many projects" model. You must therefore create at least one client prior to creating a new project. |
|---|
| 4 | |
|---|
| 5 | Full documentation of available commands can be obtained with the command : |
|---|
| 6 | {{{ |
|---|
| 7 | cleverbox-admin /etc/cleverbox help |
|---|
| 8 | }}} |
|---|
| 9 | |
|---|
| 10 | === Console launch === |
|---|
| 11 | |
|---|
| 12 | {{{ |
|---|
| 13 | cleverbox-admin /etc/cleverbox |
|---|
| 14 | }}} |
|---|
| 15 | |
|---|
| 16 | === Client creation === |
|---|
| 17 | |
|---|
| 18 | If client already exists, you can skip this step. |
|---|
| 19 | |
|---|
| 20 | {{{ |
|---|
| 21 | client add <client_name> |
|---|
| 22 | }}} |
|---|
| 23 | |
|---|
| 24 | When asked about enabling the client, answer "y" |
|---|
| 25 | |
|---|
| 26 | === Project creation === |
|---|
| 27 | |
|---|
| 28 | {{{ |
|---|
| 29 | project add <client_name> <project_name> |
|---|
| 30 | }}} |
|---|
| 31 | |
|---|
| 32 | * When asked about the project admin, enter your login |
|---|
| 33 | * When asked about enabling the project, answer "y" |
|---|
| 34 | |
|---|
| 35 | Don't forget to reload Apache. |
|---|
| 36 | |
|---|
| 37 | == Advanced usage == |
|---|
| 38 | |
|---|
| 39 | === Creating your own configuration profile === |
|---|
| 40 | |
|---|
| 41 | The Cleverbox comes with a default set of configuration files. It is located in ``/etc/cleverbox/profiles/default/`. |
|---|
| 42 | |
|---|
| 43 | When creating a new project, the Cleverbox will ask the user what configuration profile should be used. |
|---|
| 44 | It will then look for configuration files in `/etc/cleverbox/profiles/<profile>/` |
|---|
| 45 | |
|---|
| 46 | The `default` profile works out of the box, but you may want to create your own. |
|---|
| 47 | Just copy `/etc/cleverbox/profiles/default/` to `/etc/cleverbox/profiles/<profile>/` and start modifying the files until they fit to your needs. |
|---|
| 48 | |
|---|
| 49 | A configuration profiles is composed of the following files : |
|---|
| 50 | |
|---|
| 51 | * `project.apache.conf` : Apache configuration for a project |
|---|
| 52 | * `trac-defaults.ini` : Overriding of default Trac preferences |
|---|
| 53 | * `permissions.ini` : Default Trac permissions |
|---|
| 54 | |
|---|
| 55 | Let's see how these files can be customised : |
|---|
| 56 | |
|---|
| 57 | ==== `project.apache.conf` ==== |
|---|
| 58 | |
|---|
| 59 | This file is used as a basis for creating project's Apache configuration. Resulting file will be stored in `/etc/cleverbox/projects-available/<client>-<project>`. |
|---|
| 60 | |
|---|
| 61 | At project creation, the file is parsed and variables are substituted with concrete values : |
|---|
| 62 | |
|---|
| 63 | * `client_name` : client's short name |
|---|
| 64 | * `project_name` : project's short name |
|---|
| 65 | * `clients_root` : directory holding Subversion and Trac data for each project |
|---|
| 66 | * `authbackend_pass` : password for hypothetical authentication backend (ldap, etc) |
|---|
| 67 | * `trac_install_dir` : directory where Trac is installed on the server |
|---|
| 68 | * `domain_name` : host's domain name |
|---|
| 69 | |
|---|
| 70 | For instance, here's how the file provided by the `default` profile looks like : |
|---|
| 71 | |
|---|
| 72 | [[Include(source:cleverbox/trunk/assets/project.apache.conf, text/plain)]] |
|---|
| 73 | |
|---|
| 74 | ==== `trac-defaults.ini` ==== |
|---|
| 75 | |
|---|
| 76 | This file holds values that will override generated project's standard `trac.ini` values. |
|---|
| 77 | |
|---|
| 78 | At project creation, the file is parsed and variables are substituted with concrete values : |
|---|
| 79 | |
|---|
| 80 | * `client_name` : client's short name |
|---|
| 81 | * `project_name` : project's short name |
|---|
| 82 | * `clients_root` : directory holding Subversion and Trac data for each project |
|---|
| 83 | * `authbackend_pass` : password for hypothetical authentication backend (ldap, etc) |
|---|
| 84 | * `trac_install_dir` : directory where Trac is installed on the server |
|---|
| 85 | * `domain_name` : host's domain name |
|---|
| 86 | |
|---|
| 87 | For instance, here's how the file provided by the `default` profile looks like : |
|---|
| 88 | |
|---|
| 89 | [[Include(source:cleverbox/trunk/assets/trac-defaults.ini, text/ini)]] |
|---|
| 90 | |
|---|
| 91 | It rises the allowed attachment size to 10M and enables ``webadmin` and ``themeengine` plugins by default. |
|---|
| 92 | |
|---|
| 93 | ==== `permissions.ini` ==== |
|---|
| 94 | |
|---|
| 95 | At project creation, the Cleverbox removes the `anonymous` permission profile and creates new profiles based on the contents of the |
|---|
| 96 | `permissions.ini`. |
|---|
| 97 | |
|---|
| 98 | For instance, here's how the file provided by the `default` profile looks like : |
|---|
| 99 | |
|---|
| 100 | [[Include(source:cleverbox/trunk/assets/permissions.ini, text/ini)]] |
|---|
| 101 | |
|---|
| 102 | == Design documentation == |
|---|
| 103 | |
|---|
| 104 | === The environment directory === |
|---|
| 105 | |
|---|
| 106 | '''Default directory is `/etc/cleverbox`'''. |
|---|
| 107 | |
|---|
| 108 | This directory holds configuration information about one Cleverbox environment. It looks like this : |
|---|
| 109 | |
|---|
| 110 | * `clients-available` : holds apache configuration available for every client. |
|---|
| 111 | * `clients-enabled` : contains symlinks to files located in the ''clients-available'' dir. Each file located in this directory is loaded at apache startup. |
|---|
| 112 | * `projects-available` : holds apache configuration available for every project. |
|---|
| 113 | * `projects-enabled` : contains symlinks to files located in the ''projects-available'' dir. Each file located in this directory is included by the client's apache configuration file (located in ''clients-available''). |
|---|
| 114 | * `VERSION` : this files contains the version number of the Cleverbox used to initiliaze the environment |
|---|
| 115 | * `cleverbox.ini` : this file holds configuration for the Cleverbox environment |
|---|
| 116 | |
|---|
| 117 | === The data directory === |
|---|
| 118 | |
|---|
| 119 | '''Default directory is `/var/cleverbox`'''. |
|---|
| 120 | |
|---|
| 121 | Each client has a dedicated project environment. It looks like this : |
|---|
| 122 | |
|---|
| 123 | {{{ |
|---|
| 124 | |- htdocs |
|---|
| 125 | |- <project> |
|---|
| 126 | |- logs |
|---|
| 127 | |- tmp |
|---|
| 128 | |- uploads |
|---|
| 129 | |- var |
|---|
| 130 | |- svn |
|---|
| 131 | |- <project> |
|---|
| 132 | |- trac |
|---|
| 133 | |- <project> |
|---|
| 134 | }}} |
|---|
| 135 | |
|---|
| 136 | === The assets directory === |
|---|
| 137 | |
|---|
| 138 | '''Default directory is `/usr/share/cleverbox/assets`'''. |
|---|
| 139 | |
|---|
| 140 | It holds the files used to generate the `default` configuration profile when instanciating a new Cleverbox environment. |
|---|
| 141 | |
|---|
| 142 | Usage and customisation of these files is explained in the "Advanced usage" section above. |
|---|