Code Monkey home page Code Monkey logo

alx-cdo-project-04-microservice's Introduction

CircleCI

Project Overview

This project involves operationalizing a machine learning microservice API. The API was built using Python and Flask (a python web framework). The API basically predicts housing prices in Boston using a provided pre-trained scikit-learn model. You can read more about the data, which was initially taken from Kaggle, on the data source site

Project Tasks

Your project goal is to operationalize this working, machine learning microservice using kubernetes, which is an open-source system for automating the management of containerized applications. In this project you will:

  • Test your project code using linting
  • Complete a Dockerfile to containerize this application
  • Deploy your containerized application using Docker and make a prediction
  • Improve the log statements in the source code for this application
  • Configure Kubernetes and create a Kubernetes cluster
  • Deploy a container using Kubernetes and make a prediction
  • Upload a complete Github repo with CircleCI to indicate that your code has been tested

You can find a detailed project rubric, here.

The final implementation of the project will showcase your abilities to operationalize production microservices.


Setup the Environment

  1. Create a virtualenv with Python 3.7 and activate it. Refer to this link for help on specifying the Python version in the virtualenv.
$ python3 -m pip install --user virtualenv
# You should have Python 3.7 available in your host. 
# Check the Python path using `which python3`
# To create the virtual environment 
$ python3 -m venv ~/.devops 
# To activate the virtual environment 
$ source ~/.devops/bin/activate
  1. Run make install to install the necessary dependencies

Running app.py

  1. Standalone: python app.py
  2. Run in Docker
# Ensure you have docker installed 
$ chmod +x run_docker.sh 
$ ./run_docker.sh
  1. Run in Kubernetes
# Ensure you have kubectl installed and minikube for creating a local Kubernetes cluster 
$ chmod +x run_kubernetes.sh 
$ ./run_kubernetes.sh
  1. Upload the docker image to dockerhub
$ chmod +x ./upload_docker.sh 
$ ./upload_docker.sh 

Kubernetes Steps

  • Setup and Configure Docker locally
  • Setup and Configure Kubernetes locally
  • Create Flask app in Container
  • Run via kubectl

Submission requirements

alx-cdo-project-04-microservice's People

Contributors

rexsimiloluwah avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.