Cloud Foundry: Hands-on Deployment Workshop
Upcoming SlideShare
Loading in...5
×
 

Cloud Foundry: Hands-on Deployment Workshop

on

  • 1,238 views

Slides from Workshop 'Cloud Foundry: Hands-on Deployment Workshop' ...

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.

Statistics

Views

Total Views
1,238
Views on SlideShare
1,226
Embed Views
12

Actions

Likes
1
Downloads
35
Comments
0

2 Embeds 12

https://twitter.com 11
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Cloud Foundry: Hands-on Deployment Workshop Cloud Foundry: Hands-on Deployment Workshop Presentation Transcript

  • 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 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
  • * 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
  • * 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
  • * 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
  • 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 !!!
  • 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!)
  • * 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
  • * What PaaS is not? • • • • Middleware over IaaS Application hosting Application orchestration deployment tool Preinstalled packages/services for me to manage
  • * 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
  • * 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
  • * 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?
  • * 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
  • * 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
  • * 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]
  • * 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
  • *
  • * 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 server-, Collector)
  • * 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
  • * Core components
  • * 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
  • * 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
  • * 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)
  • * BOSH deployments HOW-TOs http://docs.cloudfoundry.com/ • • • • • Deploy to AWS Deploy to OpenStack Deploy to vSphere Deploy to vCloud Director Deploying Community Services
  • * Cloud Foundry: W.T.H.I.G.O? BOSH: status at a deployment level (CF, services and custom releases) Metrics / Monitoring Logs management
  • 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 want. Pluginable architecture Out of the box: • OpenTSDB • AWS CloudWatch • DataDog ?% Average Utilization
  • *
  • * Workshop - Prerequisites • Vagrant • Vagrant plugins • $ vagrant plugin install vagrant-berkshelf • $vagrant plugin install vagrant-omnibus
  • * 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
  • * 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> 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 connection)
  • * 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