sbin/sync/README.md
author ymh <ymh.work@gmail.com>
Mon, 30 Jul 2018 14:21:28 +0200
changeset 25 8690bf2fb09a
parent 1 3b0a8a6e685e
permissions -rw-r--r--
Small improvement on scrapSpitzer
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
# Deployement scripts for ICONOLAB-MCC 
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
Theses scripts uses `fabric` 2.X.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  * create a virtualenv
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
  * `$ pip install -r resquirements.txt`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
## Configuration
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
The scripts are configured in the `fabric.py` file
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
  * ` cp fabric.py.tmpl fabric.py`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
  * edit the file to match the expected configuration
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
## Tasks
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
the following task has been defined:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
  - create-virtualenv
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
  - publish-version
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
  - relaunch-server
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
### relaunch-server
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
Usage: `$ fab relaunch-server`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
Description: relaunch the webservices after calling the following commands on the server:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
  * `django-admin migrate`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
  * `django-admin collectstatic`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
### create-virtualenv
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
Usage: `$ fab create-virtualenv <hg_tags>`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
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.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
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 :
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
  * the settings file,
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
  * the applications orchestration scripts,
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
  * the application folders
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
### publish-version
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
Usage: `$ fab publish-version <hg_tags>`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
Description: publish the given version of the website. It calls the following commands:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
  * `create-virtualenv <hg_tags>`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
  * `relaunch-server`