Travia is a simple trivia game implemented as the final project of the Udacity Cloud Dev Ops Nanodegree.
Live DemoThe objective of the game is to gain as many points as possible within 5 minutes. Players are awarded points for each question answered. The number of points awarded dependeds on the difficulty of the question. As in the table:
Easy | 1 point |
Medium | 2 points |
Hard | 3 points |
The application is built using TypeScript and ReactJS. The questions are pulled from Open Trivia Database.
The Dockerfile in this repository makes use of multi-stage builds to first build the application using node and then deploy the production-ready build on an Nginx instance. Built docker images are pushed to Dockerhub.
Within the cloudformation folder of this repository is a pair of yml files used to provision the infrastructure for the Amazon EKS Cluster that will run this application.
The yml files within the kubernetes folder of this repository will deploy the version of this application when applied to a Kubernetes cluster. <tag>
must be replaced by the version of the application to be deployed.
The Jenkinsfile included in this repository describes a pipeline used to build and deploy this application.
- Linting
- Upgrade Infrastructure
- Deploy This step sets the tag within the kubernetes deployment manifest within the kubernetes folder of this repository to the value latest push docker image and applies all kubernetes manifests within the folder to the EKS Cluster using kubectl.
In the linting step Hadolint is used to lint the Dockerfile.
Given an error in the Dockerfile, such as the incorrectly spelt EXPOSE below.
The Jenkins build will report a failure.
![](https://raw.githubusercontent.com/tevyt/travia/master/./linting-failure.png)
This step completes 2 tasks in parallel. It updates the CloudFormation stacks with any changes that have been made to the templates and it builds and pushes a new version of the Docker image