DevOps Engineer Task
The below instructions are compatibe with and tested on Debian 13.
Use the automated setup script or proceed with manual setup described below:
curl -sL https://raw.githubusercontent.com/Amirbekyan/devops-task/refs/heads/main/src/setup.sh | sudo bash
- Install
gitandansible
apt update && apt upgrade -y
apt install -y git ansible
- Clone this repo:
git clone https://github.com/Amirbekyan/devops-task.git
cd devops-task
- Install prerequisites:
ansible-playbook -i localhost src/ansible-minikube.yml
- Run Terraform code:
Important
Copy terraform.tfvars.sample to terraform-tfvars and update values with real ones before applying the code.
Tip
Webhook.site can be used to generate temporary webhook URLs for testing. GitHub credentials are optional for this repo as it's public.
tofu init
tofu apply
- Pre-build
devops-tasklocal image tagsalphaandbravofor CD demo:
ansible-playbook -i localhost src/ansible-docker-build.yml
- Add records for ingress hostnames in
/etc/hoststo point to Minikube host address:
<host-ip> preview.hello.devops-task hello.devops-task argocd.devops-task grafana.devops-task alert.devops-task prometheus.devops-task
Congratulations! You've successfully set up the devops-task environment.
Here are the endpoints we've setup so far:
-
Grafana Grafana visualizes metrics, logs and traces, checkout:
- Dashboards for metrics
- Explore or Dilldown for logs and traces
-
Prometheus Prometheus is used to collect and store metrics, as well as triggering alerts, checkout 'Alerts' page for configured alerts.
The screenshot above shows that an alert will be triggered each time percentage of 4xx requests exceeds 5% of all requests.
-
Alert Manager Alert Manager handles alerts routing and notifications.
-
ArgoCD We'll use ArgoCD to deploy our Sample App to Minikube in the next step. ArgoCD will send alerts to the same channels as Alert Manager in case of application creation, updates, degradation, deletion and sync issues.
-
Sample App new version preview Sample App current (and preview - in case of Rollout) home pages
Head to ArgoCD page and create an app with this params:
- applicaton name:
<name-of-your-choice> - project name:
default - sync policy:
Automatic - sync options:
Auto-Create Namespace - repository url:
https://github.com/amirbekyan/devops-task.git - revision:
HEAD - path:
app/chart/olleh - cluster url:
https://kubernetes.default.svc - namespace:
<namespace-of-your-choice> - parameters:
- image.tag:
alpha - ingress.enabled:
true - rollout.enabled:
true - replicaCount:
3
- image.tag:
project: default
source:
repoURL: https://github.com/amirbekyan/devops-task.git
path: app/chart/olleh
targetRevision: HEAD
helm:
parameters:
- name: replicaCount
value: '3'
- name: ingress.enabled
value: 'true'
- name: rollout.enabled
value: 'true'
- name: image.tag
value: alpha
destination:
server: https://kubernetes.default.svc
namespace: olleh
syncPolicy:
automated: {}
syncOptions:
- CreateNamespace=true
This will create an Argo Rollout runnin 3 instances of our sample app.
We can check if the logs and traces show up in Grafana:
Let's now update the image tag to bravo:
It'll create another replicaset, replicas of which are available through the preview service and ingress:
Our strategy is designed to pause the promotion to the newer version, so once the new replicaset is healthy, we'll be able to promote or drop the new version.
After full promotion, the new version will be available under http://hello.devops-task:32080/
Initially I planned to setup Argo Events and Argo Workflows to build the sample app images continuously on the Minikube itself. Unfortunately I was short in time due to my travel to US to attend KubeCon & CloudNativeCon NA 2025. So I decided to mock the CI part with an Ansible playbook instead. Peachy greetings from Atlanta 🍑🙂.
















