Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

You should not be deploying anything you built yourself on your local machine.  Only deploy build artifacts generated by Bamboo and stored in Artifactory as the result of a clean build.  See Branching 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:

  1. log in to: http://sagebionetworks.artifactoryonline.com/
  2. Go to the Artifacts tab
    1. For a snapshot build go to: libs-snapshots-local > org > sagebionetworks > [project] > [version]- SNAPSHOT > [project]-[version]-SNAPSHOT.war
    2. For a released version go to: libs-releases-local > org > sagebionetworks > [project] > [version] > [project]-[version].war-
  3. Click download
  4. Now log into the AWS console
  5. click on the "Elastic Beanstalk" tab
  6. 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"
  7. 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.
  8. To update an environment in place
    1. A number of "Environments" will be listed.  Click on "Environment Details" for the environment of interest.
    2. Click on "Deploy a different version."
    3. Click the radio button "Upload and deploy a new version"
    4. To label the version, follow the naming convention given here: http://sagebionetworks.jira.com/wiki/display/PLFM/Branching+and+Tagging
    5. Upload the .war file that you downloaded from Artifactory.
    6. Your new .war file will now be deployed to Elastic Beanstalk.
    7.  Repeat for additional war(s) that need upgrades, then skip ahead to verification
  9. Alternately, if you are going to build new environments, you can just upload the wars and label the new versions for later use.

Create or Configure MySQL RDS Service (Skip this section if using existing Environments.)

...

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

The IAM key should be AWSAccessKeyId=AKIAINNFCDBA3NBOQO2Q

In trunk\tools\SynapseDeployer\main.py
set the following
- version = '0.8' # set to the actual version to be deployed
- isSnapshot = True
- beanstalk_application_name =
set to 'Synapse-Staging' for staging, 'Synapse' for Synapse
- componentsToUpgrade: set to the target stack, e.g. 'prod-b-auth' for stack 'b' of alpha/prod
- make sure deploymentBucket=elasticbeanstalk-us-east-1-325565585839

Run the python deployment script

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

To verify deployment, run top-level queries against the repository instances from an authenticated account.

...