Skip to content

MikolajKasprzak/interview_task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

interview_task

Project contains:

  • Specialized software application.py
  • Python script run.py (works in python 2.7 and python 3.9 environment) that will run application.py and generate artifacts in persistence volume.
  • Docker images for each of python version 2.7 and 3.9
  • Helm chart with create Cron Job that create pod and necessary volumes

Configuration file is in interview_task/project_verifier/values.yaml where is possible to configure: how often run application, select nodes etc.

Possible improvements:

  • Create additional container that will fetch results from application and upload it on (for example) to block storage or artifactory.
  • Describe chart in Chart.yml
  • Make proper documentation of script run.py

Tech

Solution use following technologies:

  • Kubernetes 1.22 (tested on Minikube version 1.24)
  • Docker
  • Helm 3.x

Requirements:

  • K8s cluster with at least one worker node (for example minikube)

Usage

  • Build docker images
docker build -t project_verifier:python2 -f project_verifier_app/DockerfilePython2 ./project_verifier_app/
docker build -t project_verifier:python3 -f project_verifier_app/DockerfilePython3 ./project_verifier_app/
  • Push images to Kubernetes repository, example for minikube
minikube image load project_verifier:python2
minikube image load project_verifier:python3
  • Configure deployment: Names, How often run application etc
./project_verifier/values.yaml
  • Deploy application using helm chart
helm install <name> ./project_verifier
  • Delete application WARNING it will delete persitance volume that contains results
helm delete <name>

Example output

Application create for every run folder with following convention YYMMDDHHMMSS_py{version of python like 2 or 3} and two files stdout.txt and version.txt. The folder will be created in persistance volume.

stdout.txt content

2021-11-08T18:03:01.334252+01:00

version.txt content

Python 2.7.18

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages