18
|
1 |
# Deployement scripts for ICONOLAB-MCC |
|
2 |
|
|
3 |
Theses scripts uses `fabric` 2.X. |
|
4 |
|
|
5 |
* create a virtualenv |
|
6 |
* `$ pip install -r resquirements.txt` |
|
7 |
|
|
8 |
## Configuration |
|
9 |
|
|
10 |
The scripts are configured in the `fabric.py` file |
|
11 |
* ` cp fabric.py.tmpl fabric.py` |
|
12 |
* edit the file to match the expected configuration |
|
13 |
|
|
14 |
## Tasks |
|
15 |
the following task has been defined: |
|
16 |
|
|
17 |
- create-virtualenv |
|
18 |
- publish-version |
|
19 |
- relaunch-server |
|
20 |
|
|
21 |
### relaunch-server |
|
22 |
|
|
23 |
Usage: `$ fab relaunch-server` |
|
24 |
Description: relaunch the webservices after calling the following commands on the server: |
|
25 |
* `django-admin migrate` |
|
26 |
* `django-admin collectstatic` |
|
27 |
|
|
28 |
### create-virtualenv |
|
29 |
|
|
30 |
Usage: `$ fab create-virtualenv <hg_tags>` |
|
31 |
Description: Create a virtualenv on the server with the new application version and the matching requirements. This deletes the previous virtualenv first. |
|
32 |
Please note that this command only creates the virtualenv. It does not create the full setup for the application : |
|
33 |
* the settings file, |
|
34 |
* the applications orchestration scripts, |
|
35 |
* the application folders |
|
36 |
|
|
37 |
### publish-version |
|
38 |
|
|
39 |
Usage: `$ fab publish-version <hg_tags>` |
|
40 |
Description: publish the given version of the website. It calls the following commands: |
|
41 |
* `create-virtualenv <hg_tags>` |
|
42 |
* `relaunch-server` |