Giter Site home page Giter Site logo

rogamboa / microservice-containerization Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 218 KB

A project demonstrating containerizing a machine learning microservice and deploying it using kubernetes

Dockerfile 5.74% Makefile 17.59% Python 41.80% Shell 34.87%

microservice-containerization's Introduction

Microservice Containerization

CircleCI

Project Summary

This project demonstrates the process of containerizing a machine learning microservice using docker and deploying this microservice via kubernetes.

Project Folders and Contents

  • application - contains files related to microservice
    • Dockerfile
    • Makefile
    • app.py
    • requirements.txt
    • model_data
  • scripts
    • make_prediction.sh - script to test microservice deployment
    • run_docker.sh - script to build docker image and run image on docker locally
    • run_kubernetes.sh - script to deploy docker image on to a kubernetes cluster
    • upload_docker.sh - script to upload newly created docker image
  • .circleci
    • config.yml - contains circleci ci/cd configuration to run build tests
  • output_txt_files
    • docker_out.txt - example output from running prediction on microservice on local docker
    • kubernetes_out.txt - example output from running prediction on microservice on kubernetes

Usage

Prerequisites

The following steps require the following environment variables to be set. (Alternatively, these variables can be directly substituted within the scripts themselves)

Environment Variables

  • DOCKERPATH - path to docker image (ex: repo/name:tag)
  • USERNAME - dockerhub username
  • PASSWORD - dockerhub password
  • IMAGE_ID - image id after building docker image running run_docker.sh

Steps

  1. Change working directory to scripts folder
  2. Run ./run_docker.sh
  3. Run ./upload_docker.sh
  4. Optional: Run ./make_prediction.sh to test microservice running locally in docker
  5. Run ./run_kubernetes.sh
  6. Optional: Run ./make_prediction.sh to test microservice running on kubernetes

microservice-containerization's People

Contributors

rogamboa 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.