Skip to content

Wiredcraft/test-devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

Wiredcraft DevOps - Modular Test

Preamble

Working at DevOps team you will need to have a wide range of IT skills, main areas are:

  • infrastructure and networking
  • CI/CD tools
  • microservice architecture and Kubernetes
  • configuration managements and automation
  • system administration
  • IT security
  • SRE

The mindset and ability to think out of the box is a critical asset for DevOps. We don't expect everyone to know everything about everything, but we need them to have the mindset and critical thinking to dig into issues. We expect the DevOps engineers to use their skills to overcome difficulties and come with solutions or approaches to solutions.

This is the reason the target of this task is quite broad and may involve technologies you may not (yet) be familiar with.

Background

The purpose of this test is to:

  • evaluate your technical knowledge
  • evaluate your communication with the team
  • evaluate your ability to learn

Test description

This modular test consists of few stand alone tasks. We believe that interview tests shouldn't be a whole day project, so we allow you to choose any number of task you want to work on and submit finally.

Task 1. Scripting language

Technical stack

Here is the list of the technologies that we use at Wiredcraft and want you you to use in this task:

  • Python
  • Shell scripting
  • (Golang)
  • (NodeJS)

Task description

You got a log file from production which is related to the action id. It includes two parts:

  • first line replaced which is an array of user object.
  • second line actionId which is an int action id for the replaced users.

e.g.

replaced = [{"id":"f4043b03-fc59-4d5a-afc7-df79af45dbdf","status":"finished","accexp":20},{"id":"f4043b03-fc59-4d5a-afc7-df79af45dbdf","status":"finished","accexp":10}]
actionId = "795571"

Because a bug on prod, some lines got the wrong data in replaced: the last object becomes a string ongoing, e.g.

replaced = [{"id":"2de9f3f5-79d3-4ce6-9a27-e1b74d1c87af","status":"finished","accexp":10},"ongoing"]
actionId = "1798537"

Now you need to prepare a script that will:

Deliverables

  • the script to output the actionIds for those wrong replaced lines
  • doc to explain your script

Task 2. Configuration management

Technical stack

Here is the list of the technologies that we use at Wiredcraft and want you you to use in this task:

  • Ansible

Task description

You need to spawn a fresh server for a new project consisting of: API service, database. For simplicity limit this setup to 1 server only. Create an Ansible projects with sample inventory and playbooks for:

  • initial setup of the server(good linux user/sshd config)
  • database of your choince
  • deployment of API (you don't need to build a real API service, imaging it's already built and is stored on company private rigestry registry.wcl.com/wcl/api:latest with fake registry credential username: demo passwrod: demo ), and this API service needs some env vars:
    • DB_URL : database url, e.g. http://localhost:8091
    • DB_USERNAME : database user
    • DB_PASSWORD : database password
  • configuration of a web server(e.g. Nginx or any other web server) to point to API service (assume port 3000is used)
  • any maintenance setups (database backups)

Deliverables

  • ansible playbook which includes:
    • init server
    • setup API service/database/web server

Task 3. Infrastructure as a code

Technical stack

Here is the list of the technologies that we use at Wiredcraft and want you you to use in this task:

  • Terraform

Task description

You need to spawn an infrastructure for new company project from Task 2. Please create a Terraform project with cloud provider of your choice. It should includes at latest :

  • Netowrk (VPC)
  • Servers

NOTE: finishing task 2 is not required for this task

Deliverables

  • Terraform script which includes:
    • init setup
    • setup for VPC
    • setup for server

Task 4. Docker and a bit of Dev

Task description

Your need to create and conternize a simple API service. The API has two endpoints for welcome message:

  • GET /welcome returns Hello, <name>!, if not exist name then returns Hello, Wiredcraft!
  • PUT /welcome with body {"name": "<name>"}, which changes the name string

Obvs it should connect to a database, You can use any database you want(Redis/Mongo/Mysql/Postgres/SQLite). And it should also use cache:

  • if the name exist , then don't query from database

Deliverables

  • an API codebase includes those two endpoints

  • an API Spec (Swagger or OpenAPI) for it

  • Dockerfile to containerize your API

You can use Python/Golang/NodeJS and whatever framework you like.

Task 5. Kubernetes

Task description

For the mock API from Task 4 your need to write k8s object definition for the following:

  • service for API service
  • deployments for API service and the database
  • hpa for API service

You may also need the pv/pvc for database and configMap/sercret for the API service.

Deliverables

  • Kubernetes config file for:

    • service

    • deployments

    • hpa

    • pv/pvc

    • configMap

    • sercret

    • ingress(optional)

Task 6. CI/CD

Technical stack

Here is the list of the technologies that we use at Wiredcraft and want you you to use in this task:

  • Github Actions
  • Azure DevOps pipelines

Task description

Crate CI pipeline that would run any of:

  • unit tests suite for the API from Task 4 on Pull Requests,
  • Build docker image on Pull Request merge

Also, Create CD pipeline that would do any of:

  • deploy new version of the API from Task 4 with any trigger of your choice (assume that deployment service is a stand alone Docker container running on a host server)

Deliverables

  • CI configration file

What We Care About

Feel free to schedule your work, ask questions.

We're interested in your method and how you approach the problem just as much as we're interested in the end result.

Here's what you should aim for:

  • Use git to manage code
  • Comments in your scripts
  • Comments in your playbooks
  • Clean README file that explains how things work
  • Extensible work / code (use variables, limit hardcoded values, etc.)

FAQ

Where should I send back the result when I'm done?

Fork this repo and send us a pull request when you think it's ready for review. You don't have to finish everything prior and you can continue to work on it. We don't have a deadline for the task.

What if I have a question?

Create a new issue in the repo and we will get back to you shortly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published