sbin/sync/README.md
author ymh <ymh.work@gmail.com>
Sun, 24 Jun 2018 03:39:26 +0200
changeset 18 a8b07497ae4b
child 37 7e614ca2431a
permissions -rw-r--r--
Upadetes the readme..
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
# Deployement scripts for ICONOLAB-MCC 
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
Theses scripts uses `fabric` 2.X.
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  * create a virtualenv
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
  * `$ pip install -r resquirements.txt`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
## Configuration
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
The scripts are configured in the `fabric.py` file
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
  * ` cp fabric.py.tmpl fabric.py`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
  * edit the file to match the expected configuration
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
## Tasks
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
the following task has been defined:
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
  - create-virtualenv
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
  - publish-version
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
  - relaunch-server
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
### relaunch-server
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
Usage: `$ fab relaunch-server`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
Description: relaunch the webservices after calling the following commands on the server:
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
  * `django-admin migrate`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
  * `django-admin collectstatic`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
### create-virtualenv
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
Usage: `$ fab create-virtualenv <hg_tags>`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
Description: Create a virtualenv on the server with the new application version and the matching requirements. This deletes the previous virtualenv first.
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
Please note that this command only creates the virtualenv. It does not create the full setup for the application :
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
  * the settings file,
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
  * the applications orchestration scripts,
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
  * the application folders
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
### publish-version
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
Usage: `$ fab publish-version <hg_tags>`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
Description: publish the given version of the website. It calls the following commands:
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
  * `create-virtualenv <hg_tags>`
a8b07497ae4b Upadetes the readme..
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
  * `relaunch-server`