You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Create a database (we recommend UTF8 encoding) and a read/write access to it. (skip this step if you plan to use a sqlite database)
102
102
@@ -107,7 +107,7 @@ CC-BY (<http://creativecommons.org/licenses/by/3.0/>) for translation files
107
107
6. Setup the project and get dependencies
108
108
109
109
-`python bootstrap.py`
110
-
-`./bin/buildout`
110
+
-`./bin/buildout`
111
111
112
112
7. Configure Comt to your settings
113
113
@@ -130,6 +130,60 @@ CC-BY (<http://creativecommons.org/licenses/by/3.0/>) for translation files
130
130
11. Access your Comt instance by pointing your browser to http://127.0.0.1:8000/
131
131
132
132
133
+
## Installation (Vagrant development box)
134
+
135
+
The second option is to use the vagrant virtual machine defined in the `dev` folder.
136
+
For this you need first to install Vagrant for your platform (c.f. http://www.vagrantup.com/), open a terminal in the `dev` folder and launch the command
137
+
138
+
`$ vagrant up`
139
+
140
+
This will create a virtual box, using the private address 172.16.1.2. An instance of comt can be reached at the following url http://172.16.1.2.
141
+
142
+
The provisioning tool used is Puppet and the manifest (cf `dev/manifests/site.pp`) uses some external modules (c.f. `dev/modules/` except `dev/modules/sysconfig`). These modules are referenced as git submodule. Therefore you mus ensure that all the submodules have been cloned also. There is two ways to make this:
143
+
144
+
- pass the `--recursive` option to `git clone` when cloning the Co-ment repository :
- The root of the project is mapped on `/srv/comt` on the dev box.
152
+
- The web server is nginx (http://nginx.org/).
153
+
- The web pages are served as a wsgi application with gunicorn (http://gunicorn.org/).
154
+
- The gunicorn processes are monitored by supervisor (http://supervisord.org/).
155
+
- Openoffice is installed but is not launched as an headless instance (althought it could be easily setup with supervisor).
156
+
- The dev box uses a virtual network with the ip 172.16.1.2 (this can be changed in the Vagrant config).
157
+
- The box is provisioned using puppet (http://puppetlabs.com/).
158
+
- Most of the configuration is done in the sysconfig module found in `dev/modules/sysconfig`.
159
+
- All the other subdirectories of `dev/modules` are puppet modules used during the box provisioning. All the folders are sub-repositories and are checked-out using git.
160
+
161
+
Moreover, the following parameters are set :
162
+
163
+
| var name | default |
164
+
|----------------|-------------|
165
+
| db_name | coment |
166
+
| db_user | coment_user |
167
+
| db_pw | coment |
168
+
| db_host | 127.0.0.1 |
169
+
| db_port | 5432 |
170
+
| superuser_name | admin |
171
+
| superuser_pw | dev@co-ment |
172
+
173
+
These values can be overriden by creating a `custom.yaml` file in the `dev` folder. The file `custom.yaml.tmpl` gives a template for the format of this file.
174
+
if the db_host is empty or 'localhost', or '127.0.0.1', the database is considered local to the box and a postgresql server is installed in the virtual server.
175
+
Otherwise, the server is considered remote and only the postgresql client libraries are installed on the dev box.
176
+
Also in this case, the database (db_name) and user (db_user) are not created automatically.
177
+
You must ensure that they are already created on the postgresql server with the adequate authorizations, and that the user can connect on the 'remote' server from the dev box.
178
+
179
+
The creation of the virtual machine will create some files in your source tree (`buildout-dev.cfg, test-suite/start-test-suite-dev.js,...`). These files are necessary to the correct operation of the dev virtual machine and should not be touched. They are generated by Puppet during the provisioning of the Vagrant box. If they need to be adapted you will find them in the `sysconfig` puppet module.
180
+
Please note that they should not be added to the versioning tool (git) and are currently already ignored.
181
+
182
+
After you are done with the virtual machine (or if you need to start afresh) they can be cleaned by launching the `clean-testserver.sh` script. Please note that except the files directly managed by Vagrant,the script clean **all** trace of the virtual machine in the source tree, including the buildout `bin` and `egg` folders.
183
+
184
+
Please refer to the available online documentation for more details on the various tools used here.
185
+
186
+
133
187
134
188
## Installation (production environment)
135
189
@@ -150,7 +204,7 @@ Upgrading you database should only need one command:
150
204
151
205
-`./bin/buildout`
152
206
-`./bin/django migrate --settings=settings`
153
-
207
+
154
208
### Upgrade from alpha releases
155
209
156
210
If your database was created using comt alpha prior to the revision 29, here are the commands you should run:
@@ -183,7 +237,7 @@ To use openoffice, on a development setup, you should make sure no openoffice pr
0 commit comments