...
- log in to: http://sagebionetworks.artifactoryonline.com/
- Go to the Artifacts tab
- For a snapshot build go to: libs-snapshots-local > org > sagebionetworks > [project] > [version]- SNAPSHOT > [project]-[version]-SNAPSHOT.war
- For a released version go to: libs-releases-local > org > sagebionetworks > [project] > [version] > [project]-[version].war
- Click download
- Now log into the AWS console
- click on the "Elastic Beanstalk" tab
- Select the 'stack' (Synapse or Synapse-Staging) Note that you will have to upload the .war file into each stack, or what Beanstalk calls an "Application"
- From here, you can either just upload the wars as new versions without deploying if you are going to build new environments, or upload and deploy in one step if your environments already exist.
- A number of "Environments" will be listed. Click on "Environment Details" for the environment of interest.
- Click on "Deploy a different version."
- Click the radio button "Upload and deploy a new version"
- To label the version, follow the naming convention given here: http://sagebionetworks.jira.com/wiki/display/PLFM/Branching+and+Tagging
- Upload the .war file that you downloaded from Artifactory.
- Your new .war file will now be deployed to Elastic Beanstalk.
Create or Configure MySQL RDS Service (Skip this section if using existing Environments.)
See Synapse Database Setup and Configuration for details on how to create a new schema for a new stack or instance. The staging and production stacks use Amazon's RDS service. Currently, both stacks use different databases in the same RDS instance. The same RDS service also holds the ID Generator db, as well as data for Crowd.
...
Create two more, so that there is one for Auth services, one for Repo services, and one for SynapseWeb
Configure Environments
The configuration of all environments for all Synapse components should be the same, with the exception that we leave port 80 on the web app load balancer open and closed everywhere else.
Configure Server
Click on 'edit configuration' in the Beanstalk UI, start on 'Server' tab:
...
Custom AMI ID=ami-524db23b
Configure Load Balancer
Click on 'Load Balancer' tab
...
For 'SSL Cert' choose arn:aws:iam::325565585839:server-certificate/SynapseCert
Configure Notifications
Click on 'Notifications' tab
Set Email Address to 'platform@sagebase.org'
Configure Container
Click on 'container.'
In the JVM Command Line Options For a production deployment:
...
This is the minimum information needed to bootstrap our system with the information needed to load a configuration via a .properties file. Here, the actual .properties file should be loaded in S3 as described below
Setting up a Properties file in S3 (Skip this section if using existing Environments.)
For each stack, we have created a unique IAM User, encryption key, and configuration file. These values are passed into the container of the environments as described above. AWS access key ids, secret keys, encryption keys, and the url for an environment can be found on sodo at /work/platform/PasswordsAndCredentials/StackCredentials/IAMUsers in the appropriate .csv file. All stack environments run under this IAM User, and have permission to access their configuration file from S3. Configuration files can be loaded / updated in S3 under the elasticbeanstalk-us-east-1-325565585839 bucket (this is the same place the .war files are deployed). This will give URLs of the form https://s3.amazonaws.com/elasticbeanstalk-us-east-1-325565585839/<stack-name><Instance-name>-stack.properties If you are creating a new stack, you will have to create the IAM user and grant that user access to access the configuration file using the IAM tab of the AWS console. In most cases you should be able to keep the configuration the file the same, or replace it with a new file of the same name. Note that the stack and instance names embedded in the .properties file must match the names passed in to the environment via PARAM3 and PARAM4; this is a safety feature to reduce the risk of wiring the wrong property file to the wrong environment.
...
See R Package Builds for details of how to do this. You might ask Nicole to do this with you if you are new to it.
Update CNAMES (Skip this section if using existing Environments.)
Sign in to GoDaddy, select sagebase.org, and launch Domain Manager. We have defined public URLs for the various stacks and components, e.g. synapse-staging (.sagebase.org) for the web app, auth-staging for auth, etc. Point these to the elastic beanstalk URL, which should be something of the form stackName-componentName.elasticbeanstalk.com.
...