|
180
|
1 |
# build and deployment |
|
|
2 |
|
|
|
3 |
- install Ansible |
|
|
4 |
- Create a new deployment profile: |
|
|
5 |
- add a new deplyment host list by creating a `hosts/hosts.<profile>` file: |
|
|
6 |
- `cp hosts/hosts.tmpl hosts/hosts.<profile>` |
|
|
7 |
- define the profile vars: `cp group_vars/group_vars.yml.tmpl group_vars/<profile>.yml`, customize it |
|
|
8 |
- create the necessary host vars in `host_vars/<machine>/base.yml`. Use ansible vaults to edit them and do not expose any secret. |
|
|
9 |
- deploy with the command `deploy.sh`: `./deploy.sh <profile> <version>` |
|
|
10 |
|
|
|
11 |
## Create new version |
|
|
12 |
Launch the command: |
|
|
13 |
- `set-version.sh <version>` |
|
|
14 |
- commit, tag and push as needed. |
|
|
15 |
|
|
|
16 |
## Launch local django command on the managed host |
|
|
17 |
|
|
|
18 |
``` |
|
|
19 |
DJANGO_SETTINGS_MODULE=irinotes.settings IRINOTES_CONFIG_BASE=/etc/www/irinotes django-admin <command> |
|
|
20 |
``` |
|
|
21 |
|