Giter Site home page Giter Site logo

waterwheel31 / devops_docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 4.81 MB

Kubernetes deployment excercise. This is a project of Udacity Cloud DevOps Nanodegree

Dockerfile 4.91% Makefile 12.53% Python 47.91% Shell 34.65%
kubernetes docker devops circleci

devops_docker's Introduction

DevOps_docker

Repository used for docker project of Udacity Cloud DevOps Nanodegree.

CircleCI

Steps

  1. Make the Dockerfle
  2. Run container & make prediction and make log

The log of the prediction is as below

<docker_out.txt>

[2020-04-12 11:33:06,257] INFO in app: JSON payload: 
{'CHAS': {'0': 0}, 'RM': {'0': 6.575}, 'TAX': {'0': 296.0}, 'PTRATIO': {'0': 15.3}, 'B': {'0': 396.9}, 'LSTAT': {'0': 4.98}}
[2020-04-12 11:33:06,267] INFO in app: Inference payload DataFrame: 
   CHAS     RM    TAX  PTRATIO      B  LSTAT
0     0  6.575  296.0     15.3  396.9   4.98
[2020-04-12 11:33:06,275] INFO in app: Scaling Payload: 
   CHAS     RM    TAX  PTRATIO      B  LSTAT
0     0  6.575  296.0     15.3  396.9   4.98
[2020-04-12 11:33:06,278] INFO in app: Output prediction: [20.35373177134412]
172.17.0.1 - - [12/Apr/2020 11:33:06] "POST /predict HTTP/1.1" 200 -
  1. Update the Docker Image

    • Go to ECR, and create a repository (if not exist)
    • Retrieve an authentication token and authenticate the Docker client aws ecr get-login --no-include-email --region us-east-1
    • Paste and run the token on the command line to certificate (long token, copy and paste)
    • run bash upload_docker.sh
  2. Configure Kubernetes to run locally

  3. Deploy the cluster online

    • Setup kubectl
    • Run bash run_kubenetes.sh to run kubernetes cluster (this may take several minutes)
  4. Make prediction

    • Run make_prediciton.sh on another terminal. Results are following
<kubernetes_out.txt>
NAME                            READY   STATUS    RESTARTS   AGE
udacity-kube7-8fc55f594-8b792   1/1     Running   0          4m51s
step4
Forwarding from 127.0.0.1:8000 -> 80
Forwarding from [::1]:8000 -> 80
Handling connection for 8000
JSON payload:
{'CHAS': {'0': 0}, 'RM': {'0': 6.575}, 'TAX': {'0': 296.0}, 'PTRATIO': {'0': 15.3}, 'B': {'0': 15.3}, 'B': {'0': 396.9}, 'LSTAT': {'0': 4.98}}
[20.35373177134412]

devops_docker's People

Contributors

waterwheel31 avatar

Watchers

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