Skip to content

Assignment #03

Due Date

Section Due Date
Saturday 10/27/2018 at 01:00PM

Getting Help

Info

Ask all your questions on Piazza. Assign assignment3 tag to your posts.

AWS Expenses

Warning

To keep your AWS credit usage to minimum, please terminate your k8s stack when you are done working on it.

Kubernetes Cluster

Kubernetes Configuration

  1. Setup k8s cluster using kops with 1 master Node (recommended instance size - t2.micro) and 3 worker node (recommended instance size - t2.micro). If t2.micro instance is too small, you can increase the size of the instance.

Resource Limits for Redis Server & Sentinel Containers

  1. CPU: 100m or 0.1
  2. Memory: 32MB (start with 32 MB and increase as needed to run the container. This will allow us to run the assignment with smallest possible EC2 instance.)

Objectives

Develop a simple RESTful webservice in programming language of your choice. You may use open source libraries and frameworks in your application. Application should run in a container on k8s.

You will implement following:

  1. Web app endpoint /. Response should be JSON listing all available environment variables to the container.
  2. Webapp will connect to REDIS cluster setup in previous assignment using service discovery.
  3. Webapp container must implement readiness probe. Application should be marked “ready” once it has successfully established connection with REDIS cluster.
  4. REDIS cluster must be secured with password. Password must be stored as Secret in your k8s cluster.
  5. REDIS service name must be passwed to web application using ConfigMap.
  6. Web application will count how many times API request has been made from same IP address. Store data in REDIS ad key/value with client ip as the key and request count as value.
  7. Requests to web application should be load balanced.

Submission

Danger

Releases created after due date will be considered late.

  1. All work for this assignment must be done on assignment3 feature branch and merged to master when you are dev complete.
  2. GitHub release must be created from the master branch.
  3. All team member’s branches must be in-sync. Each team member must create a release in their repository.
  4. All assignments will be delivered using GitHub releases feature. See GitHub documentation for details on how to create a release.

Grading Guidelines

Warning

Following guidelines are for information only and are subject to change at my discretion.

  1. Demonstrate that your deliverables have met assignment objectives.