tevyt / travia

A little trivia game to test your knowledge.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travia is a simple trivia game implemented as the final project of the Udacity Cloud Dev Ops Nanodegree.

The Game

Live Demo

The 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

Implementation

The application is built using TypeScript and ReactJS. The questions are pulled from Open Trivia Database.

Docker

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.

CloudFormation

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.

Kubernetes

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.

Jenkins

The Jenkinsfile included in this repository describes a pipeline used to build and deploy this application.

Steps

  1. Linting
  2. 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.

  3. Upgrade Infrastructure
  4. 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

  5. Deploy
  6. 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.

Results

Kubernetes pods after a successful deployment.

EC2 Console with resources used to build and host this project.

About

A little trivia game to test your knowledge.


Languages

Language:TypeScript 70.0%Language:CSS 17.2%Language:HTML 11.5%Language:Dockerfile 1.3%