The Synapse-Stack-Builder project contains tools for building an entire Synapse stack of AWS resources. Currently, the Synapse stack depends on the following AWS resources:
In order to run the Synapse-Stack-Builder there are few steps need to setup the AWS account. All passwords and certicates must be upload to an S3 bucket in the AWS account before starting:
The first step is to get the Synapse-Stack-Builder jar either from Artifactory or cloning from GitHub. To clone from GitHub:
git clone https://github.com/Sage-Bionetworks/Synapse-Stack-Builder.git cd Synapse-Stack-Builder mvn clean install |
There is a minimum amount of configuration information that you must provide to the stack builder. This is done by passing the path to a java Properties file to the stack builder. To setup this file start by making a copy of the following file:
Synapse-Stack-Builder/src/main/resources/required-builder.properties |
Here is an example of how to fill out this property file:
#The Amazon Web Services access key (id) need to connect to AWS org.sagebionetworks.aws.access.key=<YOUR_ACCES_KEY> #The Amazon Web Services secret key (password) need to connect to AWS org.sagebionetworks.aws.secret.key=<YOUR_SECRET_KEY> # This encryption key will be used to encrypt all passwords in the settings file org.sagebionetworks.encryption.key=<YOUR_ENCRYPTION_KEY> # The name of this stack (prod or dev) org.sagebionetworks.stack=dev # The name of this stack instance. The unique id of this instance of the stack. For example, instance=B would be used to create prodB. # For a dev stack this should be your last name. For example, instance=hill would be used to create devhill org.sagebionetworks.stack.instance=hill # The version of the portal war to deploy. org.sagebionetworks.portal.war.version=1.5.3 # The version of the authentication war to deploy. org.sagebionetworks.auth.war.version=1.4.0 # The version of the repository war to deploy. org.sagebionetworks.repo.war.version=1.4.0 |
Build a stack by running the following:
./build-stack.sh <config.properties_file_path> |
You may receive errors when you run the stack builder for the first time. That is because it takes time to ready RDS and ElasticBeanstalk instances. Run it again when the instances are ready to get rid of the errors.
Currently, there is one extra step need to get the stack ready (we hope to automate this step soon). To access the new stack you will need to create some CNAMEs in GoDaddy:
Host | Points To | Example |
---|---|---|
auth-${stack}-${instance} | auth-${stack}-${instance}-sagebase-org.elasticbeanstalk.com | auth-dev-hill -> auth-dev-hill-sagebase-org.elasticbeanstalk.com |
repo-${stack}-${instance} | repo-${stack}-${instance}-sagebase-org.elasticbeanstalk.com | repo-dev-hill -> repo-dev-hill-sagebase-org.elasticbeanstalk.com |
portal-${stack}-${instance} | portal-${stack}-${instance}-sagebase-org.elasticbeanstalk.com | portal-dev-hill -> portal-dev-hill-sagebase-org.elasticbeanstalk.com |
search-${stack}-${instance} | search-${stack}-${instance}-sagebase-org.elasticbeanstalk.com | search-dev-hill -> search-dev-hill-sagebase-org.elasticbeanstalk.com |