HUAWEI TECHNOLOGIES CO., LTD.
Cloud Foundry
Integration with
Openstack & Docker
Krishna M Kumar
Lead Architect
Bangalore Cloud Foundry Meetup – 28th Mar 2015
HUAWEI TECHNOLOGIES CO., LTD. 2
Whats’ it?
Openstack
Cloud Foundry
Docker
How’s it?
Openstack + Docker
Openstack + Cloud Foundry
Cloud Foundry + Docker
Contents
HUAWEI TECHNOLOGIES CO., LTD. 3
HUAWEI TECHNOLOGIES CO., LTD. 4
Leading Open Source Players in the Cloud
Automates the deploymentof applications inside software containers
https://www.docker.com/
Courtesy: The Making of a Cloud Native Application Platform by Sam Ramji, Cloud Foundry CEO, at O'Reilly's conference March 19th 2015.
Accelerating NFV’s evolution through open platform Integrationhttps://www.opnfv.org/
Set of software tools for building and managing cloud platforms(IaaS)http://www.openstack.org/
Linux http://www.linux.org/
Cross-platform runtime environment for server-side and networking applications
https://www.nodejs.org/
PaaShttp://www.cloudfoundry.org/
Bare metal hypervisor
https://www.xenproject.org/
Accelerating adoption of SDNhttps://www.opendaylight.org/
Openly share designs of data center products like servers, racks, etc. https://www.opencompute.org/
HUAWEI TECHNOLOGIES CO., LTD. 5
Openstack Introduction
Open Source Cloud Computing platform with Apache license.
OpenStack® releases once in every 6 months and named alphabetically . Current release is called ‘Juno’.
Started as RackSpace and NASA jointly at 2010 and then moved to a foundation. There are
3000+ committers & 2.5M lines of code.
Massively scalable operating system plug-in architecture; allows different hypervisors,
block storage systems, network implementations, hardware agnostic, etc.
More information at http://openstack.org & https://github.com/ & http://launchpad.net
HUAWEI TECHNOLOGIES CO., LTD. 6
Openstack Conceptual Architecture
Logical Architecture http://docs.openstack.org/admin-guide-cloud/content/logical-architecture.html
HUAWEI TECHNOLOGIES CO., LTD. 7
Openstack Physical Deployment
Openstack Installation:http://trystack.org – Directly from cloud with no physical machines needed.http://docs.Openstack.org/developer/devstack - For developer environment.http://docs.openstack.org/juno/install-guide/install/apt/content - Production Install.
HUAWEI TECHNOLOGIES CO., LTD. 8
Cloud Foundry Introduction
Open Source Cloud Computing platform with Apache license
Started from VMWare and then move to Pivotal. Total lines of code around 800K.
Develop, test and deploy applications freely without worrying middleware and operating system stack.
Choice of cloud for deployment in AWS, VCloud and Openstack.
More information at http://cloudfoundry.org & https://github.com/
HUAWEI TECHNOLOGIES CO., LTD. 9
Cloud Foundry Architecture
Components V2http://docs.cloudfoundry.org/
V3
-D
iego C
om
po
nen
ts
HUAWEI TECHNOLOGIES CO., LTD. 10
Cloud Foundry Application Deployment
Application Deployment Use appropriate build packs Create Services Service Broker API
http://docs.cloudfoundry.org/devgui
de/deploy-apps/deploy-app.html
http://docs.cloudfoundry.org/buildp
acks/
http://docs.cloudfoundry.org/services/
api.html
HUAWEI TECHNOLOGIES CO., LTD. 11
Docker Introduction
Docker uses the underlying Technology to provide the building blocks for containers.
- Namespaces to provide the isolated workspace we call the container.
- Cgroups for running applications in isolation is to use the resources needed.
- Union file systems that creating layers, making them very lightweight and fast.
The default is libcontainer but also supports LXC.
So Docker is container written in GO with additional capabilities on top of standard
containers like Image management, utilities, APIs, networking, security, etc.
Docker is an open platform for developing, shipping, and running applications.With Docker you can separate your applications from your infrastructure AND middleware and treat them like a managed application. More info at http://docs.docker.com/introduction/understanding-docker/
HUAWEI TECHNOLOGIES CO., LTD. 12
Docker Registry
The Docker registry is the store for your Docker images. Once you build a Docker image you can push it to a
public registry Docker hub and it can provides both public and private storage for images.
- Official - https://registry.hub.docker.com/- Private - https://blog.docker.com/2013/07/how-to-use-your-own-registry/
- 3rd party Players - https://registry.hub.docker.com/u/google/docker-registry/
e.g: Google http://searchcloudcomputing.techtarget.com/news/2240239199/Private-Docker-repositories-add-to-
Google-containers-push
So how does Docker work?1. You can build Docker images that
hold your applications.2. You can create Docker containers
from those Docker images to run your applications.
3. You can share those Docker images via Docker Hub or your own registry.
HUAWEI TECHNOLOGIES CO., LTD. 13
HUAWEI TECHNOLOGIES CO., LTD. 14
Openstack + Docker Integration
There are three types of infrastructure deployments at Openstack: Bare Metal, VM & Container. You can have together VM and Docker, Bare Metal & Docker and also Docker on Docker.Use nova.conf file to select the driver for the compute node and deploy to the infrastructure selected http://docs.Openstack.org/trunk/config-reference/content/list-of-compute-config-options.html#config_table_nova_compute (compute_driver=novadocker.virt.docker.DockerDriver)Docker also supports, Cinder, Neutron, etc.See more at https://wiki.openstack.org/wiki/Docker
Nova Driver deployment Download nova-docker driver(https://github.com/stackforge/nova-docker) Save Docker image to glance Change nova.conf Then nova boot
Heat Deployment Create the heat templateUse the plug-in API
Nova + Ironic Deployment
HUAWEI TECHNOLOGIES CO., LTD. 15
Openstack + Cloud Foundry Integration
Openstack Deployments:
In a single machine - http://docs.openstack.org/developer/devstack/
Enterprise scale - http://docs.openstack.org/juno/install-guide/install/apt/content/
Cloud Foundry Deployments:
BOSHLite: In a single machine such as laptop - https://github.com/cloudfoundry/bosh-lite
MicroBOSH: In a single Virtual Machine - http://docs.cloudfoundry.org/bosh/deploy-microbosh-to-openstack.html
BOSH: At Enterprise scale large number of machines - http://docs.cloudfoundry.org/deploying/openstack/
BOSH
Openstack Summit 2014 by Animesh
HUAWEI TECHNOLOGIES CO., LTD. 16
BOSH – Connecting all together
BOSH was developed to deploy Cloud Foundry PaaS, it can also be used to deploy almost
any other software (Hadoop, for instance). BOSH is particularly well-suited for large
distributed systems. See More http://docs.cloudfoundry.org/bosh/
BOSH supports multiple Infrastructure as a Service (IaaS) providers like VMware vSphere,
vCloud Director, Amazon Web Services EC2 and OpenStack.
Cloud Provider Interface (CPI) enables users to extend BOSH to support additional IaaS
providers such as Google Compute Engine and Apache CloudStack.
HUAWEI TECHNOLOGIES CO., LTD. 17
BOSH ArchitectureTo deploy software with BOSH:1. Upload Stemcell.2. Upload Release.3. Set deployment with a manifest.4. Deploy
http://docs.cloudfoundry.org/bosh/deployment-basics.html
BOSH Design Principle:1. Leverages IaaS APIs to create VMs
from base images packaged with operator-defined network, storage, and software configurations
2. Monitors and manages VM and process health, detecting and restarting processes or VMs when they become unhealthy.
3. Updates all VMs reliably and idempotently, whether the update is to the OS, a package, or component.
HUAWEI TECHNOLOGIES CO., LTD. 18
Cloud Foundry + Docker : Service Broker
Docker Service Broker API
Generic container broker API for Cloud Foundry allows users to provision services that runs inside
a compatible container backend (Docker is supported) and bind applications to the service.
http://blog.pivotal.io/cloud-foundry-pivotal/products/docker-service-broker-for-cloud-foundry
Fastest ways to get Docker and orchestrate containers with persistent data on any infrastructure
(IaaS) by deploy this BOSH release. https://github.com/cf-platform-eng/docker-boshrelease
HUAWEI TECHNOLOGIES CO., LTD. 19
Cloud Foundry + Docker : Diego
Other options
Lattice - Containerized workloads on a cluster using Diego
https://github.com/cloudfoundry-incubator/lattice
Stackato - ActiveState supports Docker
http://www.activestate.com/stackato/features-benefits/docker-
containers
Decker = Docker + Cloud Foundry from CloudCredo
http://www.cloudcredo.com/decker-docker-cloud-foundry/
• You can drop a Docker image into Diego and it will mount all the layers using a Docker library.
• It will run in a Garden container. Diego does not run Docker containers. It has an interface to run compatible images in Garden containers.
• For the end user, there is very little difference. Diego is designed to run different backends.
App lifecycle https://github.com/cloudfoundry-
incubator/docker_app_lifecycle Deployment and scaling
https://www.youtube.com/watch?v=e76a50ZgzxM
Thank youwww.huawei.com
Demo….