You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 23, 2021. It is now read-only.
Lu Hong edited this page Oct 31, 2019
·
36 revisions
The Quickstart guide is meant to help you get started. By using one of the approaches below, you can deploy all the modules (backend, frontend, analytics and operations) in this project together in your AWS Account.
To make it easy to deploy the service and see how it works, we have published the service, including all the modules in the repository, as a serverless application on AWS Serverless Application Repository. Follow the steps below to deploy this application in your AWS account:
Provide the required app parameters and click "Deploy"
Parameters
The app has the following parameters:
Stage (optional) - The stage where the application is running in, e.g., dev, prod. Default: test
Manually Deploy from Source
To manually deploy the application from the source code, follow the steps described in this section. At the end, you will have a running instance of this application in your AWS account. You will be able to use the deployed service from the static website.
Pre-requisites
The source code of the repository is written and built using Java8 and node.js10 runtimes. You will need to install Java8 and Node.js10:
Amazon Correto 8 (an Open JDK download) OR Oracle JDK 8 (download)
The project only builds and runs on Java8 and Node.js10. If you have other versions of Java or Node.js, you will need to download the configure Java8 and Node.js10.
The minimum version requirement for AWS CLI is 1.16.84. If you have an older version of AWS CLI, you will need to upgrade it.
1. Build
Clone the source code from the GitHub repository
Run the following commands to build the source code:
cd static-website
npm install
npm run ci
cd ..
mvn clean test
The commands above will compile the code and run unit tests
2. Package
The AWS resources used in the service are defined in SAM (AWS Serverless Application Model) templates. You can install the service into your own AWS account by packaging and deploying the SAM template template.yaml under sam/app folder.
To package the SAM templates, first you will need an S3 bucket to store the artifacts such as your AWS Lambda function code. AWS CloudFormation will use the artifacts from the S3 bucket for deployment. If you don't have an S3 bucket yet, you can run the following command to create an S3 bucket:
aws s3 mb s3://<your bucket name>
Then run the following maven command to package the templates:
The deployment takes around 10 minutes to complete. Once completed, you can access the service APIs via the static website. The URL of the static website is available in the output section of the deployed CloudFormation stack. Go to the CloudFormation console and click on your root stack. At the top, you will see an Outputs tab that will display the URL you can use to access the static website.
The Quick Start deployment launches all components in your AWS account so you can experiment around with the deployed service. However, if you would like to setup a more production-like deployment environment with separate CI/CD pipelines, follow the CI/CD setup instructions.
To learn more about each component, see the following walkthroughs: