• SKlearn is a Machine Learning Microservice application that predict housing prices through API calls including several features, such as average rooms in a home and data about highway access, teacher-to-pupil ratios, and so on.
Project instructions: • Note: This project is provided using AWS cloud9 and Ubuntu 18 EC2 instance.
- Create a project working directories using mkdir command.
- Create python3 virtual environment using python3 -m venv /path/to/new/virtual/environment
- Clone project files from Github in another directory using git clone url.git through ssh or HTTPs
- Modifying bashrc file to create alias command for virtual environment activation using alias devops="cd /home/ubuntu/environment/devops/ && source ~/.devops/bin/activate"
- Copy all project files from downloaded repo to the project working directory.
- Activate virtual environment.
- Install dependencies through make install command.
- Linting code through make lint.
- Running docker script.
- Build docker from local image.
- Running make prediction script.
- Upload docker image to Docker Hub repo using upload_docker script.
- Install kubectl and minikube to run kubernetes locally.
- Run run_kubernetes script.
- Run prediction script to get result for local pod.
- Configuring circleci to test project code.
GitHub repo files: [email protected]:mohamedrafaat1/devops.git • Dockerfile: including required info to build docker. • Makefile: to install all requirement packages and create virtual environment • Requirements: include all required packages to be installed automatically. • Run_docker: its descriptive script to run docker. • Run_kubernetes: its descriptive script to run kubernetes. • Upload_docker: to upload local docker image to docker hub repo. • Config.yml: yaml configuration file that include all instructions to test this project through circleci website.
Docker Hub Repo: "mohamedrafaat/sklearn-img"