Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated RTD deployment links #332

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/source/modules/deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,19 @@ If you have not already done so:
* For all other prompts accept the default.
6. Check that the command line client can see the environments in the account: ``eb list``.

* If the output does not include ``brain-score-web-dev`` and ``brain-score-web-prod``, default region or AWS credentials may be misconfigured.
* If the output does not include ``brain-score-web-dev-updated`` and ``brain-score-web-prod-updated``, default region or AWS credentials may be misconfigured.

To Deploy (if migrations are made)
**********************************

1. If there are changes to Django models, make sure makemigrations has been run and the migration checked into git.
1. If there are changes to Django models, make sure make migrations has been run and the migration checked into git.

2. Deploy the latest Git commit to the development environment: ``eb deploy brain-score-web-dev --timeout 20``.
2. Deploy the latest Git commit to the development environment: ``eb deploy brain-score-web-dev-updated --timeout 20``.

* This can take around 15 minutes.
3. If there are database migrations, apply them from within the container:

* ``eb ssh brain-score-web-dev``
* ``eb ssh brain-score-web-dev-updated``

* Reply "yes" to the fingerprint question.
* You should get an EC2 instance prompt like ``[ec2-user@ip-172-31-32-98 ~]$``.
Expand All @@ -121,16 +121,16 @@ To Deploy (if migrations are made)
* Exit the container: ``exit``.
* Exit the EC2 host: ``exit``.

4. Check the dev website: ``http://brain-score-web-dev.us-east-2.elasticbeanstalk.com/``.
5. If the dev website passes tests, deploy to production: ``eb deploy brain-score-web-prod --timeout 20``.
6. If necessary, repeat migrations, but this time begin with ``eb ssh brain-score-web-prod``.
4. Check the dev website: ``https://brain-score-web-dev-updated.kmk2mcntkw.us-east-2.elasticbeanstalk.com``.
5. If the dev website passes tests, deploy to production: ``eb deploy brain-score-web-prod-updated --timeout 20``.
6. If necessary, repeat migrations, but this time begin with ``eb ssh brain-score-web-prod-updated``.

To Create Elastic Beanstalk Environments
****************************************

If the Elastic Beanstalk environments do not exist or need to be recreated::

eb create brain-score-web-dev -c brain-score-web-dev -r us-east-2 -p Docker --envvars DEBUG=True,DOMAIN=localhost:brain-score-web-dev.us-east-2.elasticbeanstalk.com,DB_CRED=brainscore-1-ohio-cred
eb create brain-score-web-dev-updated -c brain-score-web-dev-updated -r us-east-2 -p Docker --envvars DEBUG=True,DOMAIN=localhost:brain-score-web-dev-updated.kmk2mcntkw.us-east-2.elasticbeanstalk.com,DB_CRED=brainscore-1-ohio-cred

eb create brain-score-web-prod -c brain-score-web-prod -r us-east-2 -p Docker --envvars DEBUG=False,DOMAIN=localhost:brain-score-web-prod.us-east-2.elasticbeanstalk.com:www.brain-score.org,DB_CRED=brainscore-prod-ohio-cred
eb create brain-score-web-prod-updated -c brain-score-web-prod-updated -r us-east-2 -p Docker --envvars DEBUG=False,DOMAIN=localhost:Brain-score-web-prod-updated.kmk2mcntkw.us-east-2.elasticbeanstalk.com :www.brain-score.org,DB_CRED=brainscore-prod-ohio-cred