Your SlideShare is downloading. ×
0
Dive into Cloud Foundry
Internals
Quick Start
Manuel Garcia / altoros.com / @rmgarciap
Altoros Fact Sheet &
Overview
*

*our vision
Transform the way
applications are being
delivered, making a
dramatic impact.
Solution Pack #1: Application
* Fabric
B IL F R
UT O

Expertise

Cloud Foundry
Consulting
Customers

NoSQL &
Hadoop
Integr...
*

In the past you had to deal with the
full stack
Apps
Data/Services
Runtime

You scale, make
resilient and manage

Middl...
* Today you deal with the IaaS
Apps

You scale, make
resilient and manage

Data/Services
Runtime
Middleware
OS
Virtualizat...
*

In the future you PaaS everything but your
app
You manage

Apps
Data/Services
Runtime

Code and add value instead of
de...
Big Boss: The application is ready, lets put it
in production now
You: but I need to follow the process.
1 month

Big Boss...
To Do:

We need the experts

• Define requirements
(CPU, RAM, Storage,
networking, etc)
• Provision new servers
• Setup Lo...
* Why PaaS?
You don’t care about:
•
•
•
•
•

Multiple environments chaos (dev, test, prod)
Managing instances
Deal with Ia...
* What PaaS is not?
•
•
•
•

Middleware over IaaS
Application hosting
Application orchestration deployment tool
Preinstall...
* What do I care about as a
developer?
My code runs

Not just
run-time

Monitori
ng

Not just
code

CI

Databases / Cache ...
* PaaS vs IaaS
Features

PaaS

IaaS

App goes live

Hours, days, or weeks

Minutes

App Scalability / High Availability

A...
*

Will my app run on Cloud Foundry just as
it is?

• Avoid Writing to the Local File System
– It is short-lived
– Instanc...
* Buildpacks
•
•
•
•

Based on Heroku buildpacks
Fork and customize
Develope your own
Search ‘buildpack’: We've
found 811 ...
* Deploy and scale apps
• Deploy apps
– $ cf push
– $ cf push --buildpack https://github.com/heroku/heroku-buildpack-php

...
* Something wrong deploying the app?
•
•
•
•
•
•

$ cf app [app name]
$ cf logs [app name]
$ cf crashlogs [app name]
$ cf ...
* Push a RoR app
From Ruby on Rails Tutorial sample application:
http://railstutorial.org/
https://github.com/cloudfoundry...
*
* Key architectural characteristics
•
•
•
•

Portable
Scalable
Reliable
Extensible
* Key architectural characteristics
Portable
* Key architectural characteristics
Portable

