...
You should not be deploying anything you built yourself on your local machine. Only deploy build artifacts generated by Bamboo and stored in http://sagebionetworks.artifactoryonline.comArtifactory as the result of a clean build. See http://sagebionetworks.jira.com/wiki/display/PLFM/Branching+and+TaggingBranching and Tagging for information about managing the build, branch, and tag process. For a full upgrade you will need 3 .war files out of artifactory for a deployment: services-repository<version>.war, services-authentication-<version>.war, and portal-<version>.war. Each must go into its own Beanstalk environment. -
The specific steps are:
- log in to: http://sagebionetworks.artifactoryonline.com/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+Tagginghttp://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.
- Repeat for additional war(s) that need upgrades, then skip ahead to verification
- Alternately, if you are going to build new environments, you can just upload the wars and label the new versions for later use.
...
See the page on Repository Administration for instructions on how to backup and restore data from Synapse schemas. To migrate data from one instance to another in a stack the current procedure is to take a back up of the old stack, shut the stack down, and then copy the data to the new stack. Note there is a small risk of data changed in the old stack being lost if somebody adds something to the repository after the backup process has completed. This will be addressed by PLFM-404 404 . (Even if you shut down the Synapse web portal before you take the backup, changes can still come in via the repo API, which must be up to take the backup.) In meantime, workaround by communicating with team members and our small user base.
...
Once you have CNAMES pointed to the new stack, update stackInstance-stack.properties file, upload to S3, and restart the app servers to apply the change. Having our components talk to each other via the public aliases avoids security exceptions. See PLFM-506 506 .
Deploy From Artifactory
Create an IAM credentials file, using the platform credentials, per http://stackoverflow.com/questions/5396932/why-are-no-amazon-s3-authentication-handlers-ready
...
Code Block |
---|
import sys
sys.path.append("/users/bhoff/eclipse projects/Synapse-0.8.0/tools/SynapseDeployer/boto-2.1.1")
import main
|
Verify Deployment
...