Hands-on Workshopfor Operators
Manuel Garcia / altoros.com / @rmgarciap
* Whythis training?
•SysAdmins and DevOps requested it in several
meetup Altoros talks
•Evolution from a minimalistic CF l...
* Goals
•Understand how Cloud Foundry is deployed
•Get to know how Cloud Foundry internally works
from an PaaS Operator pe...
Hands on?
1, 2, 3… go!
* How do I deploy Cloudfoundry?
Nise Bosh, a lightweight BOSH emulator. Virtual and bare metal
Altoros Vagrant Installer, ...
* It is so easy
•Install Bosh
•Deploy Something (ex.: ElasticSearch)
•Upload stemcell
•Upload release
•Configure deploymen...
* Bosh Lite – From Local to theCloud
• Prerequisites
• GIT
• Ruby 1.9.3 (latest. 2.0.X not supported)
• RubyGems and Bundl...
* Bosh Lite – From Local to theCloud
• Upload Stemcell
• $ bosh public stemcells
• $ bosh download public stemcell bosh….t...
* What is Bosh? Why BOSH?
Designed for large scale, distributed services
Tool chain for release engineering, deployment an...
BOSH Overview
BOSH Releases
* What is a release?
• A collection of configuration:
– files,
– job definitions
– source code
– package definitions
– and...
* What is a release?
• Source directories
– jobs: start and stop commands for each of the jobs
(processes) running on Clou...
* What is a release?
• Releases directories
– releases: yml files containing the references to blobs for
each package in a...
* Example BOSH Release
• ElasticSearch release
•  Take me to the repo…
* Cloud Foundry BOSH Release
• Around 20 jobs
• Open Source: github.com/cloudfoundry/cf-release
• Weekly releses (releases...
* Bosh Lite (lets continue)
• Upload Warden Stemcell
• $ bosh public stemcells
• $ bosh upload stemcell latest-bosh-stemce...
* Stemcells
• A minimal VM image that can convert into anything
• Contains a BOSH Agent: A process that runs continuously ...
* In the meantime.. What have we done?
• MicroBosh in a local VM
• Director, public API
• Blobstore, to store and retrieve...
Example Component Interaction
Lets Deploy Cloud Foundry
* CF deployment steps
• Download Release from repo and upload it to
BOSH
– $ git clone https://github.com/cloudfoundry/cf-...
Test your Cloud Foundry Deployment
* Target and deploy
• $ cf login -a https://api.10.0.244.34.xip.io
• Download, build and deploy the app
– $ git clone http...
Runtimes and Frameworks
Buildpacks
*
• Java
– Java, Grails, Play, Spring or any other JVM-based language or
framework
• Node.js
– Node or JavaScript
• Ruby
–...
*
> cf push = deploy
CLI Cloud
Controller
CCDB
(MySQL
)
Blob
Store
(S3,
etc.)
Executor
Stager
W
Build
packs
A2
A2 A3
A3
A1...
*
• $ cf app [app]
• $ cf logs [app]
• Logs are streamed. CC API, Staging, DEA, Router – HTTP and finally
your app
• Dump:...
Services
( *aaS )
*
• They can be anything external resource as far as they provide
an API and they are registered with the CC
• Actions
• P...
No downtime deployments
Blue-green deployment release technique
*
• One production domain and two apps
• Blue  prod
• Green  next release
• $ cf push Blue -n demo-time
Blue-GreenDeploy...
*
• Update App and Push
• $ cf push Green -n demo-time-
temp
Blue-GreenDeployment
*
• Map Original Route to Green
• $ cf map-route Green
example.com -n demo-time
Binding demo-time.example.com to
Green... ...
*
• Unmap Route to Blue
• cf unmap-route Blue example.com
-n demo-time-temp
Unbinding demo-time.example.com
from blue... O...
*
• Remove Temporary Route to Green
• $ cf unmap-route Green
example.com -n demo-time-temp
Blue-GreenDeployment
Key architectural characteristics
*
Portable
Key architecturalcharacteristics
*
Portable
Key architecturalcharacteristics
https://github.com/cloudfoundry
Open Source
*
Scalable
• From few servers to thousands
• Horizontally and Vertically
Key architecturalcharacteristics
*
Reliable
Very few Single Points of Failure which are been improved
(Message Bus -NAT S server-, Collector)
Key architect...
*
Extensible
Loosely Coupled Components with specific responsibilities and
technology agnostic intercommunication through ...
Cloud Foundry Architecture
Overview
* Core components
* What have we done?
• Install BOSH (with bosh lite)
• Install BOSH CLI
• Upload stemcell
• Upload Release
• Create and co...
* What have we done?
• Install Cloud Foundry CLI (cf)
• Target and log into CF
• Create organization and space
• Push an a...
* What is next? Deploy CF into a IaaS
• Small/Medium deployment for demos/testing
• Microbosh
• Medium to large production...
Thank you
manuel.garcia@altoros.com
@rmgarciap
(650) 395-7002
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and SysAdmins
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and SysAdmins
Upcoming SlideShare
Loading in …5
×

Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and SysAdmins

1,526 views

Published on

Dealing with high-load services of all kinds makes us to seek for new generation tools to build reliable, scalable, and 100% available systems. At this workshop, you will have chance to dive deep into how Cloud Foundry solves the issues of portability, scalability, reliability and extensibility.

Hands-on agenda:
- Application lifecycle: from development to production
- Deep dive into Cloud Foundry architecture
- Where to deploy Cloud Foundry
- How to Deploy Cloud Foundry: from small evaluation to hundreds VMs High Availability production environments
- Scale up and down your infrastructure. Can you auto scale?
- Zero downtime upgrades
- Auto Healing deployments
- Cloud Foundry system logging and monitoring
- Services: types, current restrictions and expectations

Published in: Education, Technology
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,526
On SlideShare
0
From Embeds
0
Number of Embeds
65
Actions
Shares
0
Downloads
60
Comments
0
Likes
9
Embeds 0
No embeds

No notes for slide
  • The Middleware over IaaS model today provides more flexibility to application administrators in that they have full control of the middleware runtime environment and its infrastructure knob. However, the beauty of a PaaS model is that it promises to eliminate the need for the control of these parameters altogether. The ultimate PaaS solution would be able to automatically deduce the optimal runtime environment for an application and automatically adjust it as the needs of the application and its usage evolve
  • http://docs.cloudfoundry.com/docs/using/app-arch/index.html

    For example, rather than using the local file system, you can use a Cloud Foundry service such as the MongoDB document database or a relational database (MySQL or Postgres). Another option is to use cloud storage providers such as Amazon S3, Google Cloud Storage, Dropbox, or Box. If your application needs to communicate across different instances of itself (for example to share state etc), consider a cache like Redis or a messaging-based architecture with RabbitMQ.
  • Portable: Open Source / Multi-Platforms
    - vSphere
    - AWS
    - Openstack -> It’s my data, I don’t want to have it out there!!!
    - None of these? Extensible to other IaaS API through CPIs (Altoros is currently working on one)
    Scalable: from 1 node to thousands
    Extensible: Loosely Coupled Components with specific responsibilities and technology agnostic intercommunication through a message bus
    Reliable: minimum (soon none) SPOF
  • Portable: Open Source / Multi-Platforms
    - vSphere
    - AWS
    - Openstack -> It’s my data, I don’t want to have it out there!!!
    - None of these? Extensible to other IaaS API through CPIs (Altoros is currently working on one)
    Scalable: from 1 node to thousands
    Extensible: Loosely Coupled Components with specific responsibilities and technology agnostic intercommunication through a message bus
    Reliable: minimum (soon none) SPOF
  • Portable: Open Source / Multi-Platforms
    - vSphere
    - AWS
    - Openstack -> It’s my data, I don’t want to have it out there!!!
    - None of these? Extensible to other IaaS API through CPIs (Altoros is currently working on one)
    Scalable: from 1 node to thousands
    Extensible: Loosely Coupled Components with specific responsibilities and technology agnostic intercommunication through a message bus
    Reliable: minimum (soon none) SPOF
  • Portable: Open Source / Multi-Platforms
    - vSphere
    - AWS
    - Openstack -> It’s my data, I don’t want to have it out there!!!
    - None of these? Extensible to other IaaS API through CPIs (Altoros is currently working on one)
    Scalable: from 1 node to thousands
    Extensible: Loosely Coupled Components with specific responsibilities and technology agnostic intercommunication through a message bus
    Reliable: minimum (soon none) SPOF
  • Portable: Open Source / Multi-Platforms
    - vSphere
    - AWS
    - Openstack -> It’s my data, I don’t want to have it out there!!!
    - None of these? Extensible to other IaaS API through CPIs (Altoros is currently working on one)
    Scalable: from 1 node to thousands
    Extensible: Loosely Coupled Components with specific responsibilities and technology agnostic intercommunication through a message bus
    Reliable: minimum (soon none) SPOF
  • Portable: Open Source / Multi-Platforms
    - vSphere
    - AWS
    - Openstack -> It’s my data, I don’t want to have it out there!!!
    - None of these? Extensible to other IaaS API through CPIs (Altoros is currently working on one)
    Scalable: from 1 node to thousands
    Extensible: Loosely Coupled Components with specific responsibilities and technology agnostic intercommunication through a message bus
    Reliable: minimum (soon none) SPOF
  • W.T.H.I.G.O.: What the heck is going on?
  • W.T.H.I.G.O.: What the heck is going on?
  • W.T.H.I.G.O.: What the heck is going on?
  • Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and SysAdmins

    1. 1. Hands-on Workshopfor Operators Manuel Garcia / altoros.com / @rmgarciap
    2. 2. * Whythis training? •SysAdmins and DevOps requested it in several meetup Altoros talks •Evolution from a minimalistic CF local installation workshop to a full CF deployment done with BOSH
    3. 3. * Goals •Understand how Cloud Foundry is deployed •Get to know how Cloud Foundry internally works from an PaaS Operator perspective
    4. 4. Hands on? 1, 2, 3… go!
    5. 5. * How do I deploy Cloudfoundry? Nise Bosh, a lightweight BOSH emulator. Virtual and bare metal Altoros Vagrant Installer, developer oriented deployment BOSH, tool chain for release engineering Bosh Lite, a lite development environment for BOSH. Conteinerized VMs Canonical Juju Charms, cloud infrastructure automation
    6. 6. * It is so easy •Install Bosh •Deploy Something (ex.: ElasticSearch) •Upload stemcell •Upload release •Configure deployment manifest •Deploy !
    7. 7. * Bosh Lite – From Local to theCloud • Prerequisites • GIT • Ruby 1.9.3 (latest. 2.0.X not supported) • RubyGems and Bundler • VirtualBox • Vagrant • Clone repo and deploy bosh lite (preferable local) • Lower RAM if needed (Vagrantfile) • $ vagrant up
    8. 8. * Bosh Lite – From Local to theCloud • Upload Stemcell • $ bosh public stemcells • $ bosh download public stemcell bosh….tgz • Download Elasticsearch bosh release • $ git clone https://github.com/bonzofenix/elasticsearch-boshrelease • Upload it to Bosh • $ bosh upload release releases/<version>.yml • Deploy ElasticSeach • $ bosh manifest <elasticsearch manifest file> • $ bosh deploy
    9. 9. * What is Bosh? Why BOSH? Designed for large scale, distributed services Tool chain for release engineering, deployment and lifecycle management Already Supports AWS, OpenStack & VMware vSphere (Cloudstack) Two floors up from Chef/Puppet. Multi-cloud, IaaS Provider independent Updates & Operates Deployments Deploys & Manages Clusters of Cloud Foundry, Databases, etc
    10. 10. BOSH Overview
    11. 11. BOSH Releases
    12. 12. * What is a release? • A collection of configuration: – files, – job definitions – source code – package definitions – and accompanying information needed to make a software component deployable by BOSH. • A release should have no dependencies that need to be fetched from the internet.
    13. 13. * What is a release? • Source directories – jobs: start and stop commands for each of the jobs (processes) running on Cloud Foundry nodes. – packages: packaging instructions used by BOSH to build each of the dependencies. – src: the source code for the components in Cloud Foundry. Note that each of the components is a submodule with a pointer to a specific SHA.
    14. 14. * What is a release? • Releases directories – releases: yml files containing the references to blobs for each package in a given release; these are solved within .final_builds – .final_builds: references into the public blostore for final jobs & packages (each referenced by one or more releases) – config: URLs and access credentials to the bosh blobstore for storing final releases
    15. 15. * Example BOSH Release • ElasticSearch release •  Take me to the repo…
    16. 16. * Cloud Foundry BOSH Release • Around 20 jobs • Open Source: github.com/cloudfoundry/cf-release • Weekly releses (releases directory) • Fully tested (CAT)
    17. 17. * Bosh Lite (lets continue) • Upload Warden Stemcell • $ bosh public stemcells • $ bosh upload stemcell latest-bosh-stemcell-warden.tgz
    18. 18. * Stemcells • A minimal VM image that can convert into anything • Contains a BOSH Agent: A process that runs continuously on each VM that BOSH deploys (one Agent process per VM). The BOSH Agent executes tasks in response to messages it receives from the BOSH Director
    19. 19. * In the meantime.. What have we done? • MicroBosh in a local VM • Director, public API • Blobstore, to store and retrieve precompiled packages • Health Manager, to track the state of deployed systems • Internal DNS, called PowerDNS, for internal unique naming of servers within bosh deployments • Bosh Database, desired state of a BOSH deployment • Message Bus (NATS) • Registry, for tracking the infrastructure that has been provisioned (servers, persistent disks) • Resurrector • Task Queue (requires Redis), async queue used by the BOSH Director and Workers to manage tasks
    20. 20. Example Component Interaction
    21. 21. Lets Deploy Cloud Foundry
    22. 22. * CF deployment steps • Download Release from repo and upload it to BOSH – $ git clone https://github.com/cloudfoundry/cf-release – $ bosh upload release releases/cf-169.yml – Check it is there: $ bosh releases • Build deployment manifest and tell BOSH to use it – $ ./scripts/make_manifest_spiff – $ bosh deployment manifests/cf-manifest.yml • Deploy: $ bosh deploy
    23. 23. Test your Cloud Foundry Deployment
    24. 24. * Target and deploy • $ cf login -a https://api.10.0.244.34.xip.io • Download, build and deploy the app – $ git clone https://github.com/mgarciap/cf-ruby-example.git – $ cd cf-ruby-example – $ cf push • App metadata? – Manifests
    25. 25. Runtimes and Frameworks Buildpacks
    26. 26. * • Java – Java, Grails, Play, Spring or any other JVM-based language or framework • Node.js – Node or JavaScript • Ruby – Ruby, Rack, Rails or Sinatra • Go Lang Cloud FoundrySystem Buildpacks
    27. 27. * > cf push = deploy CLI Cloud Controller CCDB (MySQL ) Blob Store (S3, etc.) Executor Stager W Build packs A2 A2 A3 A3 A1 A1 Pkg Metadata PkgMetadata Pkg Droplet Droplet Users R o u t e r A1.yourdomain.com Frontend Backend Stage A1 Deploy A1 DEA Nodes
    28. 28. * • $ cf app [app] • $ cf logs [app] • Logs are streamed. CC API, Staging, DEA, Router – HTTP and finally your app • Dump: cf logs [app] –recent • $ cf env [app name] • $ cf events [app name] • $ cf files [app] Something wrong deploying theapp?
    29. 29. Services ( *aaS )
    30. 30. * • They can be anything external resource as far as they provide an API and they are registered with the CC • Actions • Provision/deprovision • Bind/unbind Services
    31. 31. No downtime deployments Blue-green deployment release technique
    32. 32. * • One production domain and two apps • Blue  prod • Green  next release • $ cf push Blue -n demo-time Blue-GreenDeployment
    33. 33. * • Update App and Push • $ cf push Green -n demo-time- temp Blue-GreenDeployment
    34. 34. * • Map Original Route to Green • $ cf map-route Green example.com -n demo-time Binding demo-time.example.com to Green... OK Blue-GreenDeployment
    35. 35. * • Unmap Route to Blue • cf unmap-route Blue example.com -n demo-time-temp Unbinding demo-time.example.com from blue... OK Blue-GreenDeployment
    36. 36. * • Remove Temporary Route to Green • $ cf unmap-route Green example.com -n demo-time-temp Blue-GreenDeployment
    37. 37. Key architectural characteristics
    38. 38. * Portable Key architecturalcharacteristics
    39. 39. * Portable Key architecturalcharacteristics https://github.com/cloudfoundry Open Source
    40. 40. * Scalable • From few servers to thousands • Horizontally and Vertically Key architecturalcharacteristics
    41. 41. * Reliable Very few Single Points of Failure which are been improved (Message Bus -NAT S server-, Collector) Key architecturalcharacteristics
    42. 42. * Extensible Loosely Coupled Components with specific responsibilities and technology agnostic intercommunication through a message bus. Ruby? Rewrite in GO lang? No problem Key architecturalcharacteristics
    43. 43. Cloud Foundry Architecture Overview
    44. 44. * Core components
    45. 45. * What have we done? • Install BOSH (with bosh lite) • Install BOSH CLI • Upload stemcell • Upload Release • Create and configure Deployment Manifest • Deploy CF
    46. 46. * What have we done? • Install Cloud Foundry CLI (cf) • Target and log into CF • Create organization and space • Push an application
    47. 47. * What is next? Deploy CF into a IaaS • Small/Medium deployment for demos/testing • Microbosh • Medium to large production deployments • Deploy Microbosh • With Microbosh deploy BOSH • From BOSH deploy CF
    48. 48. Thank you manuel.garcia@altoros.com @rmgarciap (650) 395-7002

    ×