MSSE SENG 5199

Course Materials for the MSSE Web Application Development Course

theme: Next, 3

The Cloud

MSSE 2017


Goals


Lots of different cloud providers


Common concepts of distributed computing


Service discovery


Virtual Machines


Containers


Tools for building/deploying to VMs

Spinnaker


Tools for building/deploying to VMs

Packer


Workflow for Spinnaker/Packer Deployment


Kubernetes


Kubectl


Kubernetes concepts


Pods


Running our application in Kubernetes


Tagging

docker tag ubuntu us.gcr.io/crucial-cabinet-133423/ubuntu

Push Image


gcloud docker -- push us.gcr.io/crucial-cabinet-133423/ubuntu


Create a cluster and run


gcloud container clusters create example-cluster


minikube start


Running cont.


kubectl run msse --image=us.gcr.io/crucial-cabinet-133423/msse:latest --port=8080
kubectl expose deployment msse --type="LoadBalancer"

kubectl get services


Running in Kubernetes


Deployment


apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80

Service


kind: Service
apiVersion: v1
metadata:
  name: my-service
spec:
  selector:
    app: MyApp
  ports:
    - protocol: TCP
      port: 80
      targetPort: 9376


Ingress


apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  rules:
  - http:
      paths:
      - path: /testpath
        backend:
          serviceName: test
          servicePort: 80