Versions Compared

Key

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

...

A key issue is that the Voices project is managed separately. See the AWS page for details on switching accounts to the Community History Project account. You must be in the correct account for all of the steps.

Setup:

Build server

Make sure you are on the most recent ansible-inventory. Follow the instructions in the README to build a voices server.
Once the server is built, go to AWS EC2 and find the Elastic Address section. Go there and assign the staging or production elastic IP to the newly built server.

Create S3 Bucket for Website

...

  1. Create an S3 bucket with the name of the site (i.e. voices.sciencehistory.org) (you should also see this name in the ansible var file for the server you just built)

  2. Under properties to Static Website Hosting to “Use this Bucket to Host a Website”

    1. The index document should be index.html

    2. The error document should be 404.html

  3. Under Permissions make sure Block Public Access (and all subsections) are set to Off

  4. In Bucket Policy under Permissions follow the example under Step 2 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteAccessPermissionsReqd.html) using our bucket name instead of Example

...

  1. Open AWS Console and go to Cloudfront

  2. Select the Create Distribution button

  3. Choose the Web delivery method button

  4. For Origin domain name DO NOT USE THE AUTOFILL S3 bucket name! You must enter the website endpoint, which you can find in S3 by looking in properties → Static Website Hosting. It should look like: http://BUCKETNAME.s3-website-REGION.amazonaws.com

  5. Leave Origin Path blank, give a descriptive name for origin ID (Voices-Production)

  6. Viewer Protocol Policy should be changed to redirect HTTP to HTTPS

  7. Leave other settings standard until you see Compress Objects Automatically and set it to yes.

  8. In Distribution Settings change Price Class to only use US, Canada, and Europe (the cheapest option)

  9. For Alternate Domain Names, set the intended URL.

  10. For SSL Certificate set it to Custom SSL Certificate click the text box, the imported certificate should be there. Select it.

  11. Leave Custom SSL Client support at Clients that support Server Name Indication (SNI)

  12. Set logging to on

  13. For Bucket for Logs set Voices-Log

  14. For prefix uses cloudfront-staging/production.

  15. Set state to enabled, and select create distribution.

  16. The now created distribution has a domain name (XXXYYYZZ.cloudfront.net)

  17. Copy that and make a ticket for IT, and ask them to set a cname record that points the intended URL (step 9) to forward to the cloudfront domain name.

  18. When IT has completed this you are done.

Final Steps

Log onto the newly built Voices server, run the build-voices.sh script as the ubuntu user.

Navigate to the new site and confirm it works.