Skip to content

Instantly share code, notes, and snippets.

@BBischof
Last active October 30, 2017 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BBischof/1533c8aae8a874e9affa99b2a7401cfc to your computer and use it in GitHub Desktop.
Save BBischof/1533c8aae8a874e9affa99b2a7401cfc to your computer and use it in GitHub Desktop.
Work-at-home Challenge for Blue Bottle Coffee DevOps Engineer

DevOps Coding Challenge (Allot at least 2 hours)

s3 manipulation

  • Clone the read-only bucket https://s3-us-west-2.amazonaws.com/bbc-devops-challenge/, and its contents into your personal s3 account. Read through each JSON file located on this your copy of this bucket. If the key "bump_waste_threshold" is not present in any .json files, add this key with a default value of '.23' and replace the old file.

Directory microservice

Generate a web application in a framework of your choice that does the following:

  • Connects to the s3 bucket cloned above, and stores a text representation of the subdirectories of the bucket in Redis (or a similar key-value store). This text representation should match the output format of the unix command tree. Additionally, store the json files as the values with keys given by their paths from the root of this bucket.
  • Serves the plain text of the directory tree from the root path of the application.
  • All non-root paths must return a sample of poetry(anything you like) in plain text.

Monitoring

  • Monitor for new JSON file uploads to the s3 bucket, update the data store. SNS/SQS are strongly encouraged. The changes should be visable no more than 10 minutes after the file is uploaded.

Virtualization

  • Dockerize the application ensuring that the state is maintained between restarts (Note that Redis must be set up in its own, standalone container).
  • Deploy your microservice to EC2 (you can use their free-tier resources) as part of an ECS cluster.
  • Make the application publicly accessible.

Automated deployment

  • In the README of your application, describe how you would automate deployment with this infrastructure.

Extra Credit:

  • Use a Terraform to set up the server
  • Use a configuration management tool (such as Puppet, Chef or Ansible) to bootstrap the server
  • Put the server behind a load balancer
  • Log the values of the newly added JSON files to an RDS with the following columns:
    • json name (relative path from top bucket)
    • updated at
    • model_name
    • weight_threshold
    • parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment