...
Open an entry in the Platform AWS Log. It is helpful to think though exactly what you are going to do and write it down. Then as you execute the change, if you deviate from the steps you wrote in the log, change the log. In the end when you haven't made any mistakes and everything has gone smoothly you will think this was a waste of time. It wasn't. The closer you are to a big demo the more true this will be.
Crowd (skip if using existing crowd deployment)
In most cases you should be re-using existing Crowd instances. We currently have two crowd servers running:
prod: https://dev-crowd.sagebase.org:8443/crowd/console
staging + test (shared): https://prod-crowd.sagebase.org:8443/crowd/console
If setting up a new Crowd server see: Setting Up Production Crowd
If you just need to point a stack at a particular crowd instance, you do this by setting the org.sagebionetworks.crowd.endpoint in the stack.properties file (URLs as above minus the /crowd/console bit)
Get the build artifacts from Artifactory
...
- 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.
- To update an environment in place
- 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.)
...
Note that if you are setting up a .properties file, any field that is a password should be encryped. You can encrypt strings by running StringEncrypter, passing in two arg's: (1) the string to be encoded, (2) the aforementioned encryption key.
Build and deploy R packages
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.)
...
TODO: Add queries and expected counts returned.
Crowd (skip if using existing crowd deployment)
In most cases you should be re-using existing Crowd instances. We currently have two crowd servers running:
prod: https://dev-crowd.sagebase.org:8443/crowd/console
staging + test (shared): https://prod-crowd.sagebase.org:8443/crowd/console
If setting up a new Crowd server see: Setting Up Production Crowd
If you just need to point a stack at a particular crowd instance, you do this by setting the org.sagebionetworks.crowd.endpoint in the stack.properties file (URLs as above minus the /crowd/console bit)
Restarting Crowd
If the server goes down:
To check if Crowd is up, in web browser go to the appropriate URL as defined above.
You should see Crowd log-in page. If not then ssh in to xxx-crowd.sagebase.org as ec2-user, using the standard key for 'platform' owned ec2 instances, PlatformKeyPairEast
At the unix prompt:
ps -efwww | grep java
Should show one java process, if not
cd /usr/local/atlassian-crowd-2.2.7/
./start_crowd.sh
Now verify that the log-in page appears in your web browser.
If crowd is running and you feel the need to 'bounce' the server, make sure to stop crowd before running "start_crowd.sh". To do this, run
./stop_crowd.sh
...
Build and deploy R packages
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.
How to run the Phenotype Descriptions Loader
...