Skip to content

Instantly share code, notes, and snippets.

@sean-smith
Last active April 13, 2020 18:00
Show Gist options
  • Save sean-smith/97315e2ec933f5fd639fd267d0c82118 to your computer and use it in GitHub Desktop.
Save sean-smith/97315e2ec933f5fd639fd267d0c82118 to your computer and use it in GitHub Desktop.
Deploy COVID-19 Cluster

COVID-19 AWS HPC Cluster

User Setup

To deploy, click:

Region Stack
us-east-1 amplifybutton
us-west-2 amplifybutton
eu-west-1 amplifybutton
eu-central-1 amplifybutton

Step 1

After clicking "Launch Stack" you'll be redirected to a screen, leave everything as default and click "Next":

image

Step 2

Leave all the parameters as they are and click "Next":

image

Step 3

Click "Next": image

Step 4

Select "I acknowledge that AWS Cloudformation might create IAM resource" and click "Create Stack" image

Step 5

After the stack goes into CREATE_COMPLETE, click on the "Outputs" tab of the AWS-HPC-Quickstart stack, there you'll see a URL. Click on that URL and you'll be re-directed to the console:

image

Developer Setup

Click to expand
The first step is installing node.js, this can be done easily with Homebrew. After that completes, install aws-cdk:
$ brew install node
$ npm install -g aws-cdk

Now you can activate the python virtualenv and install the python dependencies:

$ source .env/bin/activate
$ pip install -r requirements.txt

At this point, it's time to setup CDK, the following needs to be done once in each account:

$ cdk bootstrap

And finally, deploy the app:

$ cdk deploy

I've surely missed a bunch of python dependencies, the format for installing those is:

$ pip install aws-cdk.custom-resources

Once it finishes deploy, you'll get an ouput with a link to the Cloud9 URL. Click on that to quickly see the Cloud9 result:

image

Pro-Tips

Use cdk synth | less to see the generated template.

Provide parameters to the stack via cdk deploy --parameters pcluster:KEY=VALUE.

Useful commands

  • cdk ls list all stacks in the app
  • cdk synth emits the synthesized CloudFormation template
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk docs open CDK documentation

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment