Skip to content

Instantly share code, notes, and snippets.

@kuldeep-surendra
Last active February 15, 2019 11:24
Show Gist options
  • Save kuldeep-surendra/508f9b52b63d447daad62b2af5af2f85 to your computer and use it in GitHub Desktop.
Save kuldeep-surendra/508f9b52b63d447daad62b2af5af2f85 to your computer and use it in GitHub Desktop.

DevOps Coding Test

Goal

Deploy the python app https://github.com/kuldeep-surendra/bus_stop_api to ec2 instance using any Iac tool (cloudformation/terraform). Script the creation of a service, and a healthcheck script to verify it is up and responding correctly.

Prerequisites

You will need an AWS account. Create one if you don't own one already. You can use free-tier resources for this test.

The Task

You are required to provision and deploy a new service in AWS. It must:

  • Be publicly accessible, but only on port 80 and 443.
  • Return the current time on /now.

Mandatory Work

Fork this repository.

  • Create a linux user named deploy in the ec2 instance.
  • Deploy the python application in that user.
  • Create and configure mysql/postgresql database server inside the ec2 instance.
  • Script your service using your configuration management and/or infrastructure-as-code tool of choice.
  • Provision the service in your AWS account.
  • Write a healthcheck script that can be run externally to periodically check if the service is up and its clock is not desynchronised by more than 1 second.
  • Alter the README to contain instructions required to:
    • Provision the service.
    • Run the healthcheck script.
  • Add autoscaling and loadbalancer to the service.

Once done, give us access to your fork. Feel free to ask questions as you go if anything is unclear, confusing, or just plain missing.

Extra Credit

We know time is precious, we won't mark you down for not doing the extra credits, but if you want to give them a go...

  • Run the service inside a Docker container.
  • Make it highly available.
  • Get a domain for you application.
  • Generate a SSL certificate for your domain.

Questions

What scripting languages can I use?

Anyone you like. You’ll have to justify your decision. We use CloudFormation, Puppet and Python internally. Please pick something you're familiar with, as you'll need to be able to discuss it. Extra points for using ansible and shell scripts.

What will you be grading me on?

Scripting skills, security, elegance, understanding of the technologies you use, documentation.

What will you not take into account?

Brevity. We know there are very simple ways of solving this exercise, but we need to see your skills. We will not be able to evaluate you if you provide five lines of code.

Why doesn't the test include X?

Good question. Feel free to tell us how to make the test better. Or, you know, fork it and improve it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment