Skip to content

viktorradnai/devops-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps Engineer - Technical Test Solution

This implementation uses Google Cloud Platform VMs and load balancers to deploy the code onto. The infrastructure is provisioned using Terraform.

Continuous integration and deployment are driven by Github Actions:

  • A new Terraform workspace is created when a feature branch is created.
  • On any push event, npm test is ran, followed by terraform vaidate, plan and apply. This deploys the updated code to GCP, performing a rolling upgrade of the VMs on any code change.
  • The terraform workspace is destroyed and deleted on branch delete.

Prerequisites

  • A GCP account.
  • A GCS bucket for the Terraform remote state files.
  • A Google Cloud IAM service account and key with compute admin, service account user and storage object admin roles.
  • A key for the above service account which is saved as a Github secret.

Original Task Specification

Your task is to create a CI build pipeline that deploys this web application to a load-balanced environment. You are free to complete the test in a local environment (using tools like Vagrant and Docker) or use any CI service, provisioning tool and cloud environment you feel comfortable with (we recommend creating a free tier account so you don't incur any costs).

  • Your CI job should:
  • Run when a feature branch is pushed to Github (you should fork this repository to your Github account). If you are working locally feel free to use some other method for triggering your build.
  • Deploy to a target environment when the job is successful.
  • The target environment should consist of:
    • A load-balancer accessible via HTTP on port 80.
    • Two application servers (this repository) accessible via HTTP on port 3000.
  • The load-balancer should use a round-robin strategy.
  • The application server should return the response "Hi there! I'm being served from {hostname}!".

Context

We are testing your ability to implement modern automated infrastructure, as well as general knowledge of system administration. In your solution you should emphasize readability, maintainability and DevOps methodologies.

Submit your solution

Create a public Github repository and push your solution in it. Commit often - we would rather see a history of trial and error than a single monolithic push. When you're finished, send us the URL to the repository.

Running this web application

This is a NodeJS application: This is a NodeJS application:

  • npm test runs the application tests - npm test runs the application tests
  • npm start starts the http server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 88.6%
  • Shell 6.7%
  • JavaScript 4.7%