Slides from Workshop 'Cloud Foundry: Hands-on Deployment Workshop'
http://www.meetup.com/CloudFoundry/events/150601282/
In this workshop you will learn Cloud Foundry fundamental concepts, setup, deployment and operations. We’ll cover a couple of alternatives to deploy CF in a local environment for learning and testing purposes as well as deploying Cloud Foundry atop IaaS production level environment, being able to manage hundreds of components and thousands of applications.
If you did not have a chance to work with Cloud Foundry, it may be useful to test its features locally at first. Deploying this environment on a local machine allows you to get hands-on experience in the solution and, in case you are a contributor, to test some features before you commit them to a production environment.
4. Solution Pack #1: Application
* Fabric
B IL F R
UT O
Expertise
Cloud Foundry
Consulting
Customers
NoSQL &
Hadoop
Integration
Multi-Cloud
Clustered SQL/NoSQL Databases as
CF Automation
Services
24/7 Managed Services
Single or multi-site deployments
Legacy application migration
High Availability & Disaster Recovery
Security - Testing & Certification
5. *
In the past you had to deal with the
full stack
Apps
Data/Services
Runtime
You scale, make
resilient and manage
Middleware
OS
Virtualization
Servers
Storage
Networking
6. * Today you deal with the IaaS
Apps
You scale, make
resilient and manage
Data/Services
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
Managed
by IaaS
Provider
7. *
In the future you PaaS everything but your
app
You manage
Apps
Data/Services
Runtime
Code and add value instead of
dealing with overwhelming
system’s maintenance and
interoperability issues
Middleware
OS
Virtualization
Servers
Storage
Networking
Scale,
resilient
and
managed
by you or
a Provider
8. Big Boss: The application is ready, lets put it
in production now
You: but I need to follow the process.
1 month
Big Boss: blah blah blah …
MAKE IT HAPPEN !!!
9. To Do:
We need the experts
• Define requirements
(CPU, RAM, Storage,
networking, etc)
• Provision new servers
• Setup Load Balancing
• Apply security policies
Bring me the SWAT team who
can deal with this. FAST!
Sorry man, they are busy
Your team will have to do it
Thanks Lord my boss gave
The guy who knows this left the team
me a
cloud (AWS account!)
10.
11. * Why PaaS?
You don’t care about:
•
•
•
•
•
Multiple environments chaos (dev, test, prod)
Managing instances
Deal with IaaS APIs/clients
Become a cook with Chef/Puppet/..
IaaS lock-in
12. * What PaaS is not?
•
•
•
•
Middleware over IaaS
Application hosting
Application orchestration deployment tool
Preinstalled packages/services for me to
manage
13. * What do I care about as a
developer?
My code runs
Not just
run-time
Monitori
ng
Not just
code
CI
Databases / Cache / Message Queues …
CD
Manual (Auto?) - scaling
Automated
Test
Load-balancing
14. * PaaS vs IaaS
Features
PaaS
IaaS
App goes live
Hours, days, or weeks
Minutes
App Scalability / High Availability
Architects link each app to IaaS APIs
Centralized service by PaaS, for any app
Time to be productive
Server setup, dev-ops requests
Manage app by API?
None. Build your own?
Restfull API
Self-healing
No
Yes
Portability between Clouds
None. Build your own?
Use a simple CLI: $ cf push
Yes (move entire app portfolios between IaaS
15. *
Will my app run on Cloud Foundry just as
it is?
• Avoid Writing to the Local File System
– It is short-lived
– Instances of the same app do not share a local file system
• HTTP Sessions Not Persisted or Replicated
• HTTP and HTTPS Port Limitations
• Runtimes and Frameworks?
16. * Buildpacks
•
•
•
•
Based on Heroku buildpacks
Fork and customize
Develope your own
Search ‘buildpack’: We've
found 811 repository results
Open Source
https://github.com/cloudfoundry
17. * Deploy and scale apps
• Deploy apps
– $ cf push
– $ cf push --buildpack https://github.com/heroku/heroku-buildpack-php
• Scale app up & down
– $ cf scale APP_NAME
19. * Push a RoR app
From Ruby on Rails Tutorial sample application:
http://railstutorial.org/
https://github.com/cloudfoundry-samples/rails_sample_app
My local Cloud Foundry API: https://api.10.244.0.34.xip.io
23. * Key architectural characteristics
Portable
Open Source
https://github.com/cloudfoundry
24. * Key architectural characteristics
Scalable
• From few servers to thousands
25. * Key architectural characteristics
Reliable
Very few Single Points of Failure which are been improved
(Message Bus -NAT S server-, Collector)
26. * Key architectural characteristics
Extensible
Loosely Coupled Components with specific responsibilities and
technology agnostic intercommunication through a message
bus.
Ruby? Rewrite in GO lang? No problem
28. * How do I deploy Cloudfoundry?
Altoros Vagrant Installer, developer oriented deployment
Nise Bosh, a lightweight BOSH emulator
Bosh Lite, a lite development environment for BOSH. Wardenized VMs
BOSH, tool chain for release engineering
29. * What is Bosh? Why BOSH?
Tool chain for release engineering, deployment and lifecycle
management
Designed for large scale, distributed services
Two floors up from Chef/Puppet. Multi-cloud, IaaS Provider independent
Already Supports AWS, OpenStack & VMware vSphere (Cloudstack)
Deploys & Manages Clusters of Cloud Foundry, Databases
Updates & Operates Deployments
30. * What is BOSH? Main components
•
•
•
•
Director, public API for the bosh CLI and coordinator of bosh behavior
Blobstore, to store and retrieve precompiled packages
Agents, run on each server within deployments
The Health Manager, to track the state of deployed systems (the
infrastructure and running jobs)
• Internal DNS, called PowerDNS, for internal unique naming of servers
within bosh deployments
• Registry, for example AWS Registry, for tracking the infrastructure that
has been provisioned (servers, persistent disks)
31. * BOSH deployments HOW-TOs
http://docs.cloudfoundry.com/
•
•
•
•
•
Deploy to AWS
Deploy to OpenStack
Deploy to vSphere
Deploy to vCloud Director
Deploying Community Services
32. * Cloud Foundry: W.T.H.I.G.O?
BOSH: status at a deployment level (CF, services
and custom releases)
Metrics / Monitoring
Logs management
33. BOSH: Status at a deployment
* level
BOSH
• $ bosh vms --vitals –dns
34. * Metrics / Monitoring
Cloud Foundry Metric Collector
https://github.com/cloudfoundry/collector
Send metrics wherever you want.
Pluginable architecture
Out of the box:
• OpenTSDB
• AWS CloudWatch
• DataDog
?%
Average
Utilization