Skip to content

Assignment #03

Due Date

Section Due Date
Monday 06:00PM on 02/25/2019

Assignment Weightage

Individual assignment weightage on course grade of this assignment is 10%.

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 stop terminate your k8s stack and other cloud resources when you are done working on it.

Objectives

The objective of this assignment is get the CSYE 6225 web application running on Kubernetes cluster.

Cloud Resources

The cloud native application built as in CSYE 6225 requires a relational database and S3 bucket to work. Fort this part of the assignment, you will create a playbook setup-cloud-resources.yaml which will create any and all resources needed such as RDS, S3, IAM roles, policies, etc. Playbook teardown-cloud-resources.yaml should delete all resources created by setup-cloud-resources.yaml. Your RDS instance can be in the same subnet as your Kubernetes nodes.

Web Application

Update your web application so that endpoints that use the S3 buckets and RDS instance can now work.

Configuration & Secrets

Bucket name and credentials along with RDS connection info will now be provided to the web application through Kubernetes secrets and configuration map.

Kubernetes Object Spec for ReplicationController

Web application will now be deployed using ReplicationController. Create a ReplicationController spec to run 3 replicas. Each web application container should be limited to 500m CPU and 256Mi memory.

Liveness & Readiness Probe

Implement HTTP based Readiness and Liveness probles. Both probes should return OK once following conditions are met:

  1. Application can connect to database and run a simple query.
  2. Application can access S3 bucket.

Service & LoadBalancer

Create a load balancer service for your web application.

Documentation

Ansible Modules

Submission

Danger

Assignment will be considered late if commits are made to master and feature branch after due date.

  1. All work for this assignment must be done on assignment3 feature branch and merged to master when you are dev complete.
  2. All team member’s feature and master branches must be in-sync.

Grading Guidelines

Warning

Following guidelines are for information only. They are subject to change at the discretion of the instructor and TA.

  1. Verify that database credentials are stored in Secret. Delete the Secret and try to scale the application. It should fail due to missing credentials. Configuration can be stored in either ConfigMap or Secret.
  2. Student must demo all APIs of the web application. Exception will be password reset API.
  3. RDS instance must be created by ansible playbook.
  4. Verify liveness and readiness probes are based on actual check. Students must demo conditions that will cause liveness and readiness probes to fail.
  5. All API calls must be made thru a service. Student must scale up and down replica count of their webapp ReplicationController and APIs must continue to work.