2. Agenda
âą An Introduction to Linux Containers
âą An Introduction to Docker
âą An Introduction to Kubernetes
âą Deploying WSO2 products on Kubernetes
âą Carbon cluster discovery on Kubernetes
âą Monitoring server health
âą Artifact distribution
âą Propagating software updates
âą Load balancing with Nginx
âą Demo
3. Agenda
âą App Factory and WSO2 App Cloud
âą Creating applications and uploading existing apps
âą Hosting web applications and API backends
âą Using databases in the Cloud
âą Coding and debugging applications with Cloud IDE or
desktop tools
âą Application lifecycle management
âą Custom URLs
âą Teamwork and social development
âą Issue and task tracking
12. Introduction to Docker
â Started as an internal project
within dotCloud
â Initial release in March 2013
â Initially used libvirt, LXC &
systemd-nspawn
â Introduced libcontainer: A
standard interface for Linux
containers
https://en.wikipedia.org/wiki/Docker_(software)
17. Why Container Clusters?
âą Avoid single point of failure
âą Make horizontally scalable
âą Have more granular
management for distributed
applications (microservices)
âą Self healing systems
http://googlecloudplatform.blogspot.com/2015/01/what-makes-a-container-cluster.html
[image ref] https://www.docker.com/what-docker
20. Kubernetes Pods
â A group of containers which can share
resources and context
â Shared namespaces:
â PID namespace (processes visible
globally)
â network namespace (same IP and port
space)
â IPC namespace (SystemV IPC or POSIX)
â UTS namespace (share a hostname)
Pod
C1 C2 C3
http://kubernetes.io/v1.0/docs/user-guide/pods.html
21. Kubernetes Labels & Selectors
â Labels are key/value pairs
attached to objects
â Selectors use the label key to
find a collection of objects
matched with the same value
â L1 -> ClusterID = C1
â L2 -> ClusterID = C2
Pod 1
http://kubernetes.io/v1.0/docs/user-guide/labels.html
L1
Pod 2
L1
Pod 3
L1
Pod 3
L2
Pod 4
L2
22. Pod
Template
Replicas = n
Kubernetes Replication Controllers
â Provides features for replicating
pods:
â Auto-healing
â Scaling
â Rolling updates
â Multiple release tracks Pod 1
http://kubernetes.io/v1.0/docs/user-guide/replication-controller.html
Pod 2 Pod n
Replication
Controller
23. Node IP: 172.17.8.102
Port: 9443
Domain Name: service1
IP: 10.2.10.20
Port: 9443
NodePort: 32001
Protocol: TCP
Kubernetes Services
â Nginx based load balancing rules
â Service types:
â ClusterIP (default)
â NodePort
â LoadBalancer
â Service discovery:
â DNS
â Environment variables
â Session Affinity
Pod 1
http://kubernetes.io/v1.0/docs/user-guide/services.html
Pod 2 Pod n
Service
L1
L1 L1 L1
Node
24. â A distributed key value store
â Read and write values with curl
and other HTTP libraries
â Store data in directories, similar
to a file system
â Watch a key or directory for
changes and react to the new
values
https://coreos.com/etcd/
etcd
25. â A software defined network
â Runs an agent, flanneld, on each
host
â Uses etcd to store the network
configuration, allocated subnets,
and auxiliary data (host ips)
https://github.com/coreos/flannel
flannel
27. Carbon Cluster Discovery on
Kubernetes
Pod 1 Pod 2 Pod n
Service
Server 1 Server 2 Server n
Pod 1
Service
Server 1
Pod 1 Pod 2
Service
Server 1 Server 2
Hazelcast member
initialization
Hazelcast member
initialization
Hazelcast member
initialization
1 2 n
28. WSO2 Carbon Reference Architecture
for Kubernetes
Pod 1 Pod 2
Manager Cluster
Services
Pod 3 Pod 4 Pod n
Worker Cluster
Services
Manager
Replication
Controller
Worker Replication
Controller
Client
Gov
Reg
Conf
Reg
User
Store
29. WSO2 Configurator
A python module written using
Jinja2 template engine for
configuring a product using a set of
key/value pairs.
40. Demo Time!
âą App Factory and WSO2 App Cloud
âą Creating applications and uploading existing apps
âą Hosting web applications and API backends
âą Using databases in the Cloud
âą Coding and debugging applications with Cloud IDE or
desktop tools
âą Application lifecycle management
âą Custom URLs
âą Teamwork and social development
âą Issue and task tracking