Restore Bridge Infrastructure
version | comment |
---|---|
2021/08/23 | Reviewed. Added this table. |
2017/10/27 | Created |
This documents how you might restore the infrastructure for the AWS Bridge account and apps. Most of the Bridge infra (but not all) has been automated with AWS cloudformation templates located in a few different repos. This doc attempts to guide you thru the steps needed to recover the AWS environment to support the bridge server.
Step-by-step guide
Bridge-infra Repo
- Manually setup resources: Hosted Zones (*.sagebridge.org) and SSL Certs (requires manual approval).
- Clone Sage-Bionetworks/Bridge-infra repo
- git-crypt unlock the repo. The key to unlock is in Lastpass
- Run cloudformation and create a
bootstrap
stack withcf_template/boostrap.yml
- Modify the env_vars and env_vars.secret files to match your environment.
- Source the env vars (i.e. `source env_vars && source env_vars.secret`)
- Change
update_cf_stack.sh
to 'create-stack' instead of 'update-stack' - Execute
./update_cf_stack.sh
BridgePF Repo
- Clone Sage-Bionetworks/BridgePF repo
- View the wiki and do the bootstrapping steps required for the app to run (create DynamoDB tables, RDS, buckets, etc..).
- Build the app (i.e. sbt clean dist). The built binary is in target/universal/bridgepf-0.1-SNAPSHOT.zip
BridgePF-infra Repo
- Clone Sage-Bionetworks/Bridge-infra repo
- git-crypt unlock the repo. The key to unlock is in Lastpass
- Modify the env_vars and env_vars.secret files to match your environment.
- Source the env vars (i.e. `source env_vars && source env_vars.secret`)
- Change update_cf_stack.sh to 'create-stack' instead of 'update-stack'
- Execute
./update_cf_stack.sh
- The EB environment will be in an Error state because the app has not been deployed yet.
- Repeat steps #3-4, This time update the autoscaling and elasticache vars.
- Execute
./update_cf_stack.sh to setup the new vars in EB.
Deploy the bridge app (from build in BridgePF repo) using either AWS console or CLI.
Check cloudwatch logs if EB fails to deploy the app.
Related articles