Introduction

The task for an interview on a DevOps position

Introduction

Looking for an experienced DevOps System Engineer is a challenging task, because it is usually difficult to estimate all aspects of a person’s knowledge.

Technical interviews can reveal some strong and weak sides of a candidate, but sometimes they leave some open questions about real experience. And if we are talking about real routine tasks - it’s not only about knowledge, but also about skills to perform different kinds of tasks using manuals, docs, and even Google.

So, the main goal of this test task - is to find out how a candidate can perform typical DevOps engineer tasks, adopting fresh-written applications to run in infrastructure and to be deployed as a production environment.

Also, this task shouldn’t take more than ~4 hours.

Application

How it should look: Running Demo.

Preview

All files you need - are in this GitHub repository. Just clone it from GitHub.

This app was written in Python, and it is pretty simple. Why Python? In my own opinion, this is one of the languages that any Linux engineer should know. But this task is not about programming, so if you don’t know Python and are skilled in Bash - It’s ok.

Requirements:

All this App does - counts unique visitors and shows this statistic. All it needs is a running database.

So, this app has some endpoints:

Files description

Installation

To install the application, several steps should be completed:

For the last step, you can use different approaches - just choose one from official docs.

Configuration

As for any Docker-ready application - It can be easily configured via environment variables. So, here is a list of them:

Task

So, now we can talk about the goals. I’m writing just a roadmap, and any step is optional but will give additional points if is done correctly. If you are good in docs - spend more time on writing good documentation, if you have good experience in clouds - write a scalable, fault-tolerant, and cloud-ready solution. Feel free to choose your way and show your best.

An ideal solution should be fulfilled as a git repository, which will contain all Infrastructure-related code (IaC), scenarios, diagrams, and documentation as a main README.md file.

Infrastructure

I think the best option for this is Terraform. But you can also use Ansible or Chef, or any tool you want. It will be great if your solution can be used from the box to start the whole stack on a cloud provider (AWS, GCP, Azure, AlibabaCloud, etc.).

Containerisation

Dockerfile - should be included, but it isn’t, because the developer of the app was too lazy for this task… So, it will be the first step to build a container with this app - writing Dockerfile and making the first docker build.

Analysis

All tools you need for this section are in the requirements.test.txt file, which can be easily used with pip install -r requirements.test.txt.

CI/CD

At this stage you already have a project, that can be built and verified for some kind of issues. It’s time to automate it.

Choose one of the CI/CD systems you like:

And of course, don’t forget about:

Monitoring

Just prepare some examples, of how this app could be monitored. Docker Healthchecks or rules on AWS Route53 - anything will be accepted as a solution.

Documentation

Documentation should include key points such as:

Also, you may write additional docs like:

To draw diagrams you can use Draw.io, CloudCraft or even ASCII Art. Include them in your repository too.

Fixes?

There are some problems with app architecture. If you have a solution - it will be great!

Questions?

If you still have some questions about this task, feel free to ask me.

License

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.