Skip to content

Instantly share code, notes, and snippets.

@moretea
Last active March 28, 2017 12:11
Show Gist options
  • Select an option

  • Save moretea/33414f867ca70adb544d7832ab153d2a to your computer and use it in GitHub Desktop.

Select an option

Save moretea/33414f867ca70adb544d7832ab153d2a to your computer and use it in GitHub Desktop.
Habitat demo

How to demo hab on k8s.

  1. Start the ui (see script), open UI window
  2. Download the reset.sh and run it
  3. get the url for the guestbook, open UI window
  4. Show off resiliance by killing pods in the UI, after 5 kills the quorum is lost See this gist for details why
  5. When it inevitably loses quorum, run reset.sh again.
# Delete everything
kubectl delete deployment guestbook
kubectl delete deployment redis-ha
kubectl delete statefulset hab-sup-bootstrap-set
kubectl delete svc hab-bootstrap
kubectl delete svc redis-master
kubectl delete svc redis-slave
kubectl delete svc guestbook
# Create the stable endpoint
kubectl apply -f https://raw.githubusercontent.com/ContainerSolutions/bootstrap-habitat-supervisors-on-k8s/master/bootstrap-hab-sup-on-k8s.yml
# Run redis
kubectl apply -f https://raw.githubusercontent.com/ContainerSolutions/habitat-redis-ha-cluster-on-k8s/master/hack/redis.yml
# Run the guestbook
kubectl apply -f https://raw.githubusercontent.com/moretea/habitat-guestbook/master/guestbook.yml
# Make sure that minikube is started first
kubectl apply -f https://raw.githubusercontent.com/ContainerSolutions/kuberviz/master/k8s-viz.yml
minikube service k8s-viz --url
minikube service guestbook --url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment