Kayrros devops tests
- Provide deliverables as a tarball or zip file
- petclinic-native_latest.tar.gz (docker)
- https://github.com/AlbanAndrieu/spring-petclinic/releases/tag/helm-petclinic-1.0.0 (helm chart)
- Manage code with git and make sure the history is clean
- I missed a bit time to clean/squash my commit.
- Prefer Python or Go for any scripting need
- Python is for sure tmy targetted language
- Would be happy to lean GO
- Prefer Terraform for any Infrastructure as Code need
- This test gave me the occasion to play with terraform. Thanks...
- Document everything, at least with READMEs
- READMEs are my entrypoint for doc, as you can see on my github projects
- Provide code testing where relevant
- Write code following coding best practices
- With more time, I would
- The level of details given is part of the test, do your best with what you have.
- This tests without infra takes time...
As equivalent to PetClinic, Please look at Sample. A Java/Javascript project equivalent that I am using since years to test CI/CD new features and stability of CI/CD. This project is working on Rancher cluster and AKS.
- Create an EKS cluster
Based java-app-deployment-to-aws-eks-with-terraform
terraform init
terraform validate
terraform fmt
terraform plan
terraform apply
- For Dev I am configuring workstation on Ubuntu LTS using microk8s
- Dev and QA clusters have k8s clusters using VM and rancher. k8s nodes are provisionned using ansible. Docker images and charts are on Harbor
- We are currently migrating to AKS and ACR
- My personnal AWS account is locked. I tried to recreate one but credit card is not working. So petclinic helm chart have been tested on my workstation (Ubuntu LTS with microk8s)
To conclude, I did manage to create AKS managed cluster at petclinic-native. BTW AWS is not free... But tool is great.
I used hub.docker.com instead of ECR... And Github to store my chart.
terraform show
- Adapt PetClinic application to run on the previously created cluster
I have created a fork of PetClinic which is PetClinic. History is not cleaned. Sorry.
git submodule add --force https://github.com/AlbanAndrieu/spring-petclinic.git
- Integrate(a dummy test is fine) and deploy using any CI/CD tool
-
As a sample project, you can look at : https://github.com/AlbanAndrieu/nabla-projects-interview-visma, previously deployed with docker-compose on Jenkins and many other java projects, where I have added many tests (unit tests, integration, frontend, perf)... Feel free to ask.
- My personal OLD Jenkins is running on my FreeNAS and has been configured with an ansible playbook, based on ansible-galaxy playbook (https://github.com/Stouts/Stouts.jenkins). Most of playbooks are coming from open source worlds to avoid reinventing the wheel
- New Jenkins architectes is using equivalents to Docker slave images for slaves to build Java/Cpp/Javascript/Python projects. And is deployed on k8s (jenkins-deployment.yaml
- In order to deploy helm package/install (with docker build) I have create a jenkins libs JPS
- Other CI/CD Tools
- I used to use Travis ci and Docker Hub, and trying now GitHub Actions.
I used this techinical tests to work on github action, as it seems to evolve quicly, so that you will see maven build, then docker and helm charts creation. Unfortunalty I did not manage to deploy.
- Testing
- I used to be C++/Java developper and as a DevOps I test frameworks for all the stack. Unit tests Junit / Integration tests Maven Cargo / EndToEnd test (Selenium) / Performance tests for Java. CPPUnit for C++. And DevOps for Javascripts (Karma, Protractor)/Python (Tox/Pytest) now...
- Security tests (Checkmarx, Aqua, WhiteSource, Bandit)
- Quality and Best pratices
- I am using mostly sonarcloud and Linter (For code, docker, k8s) and pre-commit before going to CI.
-
- Deployement
- Old deployment is using docker-compose on Jenkins using shell
- New deployment is using helm charts
- I do no really to plan to deploy services with terraform. Helm seems fins for that. But it a great tool to create kubernetes clusters (I guess, because it did not work for me).
- Make sure your deliverables are working out of the box
- As a sample I have adapted frontend javascript project to be deployed on k8s : https://github.com/AlbanAndrieu/nabla-servers-bower-sample/tree/master/packs, previously deployed with docker-compose on Jenkins and many other java projects as standalone.
Petclinic charts are working HELM out of the box.
Below should work on you cluster, if you can access docker hub...
helm install --kubeconfig ${HOME}/.kube/config --kube-context microk8s my-petclinic helm-petclinic-1.0.0.tgz --timeout 5m0s --wait --atomic --replace
To conclude I did basic CI, but not CD for this tests. But I can show you that I do CD at work...
Pick a subject below and write a 500-1000 words essay
- How has DevOps changed the way we deploy applications?
- What is the difference between DevOps and SRE?
- What is the right balance between Public and Private Cloud?
- What do you think is the next big game-changer in IT infrastructures?
I will choose subject 1.
See ESSAY
- Provided the code below, please provide extensive answers to the listed issues
- When running this script, Python is unable to find the imported modules
- The following error keeps coming up: "boto3 client NoRegionError: You must specify a region" when connecting to SSM and RDS
- When the DB is created, privileges aren't working as expected
- Provide an updated version of the script migrated to PostgreSQL.
See PYTHON
aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin 172728779084.dkr.ecr.eu-central-1.amazonaws.com/petclinic-native
#docker pull nabla/petclinic-native:latest
docker tag nabla/petclinic-native:latest 172728779084.dkr.ecr.eu-central-1.amazonaws.com/petclinic-native
docker push 172728779084.dkr.ecr.eu-central-1.amazonaws.com/petclinic-native:latest
Replace nabla/petclinic-native:latest by 172728779084.dkr.ecr.eu-central-1.amazonaws.com/petclinic-native:latest in kubernetes.tf