Coder Social home page Coder Social logo

devops-exercise's Introduction

Prologue - This is not an exam

We recognise that you're likely interviewing for multiple positions while also keeping up with your current job, family, and social life. Your time is valuable, and we don't want to take up too much of it.

The questions below are not an exam. There's no pass/fail score and you won't be graded on anything. You won't lose marks for missing some details. There's no trick questions and no time limits.

Put as much or a little time into this as you feel comfortable with. If you don't have time to complete it, that's ok. If you're busy, we're happy to just skip this and jump straight into a face to face interview. Feel free to deviate from the questions if you feel like it.

We simply want to give you the opportunity to write some code in a low stress environment as part of the interview process, and we'll use that as a starting point to drive the discussion in a followup interview.

Overview

This repository contains a node http server that returns the time. The server has a dependency on a postgres database which must be deployed separately as a backing service.

Instructions

  1. Fork this repository
  2. Add a Dockerfile to create a docker image for the application (see build and run commands below)
  3. Configure github actions to build the docker image and push the image to the github docker registry
  4. Use a tool like Terraform or Pulumi to deploy the app to Kubernetes (you may want to use Minikube to test). This does not need to be deployed using github actions - just include the Terraform or Pulumi project in a deployment subdirectory.
  5. Update the deployment project to deploy 3 replicas/pods running the application
  6. Update the deployment project to deploy a postgres databse with a PersistentVolumeClaim

In the follow up interview, describe what you would do differently for a production deployment of the app to AWS.

Commands

Build

yarn install

Run

yarn start

Required env vars

  • DB_URL : URL for the postgres database (e.g. postgresql://dbuser:[email protected]:3211/postgres)
  • PORT : Port that the http server should bind to

Testing

Once deployed, the following curl command should respond with a HTTP 200 and the current time in the body

curl http://<hostname>:<port>/time

devops-exercise's People

Contributors

dl-pendula avatar hsubra89 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.