-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy
W. Scott Meeks edited this page Nov 1, 2023
·
5 revisions
- Requires AWS CLI to be installed https://aws.amazon.com/cli/
pip install awscli
- Then ask someone (Sheldon?) to set you up with the AWS IAM service, and get the AWS Access Key and AWS Secret Access Key, then run
aws configure
and enter those to finish AWS CLI setup http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-quick-configuration
From this project's root:
- Checkout the branch you want to deploy
- Run
grunt
to build the /dist - Run
./deploy.qa.sh
to deploy /dist to S3 - In addition to
deploy.qa.sh
, there'sdeploy.dev.sh
, anddeploy.prod.sh
(use./
at front of each command)
Now the front end is on S3, but we're using CloudFront which caches everything. Eventually things expire but you can speed that up using invalidation. The qa and dev scripts include creating invalidations. Prod should be invalidated manually as described below.
Go to the CloudFront Distribution for the server, here's QA:
- https://console.aws.amazon.com/cloudfront/home?region=us-west-2#distribution-settings:E1J1L7T3MUWTG4
- click 'Invalidations'
- click 'Create Invalidation'
- enter:
/*
- then click 'Invalidate' and wait for it to complete.
When it's complete (about 10-15 minutes) the site will be up-to-date.
You can also invalidate partial paths and it goes faster. We can invalidate 1000 paths a month for free ($0.005 per additional path), and wildcards count as 1 path -- /*
is price efficient but not if you're in a hurry.