Giter Club home page Giter Club logo

istio-seldon-canary's Introduction

Canary Roll Out using Seldon-Core and Istio

This folder provides resources to illustrate how to do a canary roll out of one MNIST model to another using the canary pattern where a small amount of traffic is sent to the new model to validate it before sending all traffic to the new model.

There is a Jupyter Notebook that provides a step by step demo.

conda create -n canary python=3.6
conda activate canary
pip install seldon-core>=0.2.6.1
jupyter notebook  --no-browser  --allow-root --ip `hostname -i`   --port 8890

kubectl create namespace seldon
kubectl config set-context $(kubectl config current-context) --namespace=seldon

cd workspace/seldon-core/examples/istio/canary_update/    

kubectl create -f ../../../notebooks/resources/seldon-gateway.yaml
k get gateways.networking.istio.io 
k describe gateways.networking.istio.io

kubectl label namespace seldon istio-injection=enabled

INGRESS_HOST=`kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}'`
INGRESS_PORT=`kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}'`
ISTIO_GATEWAY=$INGRESS_HOST:$INGRESS_PORT
echo $ISTIO_GATEWAY

helm install seldon-core-operator --name seldon-core --repo https://storage.googleapis.com/seldon-charts --set usageMetrics.enabled=true --namespace seldon-system --set istio.enabled=true --set istio.gateway=istio-ingressgateway
kubectl rollout status deploy/seldon-controller-manager -n seldon-system

kubectl apply -f mnist_v1.json
kubectl rollout status deploy/mnist-deployment-sk-mnist-predictor-73d7608

#kubectl label nodes $(kubectl get nodes -o jsonpath='{.items[0].metadata.name}') role=locust
kubectl label nodes node4  role=locust

helm install ../../../helm-charts/seldon-core-loadtesting --name loadtest  \
--namespace seldon \
--repo https://storage.googleapis.com/seldon-charts \
--set locust.script=mnist_rest_locust.py \
--set locust.host=http://$ISTIO_GATEWAY \
--set rest.pathPrefix=/seldon/seldon/mnist-classifier \
--set oauth.enabled=false \
--set oauth.key=oauth-key \
--set oauth.secret=oauth-secret \
--set locust.hatchRate=1 \
--set locust.clients=1 \
--set loadtest.sendFeedback=1 \
--set locust.minWait=0 \
--set locust.maxWait=0 \
--set replicaCount=1 \
--set data.size=784

istio-seldon-canary's People

Contributors

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