Skip to content

Latest commit

 

History

History
86 lines (69 loc) · 3.4 KB

README.md

File metadata and controls

86 lines (69 loc) · 3.4 KB

Grace Hopper Jeopardy

This solution demonstrates multiple best-practices for building a NodeJS web application for Grace Hopper Jeopardy trivia game.

Run locally

Open index.html in your browser.

To eebuild

Run the following:

    npm install
    npm run webpack

Then open index.html in your browser.


Create Github personal access token

Note:

Create a Personal Access Token for your Github account for the AWS webhook.

Link:

Deploy on AWS

This application is deployed using AWS CloudFormation.

CloudFormation Parameters: (required)

  • GitHubRepo
  • GitHubBranch
  • GitHubToken (never commit this value)
  • GitHubUser
This solution require Shared Resource stack to be deployed as primary stack, then Applicaiton stack.
Stacks Deploy
Shared Resources Launch
Application Launch

AWSCLI Deployment scenarios:

This application will be deployed on EC2 Autoscaling Group nodes working behind an Application Load Balancer. It can be used as an example application in a workshop, with multiple stacks in the same account.

Create shared resources (create once):

aws cloudformation deploy --stack-name ghc-workshop-shared-resources --template-file cloudformation_templates/shared_resources.yml --capabilities CAPABILITY_NAMED_IAM --parameter-overrides WorkshopName="ghc-workshop"

Create website resources (can create multiple stacks for a workshop):

aws cloudformation deploy --stack-name ghc-workshop-application-1 --template-file cloudformation_templates/application.yml --parameter-overrides SharedResourceStack="ghc-workshop-shared-resources"

Go to the CodePipeline console:

https://console.aws.amazon.com/codesuite/codepipeline/pipelines

Once the deployment completes, go to the application URL:

aws cloudformation describe-stacks --stack-name ghc-workshop-application-1 --query 'Stacks[0].Outputs[?OutputKey==`Url`].OutputValue' --output text

Cleanup:

  1. Delete S3 objects for CodeSuite before deleting CloudFormation stacks
  2. Delete Stacks:
aws cloudformation delete-stack --stack-name ghc-workshop-shared-resources

aws cloudformation delete-stack --stack-name ghc-workshop-application-1

Credits


License

This library is licensed under the MIT License.