Open Source
https://github.com/cloudfoundry
* Key architectural characteristics
Scalable
• From few servers to thousands
* Key architectural characteristics
Reliable
Very few Single Points of Failure which are been improved
(Message Bus -NAT S...
* Key architectural characteristics
Extensible
Loosely Coupled Components with specific responsibilities and
technology ag...
* Core components
* How do I deploy Cloudfoundry?
Altoros Vagrant Installer, developer oriented deployment
Nise Bosh, a lightweight BOSH emu...
* What is Bosh? Why BOSH?
Tool chain for release engineering, deployment and lifecycle
management

Designed for large scal...
* What is BOSH? Main components
•
•
•
•

Director, public API for the bosh CLI and coordinator of bosh behavior
Blobstore,...
* BOSH deployments HOW-TOs
http://docs.cloudfoundry.com/
•
•
•
•
•

Deploy to AWS
Deploy to OpenStack
Deploy to vSphere
De...
* Cloud Foundry: W.T.H.I.G.O?
BOSH: status at a deployment level (CF, services
and custom releases)
Metrics / Monitoring
L...
BOSH: Status at a deployment
* level
BOSH
• $ bosh vms --vitals –dns
* Metrics / Monitoring
Cloud Foundry Metric Collector
https://github.com/cloudfoundry/collector

Send metrics wherever you...
*
* Workshop - Prerequisites
• Vagrant
• Vagrant plugins
• $ vagrant plugin install vagrant-berkshelf
• $vagrant plugin inst...
* Workshop - Prerequisites
• Vagrant
• Vagrant plugins
• $ vagrant plugin install vagrant-berkshelf
• $vagrant plugin inst...
* Workshop – VM setup
•
•
•
•
•

$ vagrant up
$ vagrant ssh
$ cd /vagrant
$ ./status.sh
$ ./start.sh
* Workshop – Cloud Foundry
•
•
•
•

Directory structure
Running processes
logs
Start / Stop / Status
* Workshop – As a developer
• Log in
• $ cf target http://api.192.168.12.34.xip.io
• $ cf login
• Email> admin
• Password>...
* Workshop – Orgs, spaces & users
• $ cf create-org myorg
• $ cf create-space myspace
• $ cf switch-space myspace
* Workshop – Push an App
• $ cd test/fixtures/apps/sinatra
• Review manifest.yml
• $ cf push
• (wait….. I asume a slow con...
* Workshop – App details
• $ cf app
• $ cf env
• $ cf health
Workshop – Errors / Logs /
* Files
•
•
•
•
•

$ cf logs
$ cf crashlogs
$ cf env
$ cf events
$ cf health
* Workshop – Scaling
• $ cf scale
• Memory
• Instances
• Up
• Down
* Workshop – CF Internals
•
•
•
•
•
•

UAA
Cloud Controller
Router (gorouter)
DEA
Health Manager
Warden
* Workshop – CF Internals
• Everything goes through NATS
• $ nats-sub ‘>’
• $ nats-sub ‘router.register’
Muchas Gracias!
(Thx)
manuel.garcia@altoros.com
@rmgarciap
(650) 395-7002
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment Workshop
Upcoming SlideShare
Loading in...5
×

Cloud Foundry: Hands-on Deployment Workshop

1,440

Published on

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.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,440
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
68
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Cloud Foundry: Hands-on Deployment Workshop"

  1. 1. Dive into Cloud Foundry Internals Quick Start Manuel Garcia / altoros.com / @rmgarciap
  2. 2. Altoros Fact Sheet & Overview
  3. 3. * *our vision Transform the way applications are being delivered, making a dramatic impact.
  4. 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. 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. 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. 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. 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. 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. 10. * 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
  11. 11. * What PaaS is not? • • • • Middleware over IaaS Application hosting Application orchestration deployment tool Preinstalled packages/services for me to manage
  12. 12. * 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
  13. 13. * 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
  14. 14. * 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?
  15. 15. * 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
  16. 16. * 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
  17. 17. * Something wrong deploying the app? • • • • • • $ cf app [app name] $ cf logs [app name] $ cf crashlogs [app name] $ cf env [app name] $ cf events [app name] $ cf health [app name]
  18. 18. * 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
  19. 19. *
  20. 20. * Key architectural characteristics • • • • Portable Scalable Reliable Extensible
  21. 21. * Key architectural characteristics Portable
  22. 22. * Key architectural characteristics Portable Open Source https://github.com/cloudfoundry
  23. 23. * Key architectural characteristics Scalable • From few servers to thousands
  24. 24. * Key architectural characteristics Reliable Very few Single Points of Failure which are been improved (Message Bus -NAT S server-, Collector)
  25. 25. * 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
  26. 26. * Core components
  27. 27. * 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
  28. 28. * 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
  29. 29. * 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)
  30. 30. * BOSH deployments HOW-TOs http://docs.cloudfoundry.com/ • • • • • Deploy to AWS Deploy to OpenStack Deploy to vSphere Deploy to vCloud Director Deploying Community Services
  31. 31. * Cloud Foundry: W.T.H.I.G.O? BOSH: status at a deployment level (CF, services and custom releases) Metrics / Monitoring Logs management
  32. 32. BOSH: Status at a deployment * level BOSH • $ bosh vms --vitals –dns
  33. 33. * 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
  34. 34. *
  35. 35. * Workshop - Prerequisites • Vagrant • Vagrant plugins • $ vagrant plugin install vagrant-berkshelf • $vagrant plugin install vagrant-omnibus
  36. 36. * Workshop - Prerequisites • Vagrant • Vagrant plugins • $ vagrant plugin install vagrant-berkshelf • $vagrant plugin install vagrant-omnibus • Add prebuilt Vagrant box • $ vagrant box add altoros-cf-installer altoros-cfinstaller.box
  37. 37. * Workshop – VM setup • • • • • $ vagrant up $ vagrant ssh $ cd /vagrant $ ./status.sh $ ./start.sh
  38. 38. * Workshop – Cloud Foundry • • • • Directory structure Running processes logs Start / Stop / Status
  39. 39. * Workshop – As a developer • Log in • $ cf target http://api.192.168.12.34.xip.io • $ cf login • Email> admin • Password> password
  40. 40. * Workshop – Orgs, spaces & users • $ cf create-org myorg • $ cf create-space myspace • $ cf switch-space myspace
  41. 41. * Workshop – Push an App • $ cd test/fixtures/apps/sinatra • Review manifest.yml • $ cf push • (wait….. I asume a slow connection)
  42. 42. * Workshop – App details • $ cf app • $ cf env • $ cf health
  43. 43. Workshop – Errors / Logs / * Files • • • • • $ cf logs $ cf crashlogs $ cf env $ cf events $ cf health
  44. 44. * Workshop – Scaling • $ cf scale • Memory • Instances • Up • Down
  45. 45. * Workshop – CF Internals • • • • • • UAA Cloud Controller Router (gorouter) DEA Health Manager Warden
  46. 46. * Workshop – CF Internals • Everything goes through NATS • $ nats-sub ‘>’ • $ nats-sub ‘router.register’
  47. 47. Muchas Gracias! (Thx) manuel.garcia@altoros.com @rmgarciap (650) 395-7002
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×