Hi team,
We just noticed that with the current directory structure on apr-ansible-playbooks, it's easy to mistakenly run production release command while we meant to run staging release. That is because the yml is in the same directory for each service.
With this PR, we changed the current directory structure:
deployment/
serviceA/
production.yml
staging.yml
serviceB/
production.yml
staging.yml
.../
Into:
deployment/
production/
serviceA/production.yml
serviceB/production.yml
...
staging/
serviceA/staging.yml
serviceB/staging.yml
...
Alongside this, we also tell engineers to run commands inside staging
or production
directory. That way, even if we mistakenly run production
deployment on staging
directory, the command will not work because the production.yml
does not exist in that directory.
Note that after cd
-ing to the production
or staging
directory, the command to deploy does not change from the previous one, i.e. we can reuse our command history.
To use this new convention, please pull the repo to the latest master.
We have updated ASG Deployment Guide to reflect this change.
Please let me (@bobbypriambodo) know if you encounter problems or if you have questions.