Skip to content

Commit 7898924

Browse files
committed
Update README
1 parent c8da894 commit 7898924

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ https://github.com/CodeNow/devops-scripts
1919
3. Change to the devops scripts repo directory and run the following command:
2020
`ln -s /<local-path-to-devops-scripts>/ssh/config ~/.ssh/config`
2121

22-
4. Obtain the "Ansible Secrets" zip from one password
22+
4. Obtain the "Ansible Secrets" zip for the environment you want to deploy (or create the new environment following ![./environments/README.md](./environments/README.md))
2323

24-
5. Unzip file obtained above into `devops-scripts/ansible/secrets`
24+
5. Unzip file obtained above into `devops-scripts/environments/${YOUR_ENV}/secrets`
2525

2626
6. Copy the `*.pem` files from `devops-scripts/ansible/secrets` to your `~/.ssh` directory
2727

@@ -71,14 +71,15 @@ of the docker image needed to run the service on our architecture.
7171

7272
##### Command
7373
```
74-
ansible-playbook -i ./[inventory_dir] [service-playbook] -e git_branch=[branch-or-tag] -t deploy
74+
ansible-playbook -i ./[inventory_dir] [service-playbook] -e @[main-var-file] -e git_branch=[branch-or-tag] -t deploy
7575
```
7676

7777
##### Arguments
7878
- `[inventory_dir]` - The environment inventory files (servers and variables). Should be one of the following:
79-
- `stage-hosts` - Runnable sandbox staging environment services
80-
- `gamma-hosts` - Gamma services (internal use only; production mirror)
81-
- `delta-hosts` - Delta services (real production)
79+
- `/enviroments/stage` - Runnable sandbox staging environment services
80+
- `/environments/gamma` - Gamma services (internal use only; production mirror)
81+
- `/environments/delta` - Delta services (real production)
82+
- `[main-var-file]` - The file with the main variables for the environment
8283
- `[service-playbook]` - The playbook for the service you wish to deploy, ex:
8384
- `api.yml` - Deploys both the api and the api-workers services
8485
- `shiva.yml` - Deploys the shiva micro-service
@@ -98,15 +99,15 @@ being tested in the production mirror.
9899

99100
##### Command
100101
```
101-
ansible-playbook -i ./[inventory_dir] [service-playbook] -e git_branch=[branch-or-tag] -e build_args=--no-cache
102+
ansible-playbook -i ./[inventory_dir] [service-playbook] -e @[main-var-file] -e git_branch=[branch-or-tag] -t deploy -e build_args=--no-cache
102103
```
103104

104105
##### Arguments
105106
- `[inventory_dir]` - The environment inventory files (servers and variables).
107+
- `[main-var-file]` - The file with the main variables for the environment
106108
- `[service-playbook]` - The playbook for the service you wish to deploy.
107109
- `[branch-or-tag]` - The branch or tag you wish to deploy.
108110

109-
110111
## Reverting
111112
If, for some reason, the new deploy is not operating as expected you can quickly revert by referencing the tag you collected in Step 1.
112113
Simply run the appropriate deploy command in the previous section with the last release tag and the new deploy will be reverted.

0 commit comments

Comments
 (0)