- Wiredcraft DevOps - Modular Test
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.
The purpose of this test is to:
- evaluate your technical knowledge
- evaluate your communication with the team
- evaluate your ability to learn
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.
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)
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 thereplaced
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:
- output all actionIds for those wrong
replaced
lines in log file test-1-action-ids.log - the output is supposed to be a sorted plain text, one actionId per line. means your script output should be the same as test-1-action-ids-output.txt
- the script to output the actionIds for those wrong replaced lines
- doc to explain your script
Here is the list of the technologies that we use at Wiredcraft and want you you to use in this task:
- Ansible
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:8091DB_USERNAME
: database userDB_PASSWORD
: database password
- configuration of a web server(e.g. Nginx or any other web server) to point to API service (assume port
3000
is used) - any maintenance setups (database backups)
- ansible playbook which includes:
- init server
- setup API service/database/web server
Here is the list of the technologies that we use at Wiredcraft and want you you to use in this task:
- Terraform
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
- Terraform script which includes:
- init setup
- setup for VPC
- setup for server
Your need to create and conternize a simple API service. The API has two endpoints for welcome message:
GET /welcome
returnsHello, <name>!
, if not exist name then returnsHello, 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
-
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.
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.
-
Kubernetes config file for:
-
service
-
deployments
-
hpa
-
pv/pvc
-
configMap
-
sercret
-
ingress(optional)
-
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
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)
- CI configration file
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.)
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.