SlideShare a Scribd company logo
1 of 141
Cloud Foundry Bootcamp

Portland, 2012

Written by: Chris Richardson

Presented By: Monica Wilkinson & Josh Long




© 2012 VMware, Inc. All rights reserved
About Monica Wilkinson                   Loves the web and data portability.




        Developer Advocate @ Cloud Foundry
         12 years development experience.
             Last 5 years in Social Web
           Open Web Standards Advocate
                     @ciberch
             mwilkinson@vmware.com




                          CONFIDENTIAL
                                                                          2
About Josh Long
              Spring Developer Advocate
              @starbuxman
              josh.long@springsource.com




                                       th
                                         si
                                          is
                                              im
                                               po
                                                   rta
                                                    nt
                                                      !
                                  Free Book!
                                  SpringSource.org/roo



                   CONFIDENTIAL
                                                          3
Will Work for Donuts...




                      CONFIDENTIAL
                                     4
Agenda

Why PaaS matters to developers
Overview of Cloud Foundry
Getting started with Cloud
 Foundry
Cloud Foundry architecture
Using Micro Cloud Foundry
Consuming Cloud Foundry
 services


                                  5
Traditional web application architecture

                                      Web Application


                                                StoreFront


                                                Accounting
                                                 Service
                                                                MySQL
   Desktop                                                      Database
                 Apache
   Browser                                   InventoryService


                                                   Shipping
                                                   Service


Simple to                      Container (e.g. Tomcat)


    develop
    test
    deploy
    scale
                                                                           6
Traditional web application architecture

                                      Web Application


                                                StoreFront


                                                Accounting
                                                 Service
                                                                     MySQL
   Desktop                                                           Database
                 Apache
   Browser                                   InventoryService


                                                   Shipping
                                                   Service


Simple to                      Container (e.g. Tomcat)


    develop
    test
    deploy
    scale                                                       Or is it?       6
Let’s imagine you want to run a
performance test...




         ?
How long to get the servers?
Who is going to set up the servers?
Who is going to set up Apache,
Tomcat, and MySQL?
And things are changing:

This simple, monolithic architecture is
             inadequate


                                      8
New kinds of clients




          Smart phones overtake PCs in Q4 2010

                                                 9
Users expect a rich, dynamic and interactive experience on mobile
                       devices and desktop




                      HTTP Request
         Desktop
                                        Web Application
         Browser      HTML/Javascript




                                                                    10
Users expect a rich, dynamic and interactive experience on mobile
                       devices and desktop




                                                                      h
                                                                   oug
                                                             d   en
                                                           oo
                                                       ’t g
                             HTTP Request
                                                  e isn
                                              r
                                         ctu
         Desktop
                                                       Web Application
                                       e
                                   hit
         Browser              HTML/Javascript
                             I arc
                   ty le U
              s
          Old




                                                                          10
Need to handle massive loads and the data explosion


         Need scalable architectures
 Application tier:
  • Replicated/clustered servers
  • Modular so that components can be scaled differently
  • Asynchronous architecture - communication via a message
    broker
 Database tier:
  • Replication
  • Sharding
  • Polyglot persistence: Relational, NoSQL, NewSQL
    databases


                                                              11
Scaling development

       Web application


                StoreFront


               Accounting
                Service                 Scalable
                                     !=
             InventoryService           development
                  Shipping
                  Service




 Strongly coupled components makes development difficult
 Forces multiple developers/teams to synchronize development efforts
 Obstacle to frequent, independent deployments
 Increases risk of failure - need to redeploy everything to change one thing   12
Modern application architecture

                                           billing web application

Desktop                                            Accounting
Browser                                             Service
 StoreUI


Native Mobile     NodeJS
                NodeJS                    inventory web application
Application     front-end
                                                                      MySQL
                application
                    StoreUI
 StoreUI                                       InventoryService


HTML5 mobile
application

 StoreUI          Redis                  shipping web application
                              RabbitMQ
                                                                      Mongo
                                               ShippingService




                                                                              13
Developing and testing these applications
       is even more challenging




                                            14
Let’s imagine you are fixing a bug
and want to run some JUnit
integration tests...




                ?
Who is going to setup your sandbox:
MySQL, RabbitMQ, MongoDB, ....?
Let’s imagine you have fixed a bug
and want to run some functional
tests...




              ?
How long to purchase the servers?
Who is going to set up the servers?
Who is going to setup MySQL,
RabbitMQ, MongoDB, ....?
Platform-as-a-Service is the solution




     Deployment                           Services

Easy deployment                         SQL databases

Application management             +    NoSQL databases

Easy scaling up and down                Message Broker




                                                          17
Agenda

Why PaaS matters to developers
Overview of Cloud Foundry
Getting started with Cloud
 Foundry
Cloud Foundry architecture
Using Micro Cloud Foundry
Consuming Cloud Foundry
 services


                                  18
The Open
         Platform as a Service



Deploy and scale applications in
seconds, without locking yourself

                                   p en,
                               e, O lable
                        Simpl Sca
                       Flex ible,

                                            19
Cloud Foundry open PaaS - Choice of frameworks
Cloud Foundry open PaaS - Choice of frameworks

                                                 OSS community
Cloud Foundry open PaaS - Choice of application services




                          Ap
                             p lic



          Data
                                at



         Services
                                 io
                                     n
                                      Se
                                         r
                                         vic
                                             e
                                             In
                                               te




                      Msg
                                                 rfa




                    Services
                                                  ce




                                      Other
                                     Services
Cloud Foundry open PaaS - Choice of application services




 vFabric
Postgres
                               Ap
                                  p lic



               Data
                                     at



              Services
                                      io
                                          n
                                           Se
                                              r
                                              vic




      vFabric
                                                  e
                                                  In
                                                    te




      RabbitMQTM           Msg
                                                      rfa




                         Services
                                                       ce




                                           Other
                                          Services

             Additional partners
             services …
Cloud Foundry open PaaS - Choice of clouds




                          Ap
                             p



                                                                                              Private
                               lic



          Data
                                at



         Services                                                                             Clouds
                                 io
                                     n
                                      Se




                                                                        ce
                                         r
                                         vic




                                                                       rfa
                                             e




                                                                       te
                                             In




                                                                     In
                                               te




                                                                                     Public




                                                                 er
                      Msg
                                                 rfa




                                                                vid
                    Services                                                         Clouds
                                                  ce




                                                                 o
                                                              Pr
                                                         ud
                                                          o
                                                       Cl


                                                                            Micro
                                      Other                                 Clouds
                                     Services
Cloud Foundry open PaaS - Choice of clouds




                                                                                                             d
                                                                                                        Avoi n
                          Ap
                             p                                                                          Lo ck-i

                                                                                              Private
                               lic



          Data
                                at



         Services                                                                             Clouds
                                 io
                                     n
                                      Se




                                                                        ce
                                         r
                                         vic




                                                                       rfa
                                             e




                                                                       te
                                             In




                                                                     In
                                               te




                                                                                     Public




                                                                 er
                      Msg
                                                 rfa




                                                                vid
                    Services                                                         Clouds
                                                  ce




                                                                 o
                                                              Pr
                                                         ud
                                                          o
                                                       Cl


                                                                            Micro
                                      Other                                 Clouds
                                     Services
Multi-cloud flexibility is critical to your long-term success




                                                                23
Multi-cloud flexibility is critical to your long-term success

 Make use of both public and private clouds without rewriting your
  applications




                                                                      23
Multi-cloud flexibility is critical to your long-term success

 Make use of both public and private clouds without rewriting your
  applications
 Protect against vendor lock-in




                                                                      23
Multi-cloud flexibility is critical to your long-term success

 Make use of both public and private clouds without rewriting your
  applications
 Protect against vendor lock-in
 Meet different compliance and geographical needs




                                                                      23
Multi-cloud flexibility is critical to your long-term success

 Make use of both public and private clouds without rewriting your
  applications
 Protect against vendor lock-in
 Meet different compliance and geographical needs
 Accommodate peak loads while optimizing costs




                                                                      23
Multi-cloud flexibility is critical to your long-term success

 Make use of both public and private clouds without rewriting your
  applications
 Protect against vendor lock-in
 Meet different compliance and geographical needs
 Accommodate peak loads while optimizing costs
 Manage your growth and changing needs over time




                                                                      23
CloudFoundry.COM - Multi-tenant PaaS operated by VMware


                       CloudFoundry.COM (beta)

      Runtimes & Frameworks

      Services

                              vCenter / vSphere




      Infrastructure




                                                          24
Micro Cloud FoundryTM – Industry first downloadable PaaS


                             Micro Cloud Foundry

      Runtimes & Frameworks

      Services

                                  Your Laptop/PC



     Single VM instance of
     Cloud Foundry
     that runs on a developer’s
     MAC or PC




                                                           25
CloudFoundry.ORG - Community open-source project


                                   CloudFoundry.ORG




                                    Your Infrastructure

      Download                    Setup                Setup    Deploy Behind
       Code                    Environment            Scripts     Firewall




             Apache2 license




                                                                                26
Cloud Foundry: you can trade-off effort vs flexibility

                                                                         Less
 Less
                 Public PaaS

                                                                ....
                                       .COM


                 Private PaaS
Effort                                                ....             Flexibility


                 Custom Private PaaS

                           git clone git://github.com/cloudfoundry/

 More                                                                   More

                                                                                27
Cloud Foundry Resources
 Primary Site : cloudfoundry.com
 Open Source Site : cloudfoundry.org

 Twitter : @cloudfoundry
 Blog : blog.cloudfoundry.com
 FB : facebook.com/cloudfoundry

 Documentation: start.cloudfoundry.com
 Support : support.cloudfoundry.com
  • Knowledge Base
  • Q & A / Forums



                                          28
Agenda

Why PaaS matters to developers
Overview of Cloud Foundry
Getting started with Cloud
 Foundry
Cloud Foundry architecture
Using Micro Cloud Foundry
Consuming Cloud Foundry
 services


                                  29
Register

  http://cloudfoundry.com/signup



                                   Use promo code

                               CFOpenTour2012




                                                    30
Welcome email




                31
Ways to use Cloud Foundry




                            32
Ways to use Cloud Foundry




                            32
Ways to use Cloud Foundry




                            32
Ways to use Cloud Foundry




                            32
Ways to use Cloud Foundry




                            32
Ways to use Cloud Foundry




                            32
Installing vmc on Windows




                            33
Installing vmc on Windows




                            Install the vmc gem




                                                  33
Installing vmc on Mac OSX


Use Ruby Version Manager http://beginrescueend.com/

$ bash -s stable 
     <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)




                                                                                           34
Installing vmc on Mac OSX


Use Ruby Version Manager http://beginrescueend.com/

$ bash -s stable 
     <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

$ rvm install 1.9.2
$ rvm use 1.9.2




                                                                                           34
Installing vmc on Mac OSX


Use Ruby Version Manager http://beginrescueend.com/

$ bash -s stable 
     <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

$ rvm install 1.9.2
$ rvm use 1.9.2

$ gem install vmc




                                                                                           34
Example vmc commands


    $ vmc target <any cloud>

    $ vmc login <credentials>

    $ vmc push <my-app>

    !      > bind services? Yes

    $ vmc update <my-app>

    $ vmc instances <my-app> +100


                                    35
VMC CLI DEMO




               36
VMC MANIFEST DEMO
  check out code
      deploy




                    37
Scale the application



$ vmc instances cf1 +2
Scaling Application instances up to 3: OK


$ vmc stats cf1

+----------+-------------+----------------+--------------+--------------+
| Instance | CPU (Cores) | Memory (limit) | Disk (limit) | Uptime       |
+----------+-------------+----------------+--------------+--------------+
| 0        | 1.2% (4)    | 90.6M (512M)   | 8.5M (2G)    | 0d:0h:3m:3s |
| 1        | 9.5% (4)    | 60.9M (512M)   | 8.4M (2G)    | 0d:0h:0m:17s |
| 2        | 9.4% (4)    | 55.5M (512M)   | 8.4M (2G)    | 0d:0h:0m:17s |
+----------+-------------+----------------+--------------+--------------+
http://www.springsource.com/downloads/sts
Install the Cloud Foundry plugin....




                                       40
...




      41
...




      42
STS DEMO




           43
Recap so far…

 Understand PaaS
 Register for Cloud Foundry
 Installed the Cloud Foundry Plugin
 Logged In/Authenticated
 Create a Spring MVC App
 Deployed MVC App to Cloud Foundry
 Hit URL from STS and Viewed MVC App
 Learned about vmc




                                        45
Agenda

Why PaaS matters to developers
Overview of Cloud Foundry
Getting started with Cloud
 Foundry
Cloud Foundry architecture
Using Micro Cloud Foundry
Consuming Cloud Foundry
 services


                                  46
Cloud Foundry - Architecture


                                         Message Bus
                                         Message Bus
                   Web
                  Web                    Message Bus
                                           (NATS)
                                          (NATS)
                                           (NATS)
100’s of DEAs




                App
                                                                        Load Balancers
                                                                       Load Balancers
                     App                                              Load Balancers
                   App




                     DEAs
                  DEAs
                DEAs



                                                                           Routers
                                                                          Routers
                                                                         Routers
                                                Cloud
                                             Cloud
                                             Controllers
                                           Cloud
                                           Controllers
                     DB                  Controllers
                   DB
                  DB

                                                    Web Service API


                    Services                                              Health
                                                                         Health
                  Services                                              Health
                                                                          Manager
                Services                                                 Manager
                                                                        Manager
                                        Client, e.g.VMC
Application deployment flow




         VMC             Cloud Controller   DEA
                                             DEA        Application




                                            Router
                                               Router




                                                                 48
Application deployment flow




vmc push

           VMC             Cloud Controller   DEA
                                               DEA        Application




                                              Router
                                                 Router




                                                                   48
Application deployment flow




vmc push

             VMC           Cloud Controller   DEA
                                               DEA        Application


           Framework
            detection




                                              Router
                                                 Router




                                                                   48
Application deployment flow




vmc push
                        create app
             VMC                     Cloud Controller   DEA
                                                         DEA        Application


           Framework
            detection




                                                        Router
                                                           Router




                                                                             48
Application deployment flow




vmc push
                        create app
             VMC                     Cloud Controller   DEA
                                                         DEA        Application


           Framework
            detection
                                       Framework
                                         specific
                                      staging plugin




                                         Creates
                                         Droplet


                                                        Router
                                                           Router




                                                                             48
Application deployment flow




                                                        find DEA for
                                                            app


vmc push
                        create app
             VMC                     Cloud Controller                 DEA
                                                                       DEA        Application


           Framework
            detection
                                       Framework
                                         specific
                                      staging plugin




                                         Creates
                                         Droplet


                                                                      Router
                                                                         Router




                                                                                           48
Application deployment flow




                                                        find DEA for
                                                            app


vmc push                                                I’m available
                        create app
             VMC                     Cloud Controller                   DEA
                                                                         DEA        Application


           Framework
            detection
                                       Framework
                                         specific
                                      staging plugin




                                         Creates
                                         Droplet


                                                                        Router
                                                                           Router




                                                                                             48
Application deployment flow




                                                         find DEA for
                                                             app


vmc push                                                 I’m available
                        create app
             VMC                     Cloud Controller                    DEA
                                                                          DEA        Application
                                                        deploy droplet

           Framework
            detection
                                       Framework
                                         specific
                                      staging plugin




                                         Creates
                                         Droplet


                                                                         Router
                                                                            Router




                                                                                              48
Application deployment flow




                                                         find DEA for
                                                             app


vmc push                                                 I’m available
                        create app
             VMC                     Cloud Controller                                start
                                                                         DEA
                                                                          DEA                Application
                                                        deploy droplet

           Framework
            detection
                                       Framework
                                         specific
                                      staging plugin




                                         Creates
                                         Droplet


                                                                         Router
                                                                            Router




                                                                                                      48
Application deployment flow




                                                         find DEA for
                                                             app


vmc push                                                 I’m available
                        create app
             VMC                     Cloud Controller                                           start
                                                                                     DEA
                                                                                      DEA               Application
                                                        deploy droplet

           Framework
            detection
                                       Framework
                                         specific
                                      staging plugin


                                                                         update routes


                                         Creates
                                         Droplet


                                                                                    Router
                                                                                       Router




                                                                                                                 48
About the staging plugin

 Framework specific
 Creates a zip file = black box
  • Contains everything necessary for DEA to run the application
  • Two scripts: start.sh, stop.sh




                                                                   49
Staging plugin for the Spring framework

 Adds CloudAutoStagingBeanFactoryPostProcessor bean:
  • Modifies bean definitions
  • Implements auto-reconfiguration
 Defines CloudApplicationContextInitializer in web.xml
  • Activates cloud profile
  • Defines PropertySource for CloudEnvironment properties




                                                             50
VCAP_APPLICATION environment variable

{
    "instance_id": "598f4af3b49ed5fc9bd19bef67650f61",
    "instance_index": 0,
    "name": "myapplication",
    "uris": ["myapp.cloudfoundry.com"],
    "users": ["crichardson@vmware.com"],
    "version": "6126ec0a1ea366c61635398f1d2824086e40aec4-1",
    "start": "2012-02-24 06:39:17 +0000",
    "runtime": "node",
    "state_timestamp": 1330065557,
    "port": 21059,
    "limits": {
                                          Tells your application about
       "fds": 256,                             where it is running
       "mem": 67108864,
       "disk": 2147483648
    },
    "host": "172.30.50.10"
}
                  String value = System.getenv("VCAP_APPLICATION")
                                                                         51
Custom Application environment variables
$ vmc env-add cf1 PAYMENT_SVC=http://...
Adding Environment Variable
   [PAYMENT_SVC=http://...]: OK
Stopping Application: OK
Staging Application: OK
Starting Application: OK



 String value = System.getenv("PAYMENT_SVC")

             @Value("#{systemEnvironment['PAYMENT_SVC']}")
             private String envVariable;
Request handling flow




          Load Balancer     Router     Application
            Load Balancer     Router        DEA




                                                     53
Request handling flow




HTTP Request

               Load Balancer     Router     Application
                 Load Balancer     Router        DEA




                                                          53
Request handling flow




HTTP Request                     HTTP Request

               Load Balancer                    Router     Application
                 Load Balancer                    Router        DEA




                                                                         53
Request handling flow




HTTP Request                     HTTP Request              HTTP Request

               Load Balancer                    Router                    Application
                 Load Balancer                    Router                       DEA




                                                                                        53
Self Healing Infrastructure

 If an application instance crashes
 • DEA detects unexpected exit => DEA broadcasts message
 • Routers remove instance from routing
 • Health manager notifies Cloud Controller
 • Cloud Controller re-launches instance
 If an DEA VM crashes
 • Application instances become unavailable
 • Health Manager notices the missing instances and notifies the
   Cloud Controller
 • Cloud Controller requests application instances to be started
 • Existing DEA will reply and start the applications
But where are the VMs?!?
 Cloud Foundry has a layered architecture
  • Cloud Controller, DEA, … layer = processes
  • VM management layer
 Benefits: decoupling, simplicity, ….
 CloudFoundry.com creates vSphere VMs running different Cloud Foundry
  components
Recap

 DEAs
 Service Gateways
 NATS
 Cloud Controllers
 Routing/Load Balancing
 Health Manager




                           56
Agenda

 Why PaaS matters to developers
 Overview of Cloud Foundry
 Getting started with Cloud Foundry
 Cloud Foundry architecture
 Using Micro Cloud Foundry
 Consuming Cloud Foundry services




                                       57
What is in Micro Cloud Foundry?




          App Instances                               Services




          Open source Platform as a Service project




                                                      10.04



          A cloud packaged as a VMware Virtual Machine

                                 Use as a developer sandbox
                                • Use the services from Junit integration tests
                                • Deploy your application for functional testing
                                • Remote debugging from STS
                                                                                   58
Pre-requisites for using Micro Cloud Foundry


                Minimum 1 GB         Minimum 8 GB     Internet Connectivity



                RAM                  Disk             (w/DHCP is ideal)




          VMC                                       STS
                      Command line                                        GUI




                                                                                59
Configuring Micro
 Cloud Foundry




                    60
Register and login to CloudFoundry.com




                                         61
Select a domain name




*.cloudfoundry.me => IP address of your machine where Micro Cloud Foundry is running


                                                                                       62
Remember the configuration token




                                   63
Download, unzip and open micro.vmx




                                     64
Configure Micro Cloud Foundry




                                65
Configure Micro Cloud Foundry




                                Pick password




                                                65
Configure Micro Cloud Foundry




                                Pick password

                                 Enter token




                                                65
Logging into Micro Cloud Foundry




                                   66
Logging into Micro Cloud Foundry


$ vmc target api.cer-micro1.cloudfoundry.me
Successfully targeted to [http://api.cer-micro1.cloudfoundry.me]




                                                                   66
Logging into Micro Cloud Foundry


$ vmc target api.cer-micro1.cloudfoundry.me
Successfully targeted to [http://api.cer-micro1.cloudfoundry.me]


$ vmc register
Email: crichardson@vmware.com
Password: ********
Verify Password: ********
Creating New User: OK
Attempting login to [http://api.cer-micro1.cloudfoundry.me]
Successfully logged into [http://api.cer-micro1.cloudfoundry.me]




                                                                   66
Micro Cloud Foundry has all the services




$ vmc services

============== System Services ==============

+------------+---------+---------------------------------------+
| Service    | Version | Description                           |
+------------+---------+---------------------------------------+
| mongodb    | 1.8     | MongoDB NoSQL store                   |
| mysql      | 5.1     | MySQL database service                |
| postgresql | 9.0     | PostgreSQL database service (vFabric) |
| rabbitmq   | 2.4     | RabbitMQ messaging service            |
| redis      | 2.2     | Redis key-value store service         |
+------------+---------+---------------------------------------+

=========== Provisioned Services ============


$



                                                                   67
Deploy an application in the usual way




                                         68
Deploy an application in the usual way
$ vmc push --path target
Application Name: DemoWebapp
Application Deployed URL [DemoWebapp.cer-micro1.cloudfoundry.me]:
Detected a Java Web Application, is this correct? [Yn]:
Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]:
Creating Application: OK
Would you like to bind any services to 'DemoWebapp'? [yN]:
Uploading Application:
  Checking for available resources: OK
  Packing application: OK
  Uploading (3K): OK
Push Status: OK
Staging Application: OK
Starting Application: OK




                                                                    68
Deploy an application in the usual way
$ vmc push --path target
Application Name: DemoWebapp
Application Deployed URL [DemoWebapp.cer-micro1.cloudfoundry.me]:
Detected a Java Web Application, is this correct? [Yn]:
Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]:
Creating Application: OK
Would you like to bind any services to 'DemoWebapp'? [yN]:
Uploading Application:
  Checking for available resources: OK
  Packing application: OK
  Uploading (3K): OK
Push Status: OK
Staging Application: OK
Starting Application: OK


$ curl DemoWebapp.cer-micro1.cloudfoundry.me
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>
Chriss-MacBook-Pro:demowebapp cer$




                                                                    68
Offline Micro Cloud Foundry
 The problem:
  • Cloud Foundry accessed via hostname, which is pretty cool
  • Hostname resolved by DNS server ==> laptop needs to be online
 The solution:
  • Micro Cloud Foundry now supports true offline mode
  • New command:vmc micro
  • Reconfigures DNS on your machine to resolve *.cloudfoundry.me locally
  • Requires: vmc 0.3.16.beta4 or higher, on Mac VMware Fusion 4.x




                                                                            69
Offline Micro Cloud Foundry: vmc micro status


                                saved in ~/.vmc_micro




$ vmc micro --vmx /MyVirtualMachines/micro.vmx 
   --vmrun /Applications/VMware Fusion.app/Contents/Library/vmrun status
Please enter your Micro Cloud Foundry VM password (vcap user) password: ********
Micro Cloud Foundry VM is not running. Do you want to start it? (y, n): y
Starting Micro Cloud Foundry VM: done
Micro Cloud Foundry VM currently in online mode
VMX Path: /Users/cer/Downloads/microCloudFoundry/micro/micro.vmx
Domain: cer-micro1.cloudfoundry.me
IP Address: 192.168.253.128




                                                                                   70
Offline Micro Cloud Foundry: vmc micro offline/online




                                                        71
Offline Micro Cloud Foundry: vmc micro offline/online

$ vmc micro offline
Please enter your Micro Cloud Foundry VM password (vcap user) password: ********
Setting Micro Cloud Foundry VM to offline mode: done
Setting host DNS server: done



           Reconfigures DNS to use Micro Cloud Foundry as one of the DNS servers
           Resolves cer-micro1.cloudfoundry.me to 192.168.253.128




                                                                                   71
Offline Micro Cloud Foundry: vmc micro offline/online

$ vmc micro offline
Please enter your Micro Cloud Foundry VM password (vcap user) password: ********
Setting Micro Cloud Foundry VM to offline mode: done
Setting host DNS server: done



           Reconfigures DNS to use Micro Cloud Foundry as one of the DNS servers
           Resolves cer-micro1.cloudfoundry.me to 192.168.253.128

$ vmc micro online
Please enter your Micro Cloud Foundry VM password (vcap user) password: ********
Unsetting host DNS server: done
Setting Micro Cloud Foundry VM to online mode: done



                                 Undoes the change to DNS configuration



                                                                                   71
Recap…

 Installed the Micro Cloud Foundry
 Got a Token
 Configured Micro Cloud Foundry
 Registered
 Logged In/Authenticated
 Created a Spring MVC App
 Deployed MVC App to Micro Cloud Foundry
 Set a breakpoint, hit URL from STS and viewed MVC App




                                                          72
Agenda

 Why PaaS matters to developers
 Overview of Cloud Foundry
 Getting started with Cloud Foundry
 Cloud Foundry architecture
 Using Micro Cloud Foundry
 Consuming Cloud Foundry services




                                       73
Current Services Available on Cloud Foundry




                                              74
Creating a service instance
$ vmc create-service mysql --name mysql1
Creating Service: OK


$ vmc services

============== System Services ==============
+------------+---------+---------------------------------------+
| Service    | Version | Description                           |
+------------+---------+---------------------------------------+
| mongodb    | 1.8     | MongoDB NoSQL store                   |
| mysql      | 5.1     | MySQL database service                |
| postgresql | 9.0     | PostgreSQL database service (vFabric) |
| rabbitmq   | 2.4     | RabbitMQ messaging service            |
| redis      | 2.2     | Redis key-value store service         |
+------------+---------+---------------------------------------+

=========== Provisioned Services ============

+-------------+---------+
| Name        | Service |
+-------------+---------+
| mysql1      | mysql   |
+-------------+---------+
Binding a service to an application
$ vmc push cer-spring --path web/target/
Application Deployed URL [cer-spring.cloudfoundry.com]:
Detected a Java SpringSource Spring Application, is this correct? [Yn]:
Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]:
Creating Application: OK
Would you like to bind any services to 'cer-spring'? [yN]: y
Would you like to use an existing provisioned service? [yN]: y
The following provisioned services are available
1: mysql1
2: mysql-135e0
Please select one you wish to use: 1
Binding Service [mysql1]: OK
Uploading Application:
  Checking for available resources: OK
  Processing resources: OK
  Packing application: OK
  Uploading (12K): OK
Binding a service to an application
   $ vmc push cer-spring --path web/target/
   Application Deployed URL [cer-spring.cloudfoundry.com]:
   Detected a Java SpringSource Spring Application, is this correct? [Yn]:
   Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]:
   Creating Application: OK
Would you like to bind any services to 'cer-spring'? [yN]: y [yN]: y
    Would you like
                   to bind any services to 'cer-spring'?
Would you like to use anan existing provisioned service? [yN]: y
    Would you like
                   to use existing provisioned service? [yN]: y
The The following provisioned servicesavailable
     following provisioned services are are available
1: mysql1
    1: mysql1
2: mysql-135e0
    2: mysql-135e0
Please select one you wish to use:use: 1
    Please select one you wish to 1
Binding Service [mysql1]: OK OK
    Binding Service [mysql1]:
   Uploading Application:
     Checking for available resources: OK
     Processing resources: OK
     Packing application: OK
     Uploading (12K): OK
Binding a service to an application
$ vmc push cer-spring --path web/target/
Application Deployed URL [cer-spring.cloudfoundry.com]:
Detected a Java SpringSource Spring Application, is this correct? [Yn]:
Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]:
Creating Application: OK
Would you like to bind any services to 'cer-spring'? [yN]: y
Would you like to use an existing provisioned service? [yN]: y
The following provisioned services are available
1: mysql1
2: mysql-135e0
Please select one you wish to use: 1
Binding Service [mysql1]: OK
Uploading Application:
  Checking for available resources: OK
  Processing resources: OK
  Packing application: OK
  Uploading (12K): OK
Binding a service to an application

$ vmc bind-service mysql1 myapp
Binding Service [mysql1]: OK
Stopping Application 'myapp': OK
Staging Application 'myapp': OK
Starting Application 'myapp': OK
$
Binding in STS




78
Survey application
     demo


                     79
Uses MySQL and MongoDB

   @Entity
   public class Customer {                                                                      Stored in MySQL
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;

      private String firstName;

      private String lastName;
                                                                                                    Stored in Mongo
      @RelatedDocument
      private SurveyInfo surveyInfo;




public class SurveyInfo {                                               public class Survey {

  private List<Survey> questionsAndAnswers = new ArrayList<Survey>();     String question;

  public List<Survey> getQuestionsAndAnswers() {                          String answer;
    return questionsAndAnswers;
  }




                                                                                                                      80
Bindings exposed through VCAP_SERVICES environment variable
{    "mysql-5.1": [{
         "name": "mysql1",
         "label": "mysql-5.1",
         "plan": "free",
         "tags": ["mysql", "mysql-5.1", "relational"],
         "credentials": {
             "name": "da81b57c25cca4c65929a223f0ed068a0",
             "host": "172.99.99.99",
             "port": 3306,
             "username": "secretusername",
             "password": "secretuserpassword"
             ....
         }
    }]
}
                                                              82
Accessing bound services - low-level



 var services = JSON.parse(process.env.VCAP_SERVICES);
 var creds = services['mysql-5.1'][0].credentials


 configure do
     services = JSON.parse(ENV['VCAP_SERVICES'])
     mysql_key = services.keys.select { |svc| svc =~ /mysql/i }.first
     mysql = services[mysql_key].first['credentials']
     mysql_conf = {:host => mysql['hostname'], :port => mysql['port'],
         :username => mysql['user'], :password => mysql['password']}
     @@client = Mysql2::Client.new mysql_conf
 end




                                                                         83
Accessing bound services - high-level, Spring/Java




                                                     84
Accessing bound services - high-level, Spring/Java


CloudEnvironment environment = new CloudEnvironment();
RdbmsServiceInfo mysqlSvc =
    environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class);
RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator();
DataSource dataSource = dataSourceCreator.createService(mysqlSvc);




                                                                      84
Accessing bound services - high-level, Spring/Java


CloudEnvironment environment = new CloudEnvironment();
RdbmsServiceInfo mysqlSvc =
    environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class);
RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator();
DataSource dataSource = dataSourceCreator.createService(mysqlSvc);

<cloud:data-source id="dataSource" service-name="mysql1">
  <cloud:pool pool-size="1-5"/>
  <cloud:connection properties="charset=utf-8"/>
</cloud:data-source>
...




                                                                      84
Accessing bound services - high-level, Spring/Java


CloudEnvironment environment = new CloudEnvironment();
RdbmsServiceInfo mysqlSvc =
    environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class);
RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator();
DataSource dataSource = dataSourceCreator.createService(mysqlSvc);

<cloud:data-source id="dataSource" service-name="mysql1">
  <cloud:pool pool-size="1-5"/>
  <cloud:connection properties="charset=utf-8"/>
</cloud:data-source>
...


                        reconfigured automatically
  <bean id="dataSource" class="…">
      … DataSource for MySQL instance …
  </bean>
                                                                      84
Accessing bound services - high-level, Ruby


                     reconfigured automatically
RedisHost = "127.0.0.1"
RedisPort = 10000
$r = Redis.new(:host => RedisHost, :port => RedisPort) if !$r



                         rewritten automatically
production:
  adapter: sqlite3
  database: db/production.sqlite3




                                                            85
Recap…

 Services :
  • SQL and NoSQL databases
  • Message broker
  • ...
 Service Bindings
  • VCAP_SERVICES environment variable
  • JSON Format

 Framework-dependent ways of accessing the bindings:
  • Parse JSON
  • ...
  • Spring, Sinatra and Rails have auto-reconfiguration




                                                          86
Services are great but what if we want to

            Use database tools?

Use the services from JUnit integration tests?




                                              87
Using Caldecott to tunnel into your services




                                               88
Caldecott Demo




                 89
Running JUnit test with Caldecott


   Configure your test code to use port + connection info




                                                           91
Summary


          92
Cloud Foundry is a
remarkably easy way to
deploy your applications


                       93
Cloud Foundry
      =
   Choice

                94
.js
             Ap




                                                           ce
                                                                     Private
                p
                lic


 Data




                                                          rfa
Services
                                                                     Clouds
                     at




                                                          te
                       io




                                                        In
                       n




                                                    er
                        Se




                                                   vid
                           r




                                                                Public
                            vic




                                                    o
                                                                Clouds
                                e




                                                 Pr
      Msg Services
                                In




                                            ud
                                  te




                                             o
                                    rfa



                                          Cl
                                     ce




                      Other
                                                        Micro
                     Services                           Clouds
Questions?
Signup @ www.cloudfoundry.com using promo code:
              CFOpenTour2012
Folks to meet

•Adron Hall Iron Foundry Lead
 •@adron
• Jeremy Voorhis Senior CF
    Developer @ App Fog
    •@jvoorhis

© 2012 VMware, Inc. All rights reserved
Thank You
CloudFoundry Spring Source Samples:
  http://bit.ly/cloudfoundry-samples


http://cloudfoundry.com
Questions: @cloudfoundry
•Josh -> @starbuxman or josh.long@springsource.com
•Monica -> @ciberch or mwilkinson@cloudfoundry.com


© 2012 VMware, Inc. All rights reserved

More Related Content

What's hot

Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic RelationshipCloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic RelationshipMatt Stine
 
Cloud foundry integration-with-openstack-and-docker-bangalorecf-meetup
Cloud foundry integration-with-openstack-and-docker-bangalorecf-meetupCloud foundry integration-with-openstack-and-docker-bangalorecf-meetup
Cloud foundry integration-with-openstack-and-docker-bangalorecf-meetupKrishna-Kumar
 
Cloud Foundry - Second Generation Code (CCNG). Technical Overview
Cloud Foundry - Second Generation Code (CCNG). Technical Overview Cloud Foundry - Second Generation Code (CCNG). Technical Overview
Cloud Foundry - Second Generation Code (CCNG). Technical Overview Nima Badiey
 
Introduction to Platform-as-a-Service and Cloud Foundry
Introduction to Platform-as-a-Service and Cloud FoundryIntroduction to Platform-as-a-Service and Cloud Foundry
Introduction to Platform-as-a-Service and Cloud FoundryManuel Silveyra
 
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopCloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopManuel Garcia
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
Cloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and moreCloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and morecornelia davis
 
Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...
Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...
Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...VMware Tanzu
 
Cloudfoundry architecture
Cloudfoundry architectureCloudfoundry architecture
Cloudfoundry architectureRamnivas Laddad
 
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...Animesh Singh
 
컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Docker컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Dockerseungdon Choi
 
Cloud Foundry Introduction and Overview
Cloud Foundry Introduction and OverviewCloud Foundry Introduction and Overview
Cloud Foundry Introduction and OverviewAndy Piper
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developersDaniel Krook
 
Cloud Foundry and OpenStack – Marriage Made in Heaven !
Cloud Foundry and OpenStack – Marriage Made in Heaven !Cloud Foundry and OpenStack – Marriage Made in Heaven !
Cloud Foundry and OpenStack – Marriage Made in Heaven ! Animesh Singh
 
Going Cloud Native with Cloud Foundry
Going Cloud Native with Cloud FoundryGoing Cloud Native with Cloud Foundry
Going Cloud Native with Cloud FoundryChip Childers
 
Optimizing Cloud Foundry and OpenStack for large scale deployments
Optimizing Cloud Foundry and OpenStack for large scale deploymentsOptimizing Cloud Foundry and OpenStack for large scale deployments
Optimizing Cloud Foundry and OpenStack for large scale deploymentsAnimesh Singh
 
Automated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStackAutomated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStackAnimesh Singh
 
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...VMware Tanzu
 
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)VMware Tanzu
 

What's hot (20)

Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic RelationshipCloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
 
Cloud foundry integration-with-openstack-and-docker-bangalorecf-meetup
Cloud foundry integration-with-openstack-and-docker-bangalorecf-meetupCloud foundry integration-with-openstack-and-docker-bangalorecf-meetup
Cloud foundry integration-with-openstack-and-docker-bangalorecf-meetup
 
Cloud Foundry - Second Generation Code (CCNG). Technical Overview
Cloud Foundry - Second Generation Code (CCNG). Technical Overview Cloud Foundry - Second Generation Code (CCNG). Technical Overview
Cloud Foundry - Second Generation Code (CCNG). Technical Overview
 
Introduction to Platform-as-a-Service and Cloud Foundry
Introduction to Platform-as-a-Service and Cloud FoundryIntroduction to Platform-as-a-Service and Cloud Foundry
Introduction to Platform-as-a-Service and Cloud Foundry
 
Cloud foundry
Cloud foundryCloud foundry
Cloud foundry
 
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopCloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment Workshop
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
 
Cloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and moreCloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and more
 
Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...
Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...
Cloud Foundry and OpenStack - A Marriage Made in Heaven! (Cloud Foundry Summi...
 
Cloudfoundry architecture
Cloudfoundry architectureCloudfoundry architecture
Cloudfoundry architecture
 
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
 
컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Docker컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Docker
 
Cloud Foundry Introduction and Overview
Cloud Foundry Introduction and OverviewCloud Foundry Introduction and Overview
Cloud Foundry Introduction and Overview
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 
Cloud Foundry and OpenStack – Marriage Made in Heaven !
Cloud Foundry and OpenStack – Marriage Made in Heaven !Cloud Foundry and OpenStack – Marriage Made in Heaven !
Cloud Foundry and OpenStack – Marriage Made in Heaven !
 
Going Cloud Native with Cloud Foundry
Going Cloud Native with Cloud FoundryGoing Cloud Native with Cloud Foundry
Going Cloud Native with Cloud Foundry
 
Optimizing Cloud Foundry and OpenStack for large scale deployments
Optimizing Cloud Foundry and OpenStack for large scale deploymentsOptimizing Cloud Foundry and OpenStack for large scale deployments
Optimizing Cloud Foundry and OpenStack for large scale deployments
 
Automated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStackAutomated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStack
 
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
 
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
 

Viewers also liked

Cloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud Foundry
Cloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud FoundryCloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud Foundry
Cloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud FoundryPatrick Chanezon
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootJoshua Long
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overviewcornelia davis
 
Spring boot
Spring bootSpring boot
Spring bootsdeeg
 
Bluemix IoT Cloud Foundry Meetup slides
Bluemix IoT Cloud Foundry Meetup slidesBluemix IoT Cloud Foundry Meetup slides
Bluemix IoT Cloud Foundry Meetup slidesValerie Lampkin
 
Fluentd meetup logging infrastructure in paa s
Fluentd meetup   logging infrastructure in paa sFluentd meetup   logging infrastructure in paa s
Fluentd meetup logging infrastructure in paa sRakuten Group, Inc.
 
Devoxx 2014 presentation
Devoxx 2014 presentationDevoxx 2014 presentation
Devoxx 2014 presentationEric Cattoir
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampAndy Piper
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom Joshua Long
 
Getting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent EventsGetting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent EventsArun Gupta
 
Cloud Foundry for Spring Developers
Cloud Foundry for Spring DevelopersCloud Foundry for Spring Developers
Cloud Foundry for Spring DevelopersGunnar Hillert
 
Combine Spring Data Neo4j and Spring Boot to quickl
Combine Spring Data Neo4j and Spring Boot to quicklCombine Spring Data Neo4j and Spring Boot to quickl
Combine Spring Data Neo4j and Spring Boot to quicklNeo4j
 
Cloud Foundry Overview for GITPRO 2013
Cloud Foundry Overview for GITPRO 2013Cloud Foundry Overview for GITPRO 2013
Cloud Foundry Overview for GITPRO 2013Adam FitzGerald
 
Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)
Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)
Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)VMware Tanzu
 
Cloud Foundry Command Line
Cloud Foundry Command LineCloud Foundry Command Line
Cloud Foundry Command LineJulia R Nash
 
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & CloudantBuild Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & CloudantAnimesh Singh
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Arun Gupta
 

Viewers also liked (20)

Cloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud Foundry
Cloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud FoundryCloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud Foundry
Cloud Foundry Open Tour Beijing: Becoming a Node.js Ninja on
 Cloud Foundry
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overview
 
Spring boot
Spring bootSpring boot
Spring boot
 
Bluemix IoT Cloud Foundry Meetup slides
Bluemix IoT Cloud Foundry Meetup slidesBluemix IoT Cloud Foundry Meetup slides
Bluemix IoT Cloud Foundry Meetup slides
 
Fluentd meetup logging infrastructure in paa s
Fluentd meetup   logging infrastructure in paa sFluentd meetup   logging infrastructure in paa s
Fluentd meetup logging infrastructure in paa s
 
Devoxx 2014 presentation
Devoxx 2014 presentationDevoxx 2014 presentation
Devoxx 2014 presentation
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Cloud Foundry 101
Cloud Foundry 101Cloud Foundry 101
Cloud Foundry 101
 
What is BOSH? An over-overview
What is BOSH? An over-overviewWhat is BOSH? An over-overview
What is BOSH? An over-overview
 
Getting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent EventsGetting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent Events
 
Cloud Foundry for Spring Developers
Cloud Foundry for Spring DevelopersCloud Foundry for Spring Developers
Cloud Foundry for Spring Developers
 
Combine Spring Data Neo4j and Spring Boot to quickl
Combine Spring Data Neo4j and Spring Boot to quicklCombine Spring Data Neo4j and Spring Boot to quickl
Combine Spring Data Neo4j and Spring Boot to quickl
 
Cloud Foundry Overview for GITPRO 2013
Cloud Foundry Overview for GITPRO 2013Cloud Foundry Overview for GITPRO 2013
Cloud Foundry Overview for GITPRO 2013
 
Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)
Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)
Autoscaling Distributed System with BOSH (Cloud Foundry Summit 2014)
 
Cloud Foundry Command Line
Cloud Foundry Command LineCloud Foundry Command Line
Cloud Foundry Command Line
 
Pert cpm-
Pert cpm-Pert cpm-
Pert cpm-
 
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & CloudantBuild Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014
 

Similar to Cloud Foundry Bootcamp Guide

Spring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, EgyptSpring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, EgyptChris Richardson
 
Decomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxDecomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxChris Richardson
 
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Chris Richardson
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Chris Richardson
 
Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...Chris Richardson
 
WebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the FutureWebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the FutureFrank Greco
 
CloudFest Denver When Worlds Collide: HTML5 Meets the Cloud
CloudFest Denver When Worlds Collide: HTML5 Meets the CloudCloudFest Denver When Worlds Collide: HTML5 Meets the Cloud
CloudFest Denver When Worlds Collide: HTML5 Meets the CloudDavid Pallmann
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)Randy Connolly
 
The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013RightScale
 
Multi client Development with Spring
Multi client Development with SpringMulti client Development with Spring
Multi client Development with SpringJoshua Long
 
Development Model for The Cloud
Development Model for The CloudDevelopment Model for The Cloud
Development Model for The Cloudumityalcinalp
 
The Web of Things - IoTExpo SF - May 2014
The Web of Things - IoTExpo SF - May 2014The Web of Things - IoTExpo SF - May 2014
The Web of Things - IoTExpo SF - May 2014Frank Greco
 
SOA an architecture on the Desktop
SOA an architecture on the DesktopSOA an architecture on the Desktop
SOA an architecture on the DesktopVincent Perrin
 
IBM Pulse 2013 session - DevOps for Mobile Apps
IBM Pulse 2013 session - DevOps for Mobile AppsIBM Pulse 2013 session - DevOps for Mobile Apps
IBM Pulse 2013 session - DevOps for Mobile AppsSanjeev Sharma
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkRed Hat Developers
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB
 
10 things ever architect should know about the Windows Azure Platform - ericnel
10 things ever architect should know about the Windows Azure Platform -  ericnel10 things ever architect should know about the Windows Azure Platform -  ericnel
10 things ever architect should know about the Windows Azure Platform - ericnelEric Nelson
 
Azure Services Platform
Azure Services PlatformAzure Services Platform
Azure Services PlatformDavid Chou
 

Similar to Cloud Foundry Bootcamp Guide (20)

Spring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, EgyptSpring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, Egypt
 
Spring Into the Cloud
Spring Into the CloudSpring Into the Cloud
Spring Into the Cloud
 
Decomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxDecomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gx
 
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)
 
Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...
 
WebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the FutureWebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the Future
 
CloudFest Denver When Worlds Collide: HTML5 Meets the Cloud
CloudFest Denver When Worlds Collide: HTML5 Meets the CloudCloudFest Denver When Worlds Collide: HTML5 Meets the Cloud
CloudFest Denver When Worlds Collide: HTML5 Meets the Cloud
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)
 
The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013
 
Multi client Development with Spring
Multi client Development with SpringMulti client Development with Spring
Multi client Development with Spring
 
Trends in Technology
Trends in TechnologyTrends in Technology
Trends in Technology
 
Development Model for The Cloud
Development Model for The CloudDevelopment Model for The Cloud
Development Model for The Cloud
 
The Web of Things - IoTExpo SF - May 2014
The Web of Things - IoTExpo SF - May 2014The Web of Things - IoTExpo SF - May 2014
The Web of Things - IoTExpo SF - May 2014
 
SOA an architecture on the Desktop
SOA an architecture on the DesktopSOA an architecture on the Desktop
SOA an architecture on the Desktop
 
IBM Pulse 2013 session - DevOps for Mobile Apps
IBM Pulse 2013 session - DevOps for Mobile AppsIBM Pulse 2013 session - DevOps for Mobile Apps
IBM Pulse 2013 session - DevOps for Mobile Apps
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
 
10 things ever architect should know about the Windows Azure Platform - ericnel
10 things ever architect should know about the Windows Azure Platform -  ericnel10 things ever architect should know about the Windows Azure Platform -  ericnel
10 things ever architect should know about the Windows Azure Platform - ericnel
 
Azure Services Platform
Azure Services PlatformAzure Services Platform
Azure Services Platform
 

More from Joshua Long

Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling SoftwareJoshua Long
 
Bootiful Code with Spring Boot
Bootiful Code with Spring BootBootiful Code with Spring Boot
Bootiful Code with Spring BootJoshua Long
 
Have You Seen Spring Lately?
Have You Seen Spring Lately?Have You Seen Spring Lately?
Have You Seen Spring Lately?Joshua Long
 
Java Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJava Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJoshua Long
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013Joshua Long
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonJoshua Long
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 updateJoshua Long
 
Extending spring
Extending springExtending spring
Extending springJoshua Long
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update finalJoshua Long
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryJoshua Long
 
using Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundryusing Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud FoundryJoshua Long
 
Spring in-the-cloud
Spring in-the-cloudSpring in-the-cloud
Spring in-the-cloudJoshua Long
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeJoshua Long
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the ScenesJoshua Long
 
Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundryJoshua Long
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenJoshua Long
 

More from Joshua Long (20)

Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling Software
 
Bootiful Code with Spring Boot
Bootiful Code with Spring BootBootiful Code with Spring Boot
Bootiful Code with Spring Boot
 
Boot It Up
Boot It UpBoot It Up
Boot It Up
 
Have You Seen Spring Lately?
Have You Seen Spring Lately?Have You Seen Spring Lately?
Have You Seen Spring Lately?
 
Java Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJava Configuration Deep Dive with Spring
Java Configuration Deep Dive with Spring
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 
Extending spring
Extending springExtending spring
Extending spring
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update final
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud Foundry
 
using Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundryusing Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundry
 
Spring in-the-cloud
Spring in-the-cloudSpring in-the-cloud
Spring in-the-cloud
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
 
Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud Foundry
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in Heaven
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Cloud Foundry Bootcamp Guide

  • 1. Cloud Foundry Bootcamp Portland, 2012 Written by: Chris Richardson Presented By: Monica Wilkinson & Josh Long © 2012 VMware, Inc. All rights reserved
  • 2. About Monica Wilkinson Loves the web and data portability. Developer Advocate @ Cloud Foundry 12 years development experience. Last 5 years in Social Web Open Web Standards Advocate @ciberch mwilkinson@vmware.com CONFIDENTIAL 2
  • 3. About Josh Long Spring Developer Advocate @starbuxman josh.long@springsource.com th si is im po rta nt ! Free Book! SpringSource.org/roo CONFIDENTIAL 3
  • 4. Will Work for Donuts... CONFIDENTIAL 4
  • 5. Agenda Why PaaS matters to developers Overview of Cloud Foundry Getting started with Cloud Foundry Cloud Foundry architecture Using Micro Cloud Foundry Consuming Cloud Foundry services 5
  • 6. Traditional web application architecture Web Application StoreFront Accounting Service MySQL Desktop Database Apache Browser InventoryService Shipping Service Simple to Container (e.g. Tomcat) develop test deploy scale 6
  • 7. Traditional web application architecture Web Application StoreFront Accounting Service MySQL Desktop Database Apache Browser InventoryService Shipping Service Simple to Container (e.g. Tomcat) develop test deploy scale Or is it? 6
  • 8. Let’s imagine you want to run a performance test... ? How long to get the servers? Who is going to set up the servers? Who is going to set up Apache, Tomcat, and MySQL?
  • 9. And things are changing: This simple, monolithic architecture is inadequate 8
  • 10. New kinds of clients Smart phones overtake PCs in Q4 2010 9
  • 11. Users expect a rich, dynamic and interactive experience on mobile devices and desktop HTTP Request Desktop Web Application Browser HTML/Javascript 10
  • 12. Users expect a rich, dynamic and interactive experience on mobile devices and desktop h oug d en oo ’t g HTTP Request e isn r ctu Desktop Web Application e hit Browser HTML/Javascript I arc ty le U s Old 10
  • 13. Need to handle massive loads and the data explosion Need scalable architectures  Application tier: • Replicated/clustered servers • Modular so that components can be scaled differently • Asynchronous architecture - communication via a message broker  Database tier: • Replication • Sharding • Polyglot persistence: Relational, NoSQL, NewSQL databases 11
  • 14. Scaling development Web application StoreFront Accounting Service Scalable != InventoryService development Shipping Service  Strongly coupled components makes development difficult  Forces multiple developers/teams to synchronize development efforts  Obstacle to frequent, independent deployments  Increases risk of failure - need to redeploy everything to change one thing 12
  • 15. Modern application architecture billing web application Desktop Accounting Browser Service StoreUI Native Mobile NodeJS NodeJS inventory web application Application front-end MySQL application StoreUI StoreUI InventoryService HTML5 mobile application StoreUI Redis shipping web application RabbitMQ Mongo ShippingService 13
  • 16. Developing and testing these applications is even more challenging 14
  • 17. Let’s imagine you are fixing a bug and want to run some JUnit integration tests... ? Who is going to setup your sandbox: MySQL, RabbitMQ, MongoDB, ....?
  • 18. Let’s imagine you have fixed a bug and want to run some functional tests... ? How long to purchase the servers? Who is going to set up the servers? Who is going to setup MySQL, RabbitMQ, MongoDB, ....?
  • 19. Platform-as-a-Service is the solution Deployment Services Easy deployment SQL databases Application management + NoSQL databases Easy scaling up and down Message Broker 17
  • 20. Agenda Why PaaS matters to developers Overview of Cloud Foundry Getting started with Cloud Foundry Cloud Foundry architecture Using Micro Cloud Foundry Consuming Cloud Foundry services 18
  • 21. The Open Platform as a Service Deploy and scale applications in seconds, without locking yourself p en, e, O lable Simpl Sca Flex ible, 19
  • 22. Cloud Foundry open PaaS - Choice of frameworks
  • 23. Cloud Foundry open PaaS - Choice of frameworks OSS community
  • 24. Cloud Foundry open PaaS - Choice of application services Ap p lic Data at Services io n Se r vic e In te Msg rfa Services ce Other Services
  • 25. Cloud Foundry open PaaS - Choice of application services vFabric Postgres Ap p lic Data at Services io n Se r vic vFabric e In te RabbitMQTM Msg rfa Services ce Other Services Additional partners services …
  • 26. Cloud Foundry open PaaS - Choice of clouds Ap p Private lic Data at Services Clouds io n Se ce r vic rfa e te In In te Public er Msg rfa vid Services Clouds ce o Pr ud o Cl Micro Other Clouds Services
  • 27. Cloud Foundry open PaaS - Choice of clouds d Avoi n Ap p Lo ck-i Private lic Data at Services Clouds io n Se ce r vic rfa e te In In te Public er Msg rfa vid Services Clouds ce o Pr ud o Cl Micro Other Clouds Services
  • 28. Multi-cloud flexibility is critical to your long-term success 23
  • 29. Multi-cloud flexibility is critical to your long-term success  Make use of both public and private clouds without rewriting your applications 23
  • 30. Multi-cloud flexibility is critical to your long-term success  Make use of both public and private clouds without rewriting your applications  Protect against vendor lock-in 23
  • 31. Multi-cloud flexibility is critical to your long-term success  Make use of both public and private clouds without rewriting your applications  Protect against vendor lock-in  Meet different compliance and geographical needs 23
  • 32. Multi-cloud flexibility is critical to your long-term success  Make use of both public and private clouds without rewriting your applications  Protect against vendor lock-in  Meet different compliance and geographical needs  Accommodate peak loads while optimizing costs 23
  • 33. Multi-cloud flexibility is critical to your long-term success  Make use of both public and private clouds without rewriting your applications  Protect against vendor lock-in  Meet different compliance and geographical needs  Accommodate peak loads while optimizing costs  Manage your growth and changing needs over time 23
  • 34. CloudFoundry.COM - Multi-tenant PaaS operated by VMware CloudFoundry.COM (beta) Runtimes & Frameworks Services vCenter / vSphere Infrastructure 24
  • 35. Micro Cloud FoundryTM – Industry first downloadable PaaS Micro Cloud Foundry Runtimes & Frameworks Services Your Laptop/PC Single VM instance of Cloud Foundry that runs on a developer’s MAC or PC 25
  • 36. CloudFoundry.ORG - Community open-source project CloudFoundry.ORG Your Infrastructure Download Setup Setup Deploy Behind Code Environment Scripts Firewall Apache2 license 26
  • 37. Cloud Foundry: you can trade-off effort vs flexibility Less Less Public PaaS .... .COM Private PaaS Effort .... Flexibility Custom Private PaaS git clone git://github.com/cloudfoundry/ More More 27
  • 38. Cloud Foundry Resources  Primary Site : cloudfoundry.com  Open Source Site : cloudfoundry.org  Twitter : @cloudfoundry  Blog : blog.cloudfoundry.com  FB : facebook.com/cloudfoundry  Documentation: start.cloudfoundry.com  Support : support.cloudfoundry.com • Knowledge Base • Q & A / Forums 28
  • 39. Agenda Why PaaS matters to developers Overview of Cloud Foundry Getting started with Cloud Foundry Cloud Foundry architecture Using Micro Cloud Foundry Consuming Cloud Foundry services 29
  • 40. Register http://cloudfoundry.com/signup Use promo code CFOpenTour2012 30
  • 42. Ways to use Cloud Foundry 32
  • 43. Ways to use Cloud Foundry 32
  • 44. Ways to use Cloud Foundry 32
  • 45. Ways to use Cloud Foundry 32
  • 46. Ways to use Cloud Foundry 32
  • 47. Ways to use Cloud Foundry 32
  • 48. Installing vmc on Windows 33
  • 49. Installing vmc on Windows Install the vmc gem 33
  • 50. Installing vmc on Mac OSX Use Ruby Version Manager http://beginrescueend.com/ $ bash -s stable <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) 34
  • 51. Installing vmc on Mac OSX Use Ruby Version Manager http://beginrescueend.com/ $ bash -s stable <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) $ rvm install 1.9.2 $ rvm use 1.9.2 34
  • 52. Installing vmc on Mac OSX Use Ruby Version Manager http://beginrescueend.com/ $ bash -s stable <<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) $ rvm install 1.9.2 $ rvm use 1.9.2 $ gem install vmc 34
  • 53. Example vmc commands $ vmc target <any cloud> $ vmc login <credentials> $ vmc push <my-app> ! > bind services? Yes $ vmc update <my-app> $ vmc instances <my-app> +100 35
  • 55. VMC MANIFEST DEMO check out code deploy 37
  • 56. Scale the application $ vmc instances cf1 +2 Scaling Application instances up to 3: OK $ vmc stats cf1 +----------+-------------+----------------+--------------+--------------+ | Instance | CPU (Cores) | Memory (limit) | Disk (limit) | Uptime | +----------+-------------+----------------+--------------+--------------+ | 0 | 1.2% (4) | 90.6M (512M) | 8.5M (2G) | 0d:0h:3m:3s | | 1 | 9.5% (4) | 60.9M (512M) | 8.4M (2G) | 0d:0h:0m:17s | | 2 | 9.4% (4) | 55.5M (512M) | 8.4M (2G) | 0d:0h:0m:17s | +----------+-------------+----------------+--------------+--------------+
  • 58. Install the Cloud Foundry plugin.... 40
  • 59. ... 41
  • 60. ... 42
  • 61. STS DEMO 43
  • 62.
  • 63. Recap so far…  Understand PaaS  Register for Cloud Foundry  Installed the Cloud Foundry Plugin  Logged In/Authenticated  Create a Spring MVC App  Deployed MVC App to Cloud Foundry  Hit URL from STS and Viewed MVC App  Learned about vmc 45
  • 64. Agenda Why PaaS matters to developers Overview of Cloud Foundry Getting started with Cloud Foundry Cloud Foundry architecture Using Micro Cloud Foundry Consuming Cloud Foundry services 46
  • 65. Cloud Foundry - Architecture Message Bus Message Bus Web Web Message Bus (NATS) (NATS) (NATS) 100’s of DEAs App Load Balancers Load Balancers App Load Balancers App DEAs DEAs DEAs Routers Routers Routers Cloud Cloud Controllers Cloud Controllers DB Controllers DB DB Web Service API Services Health Health Services Health Manager Services Manager Manager Client, e.g.VMC
  • 66. Application deployment flow VMC Cloud Controller DEA DEA Application Router Router 48
  • 67. Application deployment flow vmc push VMC Cloud Controller DEA DEA Application Router Router 48
  • 68. Application deployment flow vmc push VMC Cloud Controller DEA DEA Application Framework detection Router Router 48
  • 69. Application deployment flow vmc push create app VMC Cloud Controller DEA DEA Application Framework detection Router Router 48
  • 70. Application deployment flow vmc push create app VMC Cloud Controller DEA DEA Application Framework detection Framework specific staging plugin Creates Droplet Router Router 48
  • 71. Application deployment flow find DEA for app vmc push create app VMC Cloud Controller DEA DEA Application Framework detection Framework specific staging plugin Creates Droplet Router Router 48
  • 72. Application deployment flow find DEA for app vmc push I’m available create app VMC Cloud Controller DEA DEA Application Framework detection Framework specific staging plugin Creates Droplet Router Router 48
  • 73. Application deployment flow find DEA for app vmc push I’m available create app VMC Cloud Controller DEA DEA Application deploy droplet Framework detection Framework specific staging plugin Creates Droplet Router Router 48
  • 74. Application deployment flow find DEA for app vmc push I’m available create app VMC Cloud Controller start DEA DEA Application deploy droplet Framework detection Framework specific staging plugin Creates Droplet Router Router 48
  • 75. Application deployment flow find DEA for app vmc push I’m available create app VMC Cloud Controller start DEA DEA Application deploy droplet Framework detection Framework specific staging plugin update routes Creates Droplet Router Router 48
  • 76. About the staging plugin  Framework specific  Creates a zip file = black box • Contains everything necessary for DEA to run the application • Two scripts: start.sh, stop.sh 49
  • 77. Staging plugin for the Spring framework  Adds CloudAutoStagingBeanFactoryPostProcessor bean: • Modifies bean definitions • Implements auto-reconfiguration  Defines CloudApplicationContextInitializer in web.xml • Activates cloud profile • Defines PropertySource for CloudEnvironment properties 50
  • 78. VCAP_APPLICATION environment variable { "instance_id": "598f4af3b49ed5fc9bd19bef67650f61", "instance_index": 0, "name": "myapplication", "uris": ["myapp.cloudfoundry.com"], "users": ["crichardson@vmware.com"], "version": "6126ec0a1ea366c61635398f1d2824086e40aec4-1", "start": "2012-02-24 06:39:17 +0000", "runtime": "node", "state_timestamp": 1330065557, "port": 21059, "limits": { Tells your application about "fds": 256, where it is running "mem": 67108864, "disk": 2147483648 }, "host": "172.30.50.10" } String value = System.getenv("VCAP_APPLICATION") 51
  • 79. Custom Application environment variables $ vmc env-add cf1 PAYMENT_SVC=http://... Adding Environment Variable [PAYMENT_SVC=http://...]: OK Stopping Application: OK Staging Application: OK Starting Application: OK String value = System.getenv("PAYMENT_SVC") @Value("#{systemEnvironment['PAYMENT_SVC']}") private String envVariable;
  • 80. Request handling flow Load Balancer Router Application Load Balancer Router DEA 53
  • 81. Request handling flow HTTP Request Load Balancer Router Application Load Balancer Router DEA 53
  • 82. Request handling flow HTTP Request HTTP Request Load Balancer Router Application Load Balancer Router DEA 53
  • 83. Request handling flow HTTP Request HTTP Request HTTP Request Load Balancer Router Application Load Balancer Router DEA 53
  • 84. Self Healing Infrastructure  If an application instance crashes • DEA detects unexpected exit => DEA broadcasts message • Routers remove instance from routing • Health manager notifies Cloud Controller • Cloud Controller re-launches instance  If an DEA VM crashes • Application instances become unavailable • Health Manager notices the missing instances and notifies the Cloud Controller • Cloud Controller requests application instances to be started • Existing DEA will reply and start the applications
  • 85. But where are the VMs?!?  Cloud Foundry has a layered architecture • Cloud Controller, DEA, … layer = processes • VM management layer  Benefits: decoupling, simplicity, ….  CloudFoundry.com creates vSphere VMs running different Cloud Foundry components
  • 86. Recap  DEAs  Service Gateways  NATS  Cloud Controllers  Routing/Load Balancing  Health Manager 56
  • 87. Agenda  Why PaaS matters to developers  Overview of Cloud Foundry  Getting started with Cloud Foundry  Cloud Foundry architecture  Using Micro Cloud Foundry  Consuming Cloud Foundry services 57
  • 88. What is in Micro Cloud Foundry? App Instances Services Open source Platform as a Service project 10.04 A cloud packaged as a VMware Virtual Machine Use as a developer sandbox • Use the services from Junit integration tests • Deploy your application for functional testing • Remote debugging from STS 58
  • 89. Pre-requisites for using Micro Cloud Foundry Minimum 1 GB Minimum 8 GB Internet Connectivity RAM Disk (w/DHCP is ideal) VMC STS Command line GUI 59
  • 91. Register and login to CloudFoundry.com 61
  • 92. Select a domain name *.cloudfoundry.me => IP address of your machine where Micro Cloud Foundry is running 62
  • 94. Download, unzip and open micro.vmx 64
  • 95. Configure Micro Cloud Foundry 65
  • 96. Configure Micro Cloud Foundry Pick password 65
  • 97. Configure Micro Cloud Foundry Pick password Enter token 65
  • 98. Logging into Micro Cloud Foundry 66
  • 99. Logging into Micro Cloud Foundry $ vmc target api.cer-micro1.cloudfoundry.me Successfully targeted to [http://api.cer-micro1.cloudfoundry.me] 66
  • 100. Logging into Micro Cloud Foundry $ vmc target api.cer-micro1.cloudfoundry.me Successfully targeted to [http://api.cer-micro1.cloudfoundry.me] $ vmc register Email: crichardson@vmware.com Password: ******** Verify Password: ******** Creating New User: OK Attempting login to [http://api.cer-micro1.cloudfoundry.me] Successfully logged into [http://api.cer-micro1.cloudfoundry.me] 66
  • 101. Micro Cloud Foundry has all the services $ vmc services ============== System Services ============== +------------+---------+---------------------------------------+ | Service | Version | Description | +------------+---------+---------------------------------------+ | mongodb | 1.8 | MongoDB NoSQL store | | mysql | 5.1 | MySQL database service | | postgresql | 9.0 | PostgreSQL database service (vFabric) | | rabbitmq | 2.4 | RabbitMQ messaging service | | redis | 2.2 | Redis key-value store service | +------------+---------+---------------------------------------+ =========== Provisioned Services ============ $ 67
  • 102. Deploy an application in the usual way 68
  • 103. Deploy an application in the usual way $ vmc push --path target Application Name: DemoWebapp Application Deployed URL [DemoWebapp.cer-micro1.cloudfoundry.me]: Detected a Java Web Application, is this correct? [Yn]: Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: Creating Application: OK Would you like to bind any services to 'DemoWebapp'? [yN]: Uploading Application: Checking for available resources: OK Packing application: OK Uploading (3K): OK Push Status: OK Staging Application: OK Starting Application: OK 68
  • 104. Deploy an application in the usual way $ vmc push --path target Application Name: DemoWebapp Application Deployed URL [DemoWebapp.cer-micro1.cloudfoundry.me]: Detected a Java Web Application, is this correct? [Yn]: Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: Creating Application: OK Would you like to bind any services to 'DemoWebapp'? [yN]: Uploading Application: Checking for available resources: OK Packing application: OK Uploading (3K): OK Push Status: OK Staging Application: OK Starting Application: OK $ curl DemoWebapp.cer-micro1.cloudfoundry.me <html> <body> <h2>Hello World!</h2> </body> </html> Chriss-MacBook-Pro:demowebapp cer$ 68
  • 105. Offline Micro Cloud Foundry  The problem: • Cloud Foundry accessed via hostname, which is pretty cool • Hostname resolved by DNS server ==> laptop needs to be online  The solution: • Micro Cloud Foundry now supports true offline mode • New command:vmc micro • Reconfigures DNS on your machine to resolve *.cloudfoundry.me locally • Requires: vmc 0.3.16.beta4 or higher, on Mac VMware Fusion 4.x 69
  • 106. Offline Micro Cloud Foundry: vmc micro status saved in ~/.vmc_micro $ vmc micro --vmx /MyVirtualMachines/micro.vmx --vmrun /Applications/VMware Fusion.app/Contents/Library/vmrun status Please enter your Micro Cloud Foundry VM password (vcap user) password: ******** Micro Cloud Foundry VM is not running. Do you want to start it? (y, n): y Starting Micro Cloud Foundry VM: done Micro Cloud Foundry VM currently in online mode VMX Path: /Users/cer/Downloads/microCloudFoundry/micro/micro.vmx Domain: cer-micro1.cloudfoundry.me IP Address: 192.168.253.128 70
  • 107. Offline Micro Cloud Foundry: vmc micro offline/online 71
  • 108. Offline Micro Cloud Foundry: vmc micro offline/online $ vmc micro offline Please enter your Micro Cloud Foundry VM password (vcap user) password: ******** Setting Micro Cloud Foundry VM to offline mode: done Setting host DNS server: done Reconfigures DNS to use Micro Cloud Foundry as one of the DNS servers Resolves cer-micro1.cloudfoundry.me to 192.168.253.128 71
  • 109. Offline Micro Cloud Foundry: vmc micro offline/online $ vmc micro offline Please enter your Micro Cloud Foundry VM password (vcap user) password: ******** Setting Micro Cloud Foundry VM to offline mode: done Setting host DNS server: done Reconfigures DNS to use Micro Cloud Foundry as one of the DNS servers Resolves cer-micro1.cloudfoundry.me to 192.168.253.128 $ vmc micro online Please enter your Micro Cloud Foundry VM password (vcap user) password: ******** Unsetting host DNS server: done Setting Micro Cloud Foundry VM to online mode: done Undoes the change to DNS configuration 71
  • 110. Recap…  Installed the Micro Cloud Foundry  Got a Token  Configured Micro Cloud Foundry  Registered  Logged In/Authenticated  Created a Spring MVC App  Deployed MVC App to Micro Cloud Foundry  Set a breakpoint, hit URL from STS and viewed MVC App 72
  • 111. Agenda  Why PaaS matters to developers  Overview of Cloud Foundry  Getting started with Cloud Foundry  Cloud Foundry architecture  Using Micro Cloud Foundry  Consuming Cloud Foundry services 73
  • 112. Current Services Available on Cloud Foundry 74
  • 113. Creating a service instance $ vmc create-service mysql --name mysql1 Creating Service: OK $ vmc services ============== System Services ============== +------------+---------+---------------------------------------+ | Service | Version | Description | +------------+---------+---------------------------------------+ | mongodb | 1.8 | MongoDB NoSQL store | | mysql | 5.1 | MySQL database service | | postgresql | 9.0 | PostgreSQL database service (vFabric) | | rabbitmq | 2.4 | RabbitMQ messaging service | | redis | 2.2 | Redis key-value store service | +------------+---------+---------------------------------------+ =========== Provisioned Services ============ +-------------+---------+ | Name | Service | +-------------+---------+ | mysql1 | mysql | +-------------+---------+
  • 114. Binding a service to an application $ vmc push cer-spring --path web/target/ Application Deployed URL [cer-spring.cloudfoundry.com]: Detected a Java SpringSource Spring Application, is this correct? [Yn]: Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: Creating Application: OK Would you like to bind any services to 'cer-spring'? [yN]: y Would you like to use an existing provisioned service? [yN]: y The following provisioned services are available 1: mysql1 2: mysql-135e0 Please select one you wish to use: 1 Binding Service [mysql1]: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (12K): OK
  • 115. Binding a service to an application $ vmc push cer-spring --path web/target/ Application Deployed URL [cer-spring.cloudfoundry.com]: Detected a Java SpringSource Spring Application, is this correct? [Yn]: Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: Creating Application: OK Would you like to bind any services to 'cer-spring'? [yN]: y [yN]: y Would you like to bind any services to 'cer-spring'? Would you like to use anan existing provisioned service? [yN]: y Would you like to use existing provisioned service? [yN]: y The The following provisioned servicesavailable following provisioned services are are available 1: mysql1 1: mysql1 2: mysql-135e0 2: mysql-135e0 Please select one you wish to use:use: 1 Please select one you wish to 1 Binding Service [mysql1]: OK OK Binding Service [mysql1]: Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (12K): OK
  • 116. Binding a service to an application $ vmc push cer-spring --path web/target/ Application Deployed URL [cer-spring.cloudfoundry.com]: Detected a Java SpringSource Spring Application, is this correct? [Yn]: Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: Creating Application: OK Would you like to bind any services to 'cer-spring'? [yN]: y Would you like to use an existing provisioned service? [yN]: y The following provisioned services are available 1: mysql1 2: mysql-135e0 Please select one you wish to use: 1 Binding Service [mysql1]: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (12K): OK
  • 117. Binding a service to an application $ vmc bind-service mysql1 myapp Binding Service [mysql1]: OK Stopping Application 'myapp': OK Staging Application 'myapp': OK Starting Application 'myapp': OK $
  • 119. Survey application demo 79
  • 120. Uses MySQL and MongoDB @Entity public class Customer { Stored in MySQL @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String firstName; private String lastName; Stored in Mongo @RelatedDocument private SurveyInfo surveyInfo; public class SurveyInfo { public class Survey { private List<Survey> questionsAndAnswers = new ArrayList<Survey>(); String question; public List<Survey> getQuestionsAndAnswers() { String answer; return questionsAndAnswers; } 80
  • 121.
  • 122. Bindings exposed through VCAP_SERVICES environment variable { "mysql-5.1": [{ "name": "mysql1", "label": "mysql-5.1", "plan": "free", "tags": ["mysql", "mysql-5.1", "relational"], "credentials": { "name": "da81b57c25cca4c65929a223f0ed068a0", "host": "172.99.99.99", "port": 3306, "username": "secretusername", "password": "secretuserpassword" .... } }] } 82
  • 123. Accessing bound services - low-level var services = JSON.parse(process.env.VCAP_SERVICES); var creds = services['mysql-5.1'][0].credentials configure do services = JSON.parse(ENV['VCAP_SERVICES']) mysql_key = services.keys.select { |svc| svc =~ /mysql/i }.first mysql = services[mysql_key].first['credentials'] mysql_conf = {:host => mysql['hostname'], :port => mysql['port'], :username => mysql['user'], :password => mysql['password']} @@client = Mysql2::Client.new mysql_conf end 83
  • 124. Accessing bound services - high-level, Spring/Java 84
  • 125. Accessing bound services - high-level, Spring/Java CloudEnvironment environment = new CloudEnvironment(); RdbmsServiceInfo mysqlSvc = environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class); RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator(); DataSource dataSource = dataSourceCreator.createService(mysqlSvc); 84
  • 126. Accessing bound services - high-level, Spring/Java CloudEnvironment environment = new CloudEnvironment(); RdbmsServiceInfo mysqlSvc = environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class); RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator(); DataSource dataSource = dataSourceCreator.createService(mysqlSvc); <cloud:data-source id="dataSource" service-name="mysql1"> <cloud:pool pool-size="1-5"/> <cloud:connection properties="charset=utf-8"/> </cloud:data-source> ... 84
  • 127. Accessing bound services - high-level, Spring/Java CloudEnvironment environment = new CloudEnvironment(); RdbmsServiceInfo mysqlSvc = environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class); RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator(); DataSource dataSource = dataSourceCreator.createService(mysqlSvc); <cloud:data-source id="dataSource" service-name="mysql1"> <cloud:pool pool-size="1-5"/> <cloud:connection properties="charset=utf-8"/> </cloud:data-source> ... reconfigured automatically <bean id="dataSource" class="…"> … DataSource for MySQL instance … </bean> 84
  • 128. Accessing bound services - high-level, Ruby reconfigured automatically RedisHost = "127.0.0.1" RedisPort = 10000 $r = Redis.new(:host => RedisHost, :port => RedisPort) if !$r rewritten automatically production: adapter: sqlite3 database: db/production.sqlite3 85
  • 129. Recap…  Services : • SQL and NoSQL databases • Message broker • ...  Service Bindings • VCAP_SERVICES environment variable • JSON Format  Framework-dependent ways of accessing the bindings: • Parse JSON • ... • Spring, Sinatra and Rails have auto-reconfiguration 86
  • 130. Services are great but what if we want to Use database tools? Use the services from JUnit integration tests? 87
  • 131. Using Caldecott to tunnel into your services 88
  • 133.
  • 134. Running JUnit test with Caldecott Configure your test code to use port + connection info 91
  • 135. Summary 92
  • 136. Cloud Foundry is a remarkably easy way to deploy your applications 93
  • 137. Cloud Foundry = Choice 94
  • 138. .js Ap ce Private p lic Data rfa Services Clouds at te io In n er Se vid r Public vic o Clouds e Pr Msg Services In ud te o rfa Cl ce Other Micro Services Clouds
  • 139. Questions? Signup @ www.cloudfoundry.com using promo code: CFOpenTour2012
  • 140. Folks to meet •Adron Hall Iron Foundry Lead •@adron • Jeremy Voorhis Senior CF Developer @ App Fog •@jvoorhis © 2012 VMware, Inc. All rights reserved
  • 141. Thank You CloudFoundry Spring Source Samples: http://bit.ly/cloudfoundry-samples http://cloudfoundry.com Questions: @cloudfoundry •Josh -> @starbuxman or josh.long@springsource.com •Monica -> @ciberch or mwilkinson@cloudfoundry.com © 2012 VMware, Inc. All rights reserved

Editor's Notes

  1. \n
  2. \n
  3. Hello, thank you or having me. Im pleased to have the opportunity to introduce you today to Spring and the SpringSource Tool Suite \n\nMy name is Josh Long. I serve as the developer advocate for the Spring framework. I&amp;#x2019;ve used it in earnest and advocated it for many years now. i&amp;#x2019;m an author on 3 books on the technology, as well as a comitter to many of the Spring projects. Additionally, I take community activism very seriously and do my best to participate in the community. Sometimes this means answering question on Twitter, or in the forums, or helping contribute to the InfoQ.com and Artima.com communities\n
  4. \n
  5. I&amp;#x2019;m first going to take a step back and talk about why I think PaaS matters to developers like us.\nI&amp;#x2019;m then going to talk about various features of Cloud Foundry.\n
  6. Almost all the applications that I&amp;#x2019;ve developed over the past 10+ years have looked like this.\n\nEach application has consisted of a single WAR file\n
  7. So let&amp;#x2019;s imagine that you fixing a bug or working on a feature and you want to run an integration test.\n\n
  8. And to make matters worse:\n technology trends are making this simplistic architecture inadequate\n
  9. End users expect to access applications from their smart phones.\nIn fact, smart phones sales over took PC sales a year ago.\n
  10. Users expect a rich, dynamic .. experience on mobile devices and browsers.\nSimply serving up HTML or HTML+JavaScript is no longer good enough.\n
  11. Applications need to scale to support massive loads.\n
  12. We also need to be able to scale development.\nWe need to have multiple development teams\nWe need to be able to frequently update production - perhaps many times a day.\n\nThe problem is that a monolithic WAR is an obstacle to doing that.\n\n
  13. The end result is an architecture like this.\n\n
  14. It was pretty easy to dev/test a WAR.\nThe challenge we have now is that ....\n\n\n
  15. So let&amp;#x2019;s imagine that you fixing a bug or working on a feature and you want to run an integration test.\n\n
  16. So let&amp;#x2019;s imagine that you fixing a bug or working on a feature and you want to run an integration test.\n\n
  17. So what is PaaS?\n\nPaas gives you an easy way to deploy and manage your application.\nIn the Java world that means you basically upload your WAR file and the PaaS environment takes over from there.\n\nThe PaaS should also give you an easy way to scale your application up to deal with increased load; and scale your application down when the load drops.\n\nA PaaS environment should offer services such as databases, blob storage, messaging, etc.\n
  18. \n
  19. Cloud Foundry is an open-PaaS.\nYou can deploy and scale applications...\n
  20. Cloud Foundry gives you a choice of frameworks and languages.\n
  21. Cloud Foundry gives you a choice of services\n
  22. Cloud Foundry gives you a choice of Clouds\nIt is available on public Clouds such as CF.com\nYou can run it in-house in a private Cloud.\nYou can also run it as a VM on your laptop.\nI&amp;#x2019;ll talk more about these different types of CF.com in a moment.\n
  23. The suppose for multiple clouds is extremely important.\nIt means that you can run your application on public and private clouds without having to rewrite it.\n
  24. The suppose for multiple clouds is extremely important.\nIt means that you can run your application on public and private clouds without having to rewrite it.\n
  25. The suppose for multiple clouds is extremely important.\nIt means that you can run your application on public and private clouds without having to rewrite it.\n
  26. The suppose for multiple clouds is extremely important.\nIt means that you can run your application on public and private clouds without having to rewrite it.\n
  27. The suppose for multiple clouds is extremely important.\nIt means that you can run your application on public and private clouds without having to rewrite it.\n
  28. There are three different ways of using Cloud Foundry.\n\nThe first is CloudFoundry.com, which is a \n
  29. As well as the public cloud, there is MCF\nIt is a VM that you can run on your desktop or laptop.\nIt has the same frameworks and services that CloudFoundry.com has.\n\nThe micro cloud particularly useful to development and testing.\nIt is your own very private sandbox.\n
  30. There is also CloudFoundry.org, the open source project.\nIt contains all the features of CloudFoundry.com along with many community contributions.\nYou can download the source code for Cloud Foundry from github.com and run it on your own in-house infrastructure.\n
  31. so as you can see Cloud Foundry is all about choice.\nIt allows you to make very interesting tradeoffs between implementation effort and flexibility.\n\nYou can deploy your application on a public cloud - \nThat&amp;#x2019;s extremely easy but you are constrained by choices that the public cloud offers.\n\nAlternatively, you can download the source from Cloud Foundry.\nExtend CF to support additional frameworks and services.\nRun it on your own in-house hardware.\nThis gives you tremendous flexibility but of course, potentially requires a lot of development effort.\n\nThere is also the middle ground, of running a private cloud paas product based on Cloud Foundry.\n\n
  32. So that&amp;#x2019;s Cloud Foundry in a nutshell.\nThere are a great many resources that can help you get started including those shown on this slide.\n
  33. So I now want to walk you through the process of getting started with Cloud Foundry\n
  34. The first step is to register at Cloud Foundry.com\n\nYou enter your email address along with a promo code to expedite signup\n
  35. You will then get a welcome email containing your temporary password\n
  36. Once you have been signed up you can then start using CloudFoundry.com\n\nYou have several different tools to choose from.\n\nI want to begin by showing you the command line tool- vmc\n
  37. Once you have been signed up you can then start using CloudFoundry.com\n\nYou have several different tools to choose from.\n\nI want to begin by showing you the command line tool- vmc\n
  38. Once you have been signed up you can then start using CloudFoundry.com\n\nYou have several different tools to choose from.\n\nI want to begin by showing you the command line tool- vmc\n
  39. Once you have been signed up you can then start using CloudFoundry.com\n\nYou have several different tools to choose from.\n\nI want to begin by showing you the command line tool- vmc\n
  40. Once you have been signed up you can then start using CloudFoundry.com\n\nYou have several different tools to choose from.\n\nI want to begin by showing you the command line tool- vmc\n
  41. Vmc is written in Ruby so the first step is to install the Ruby runtime.\nOn Windows...\n
  42. Vmc is written in Ruby so the first step is to install the Ruby runtime.\nOn Windows...\n
  43. Vmc is written in Ruby so the first step is to install the Ruby runtime.\nOn Windows...\n
  44. Vmc is written in Ruby so the first step is to install the Ruby runtime.\nOn Windows...\n
  45. On Mac, you can use the Ruby Version Manager to install ruby.\n
  46. On Mac, you can use the Ruby Version Manager to install ruby.\n
  47. \n
  48. After you have installed VMC, the next step is to login into CloudFoundry.com\n\nYou first execute the vmc target command to tell VMC which cloud you want to use.\n\nOnce you have done that you use the login command to enter your credentials.\n\nAfter logging into you are now ready to deploy your application\n
  49. After you have installed VMC, the next step is to login into CloudFoundry.com\n\nYou first execute the vmc target command to tell VMC which cloud you want to use.\n\nOnce you have done that you use the login command to enter your credentials.\n\nAfter logging into you are now ready to deploy your application\n
  50. I&amp;#x2019;m now going to show you to deploy an application using Cloud Foundry.\nThis demo uses Java because that&amp;#x2019;s the language I&amp;#x2019;m most familiar with but you would use the exact same steps to deploy a Rails or NodeJS application, for example.\n
  51. I&amp;#x2019;m now going to show you to deploy an application using Cloud Foundry.\nThis demo uses Java because that&amp;#x2019;s the language I&amp;#x2019;m most familiar with but you would use the exact same steps to deploy a Rails or NodeJS application, for example.\n
  52. \n
  53. \n
  54. This is what happens when you run the command.\n
  55. This is what happens when you run the command.\n
  56. This is what happens when you run the command.\n
  57. This is what happens when you run the command.\n
  58. \n
  59. As well as deploying your application, vmc push can also create a manifest file.\nThis captures the information you entered about your application and eliminates the need for you to re-enter it.\n\nas you can see, this file specifies the target directory, the application name, url etc.\n\n\n\n
  60. Once you have deployed the application there are various commands that you can use.\n\nFor example, you can scale the application using the vmc scale command.\n\nIn this example, I&amp;#x2019;m added two more instances of the application.\n\n\n
  61. You can also use Cloud foundry from within STS, which is an eclipse-based IDE for building enterprise java applications.\n
  62. The\n
  63. \n
  64. \n
  65. 1. Create template app\n2. Had to explicitly enable maven dependency management\n3. Drag and drop to CF\n4. Can open home page\n5. Modifying application required &amp;#x201C;Updated and restart&amp;#x201D;\n6. Takes a while to redeploy and update the home page (no surprise really)\n
  66. \n
  67. \n
  68. I now want to spend a few minutes talking about the Cloud Foundry architecture\n
  69. This slide shows the Cloud Foundry architecture.\n\nThe CC exposes the WS API that the VMC CLI uses to manage applications and services. There are typically a few CC instances to handle the load and provide failover.\n\nThe DEAs are responsible for running and monitoring applications.\nA DEA typically runs on a VM and manages some number of application instances.\nThere are typically 100s of them.\n\nThere are routers that proxy HTTP requests to application instances.\nHandles load balancing etc.\n\nThere is also the health manager that monitors the state of the world and takes action when reality doesn&apos;t match expectations.\n\nAl these components are loosely coupled and communicate asynchronously through a message bus.\n
  70. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  71. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  72. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  73. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  74. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  75. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  76. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  77. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  78. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  79. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  80. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  81. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  82. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  83. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  84. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  85. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  86. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  87. VMC \n Detects framework\n Creates zip containing what&apos;s not been previously uploaded\n Cloud Controller\n Runs staging plugin to create Droplet\n Broadcasts for a suitable DEA\n DEAs announce availability\n Cloud Controller \n Selects DEA (first responder)\n Sends droplet to DEA\n DEA:\n Unzips droplet\n Runs start script\n Tells routers to proxy URL to instance\n Routers\n Update routing tables\n Proxy HTTP requests to application instances\n
  88. The packaging of the application into a droplet is handled by a framework-specific staging plugin.\n\nIt creates a zip file that contains everything the DEA needs to run the application.\nAt its root at two scripts: start and stop that are invoked by the DEA.\n
  89. What the staging plugin does is very dependent on the framework.\nFor example, the Spring staging plugin alters the application&amp;#x2019;s configuration.\n\n\n\n
  90. I&amp;#x2019;m going to talk about this more later but I wanted to mention it here.\nWhen Cloud Foundry runs your application, it sets certain environment variables including VCAP_APP.\nThis env var is an JSON document that contains information that the application needs.\nFor example, the application can look at this env var to determine its URL.\nThe framework runtime can look at this env var to determine what port it should run on.\n\n#MOVED\n
  91. You can also define your own custom environment variables in order to configure your application.\nYou use the env-add command to set an environment variable.\nThe application that then access that ENV var using some language/framework specific mechanism.\n\n#MOVED\n
  92. Load balancer\n Sends request to one of many Routers\n Router\n Selects application instance\n Handles sticky sessions\n Forwards request to application instance\n Application instance\n Handles request\n \n
  93. Load balancer\n Sends request to one of many Routers\n Router\n Selects application instance\n Handles sticky sessions\n Forwards request to application instance\n Application instance\n Handles request\n \n
  94. Load balancer\n Sends request to one of many Routers\n Router\n Selects application instance\n Handles sticky sessions\n Forwards request to application instance\n Application instance\n Handles request\n \n
  95. Load balancer\n Sends request to one of many Routers\n Router\n Selects application instance\n Handles sticky sessions\n Forwards request to application instance\n Application instance\n Handles request\n \n
  96. Load balancer\n Sends request to one of many Routers\n Router\n Selects application instance\n Handles sticky sessions\n Forwards request to application instance\n Application instance\n Handles request\n \n
  97. Load balancer\n Sends request to one of many Routers\n Router\n Selects application instance\n Handles sticky sessions\n Forwards request to application instance\n Application instance\n Handles request\n \n
  98. Die when you are dead\n
  99. In all of this discussion you might be wondering where the VMs are?\n
  100. \n
  101. I now want to talk Micro Cloud Foundry, which is a version of CF that you can download and run on your desktop or laptop.\n
  102. MCF is CF packaged as a VMware virtual machine.\nIt contains all the services as CloudFoundry.com\n\nIt&amp;#x2019;s especially useful as a developer sandbox:\n* You can use the services for your JUNIT integration tests\n* You can also run your application for development and testing\n\nFor Java developers\n
  103. To run MCF there are a few things that you need\n
  104. I now want to walk through the process of configuring Cloud Foundry\n
  105. The first step is to register and login to CF.com\n\n\n
  106. You then have to pick a unique domain name for your MCF.\n
  107. CF then displays a configuration token that you must later enter into MCF\n
  108. You then download and unzip MCF and open the micro.VMX\nWhich launches FUSION or VMware player\n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. Accessing MCF through a host name is pretty cool.\nBut it does require a DNS server.\nAnd until recently that required your PC to be online\nThe very latest version of MCF and VMC support a true offline mode.\n\n
  119. The vmc micro status command shows the online/offline state\n When you first run the command you need to specify the paths to the VM and vmrun command\n Those values are saved away so you don&amp;#x2019;t have to re-enter them\n
  120. You switch between online and offline modes using the vmc micro online and offline commands\n Vmc micro offline switches to offline mode\n It reconfigures DNS..\n vmc micro online switches back to online mode\n ...\n
  121. You switch between online and offline modes using the vmc micro online and offline commands\n Vmc micro offline switches to offline mode\n It reconfigures DNS..\n vmc micro online switches back to online mode\n ...\n
  122. You switch between online and offline modes using the vmc micro online and offline commands\n Vmc micro offline switches to offline mode\n It reconfigures DNS..\n vmc micro online switches back to online mode\n ...\n
  123. You switch between online and offline modes using the vmc micro online and offline commands\n Vmc micro offline switches to offline mode\n It reconfigures DNS..\n vmc micro online switches back to online mode\n ...\n
  124. You switch between online and offline modes using the vmc micro online and offline commands\n Vmc micro offline switches to offline mode\n It reconfigures DNS..\n vmc micro online switches back to online mode\n ...\n
  125. You switch between online and offline modes using the vmc micro online and offline commands\n Vmc micro offline switches to offline mode\n It reconfigures DNS..\n vmc micro online switches back to online mode\n ...\n
  126. One of the neat things about MCF is that it supports remote debugging from STS.\nLet&amp;#x2019;s look at that.\n\n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. Up until I&amp;#x2019;ve been talking about the deployment side to PaaS.\nI now want to change gears and talk about how easy it is to create and consume services on Cloud Foundry\n
  133. Cloud Foundry provides a variety of services\n
  134. With Cloud Foundry, its easy to create an instance of one of these services.\nYou use the vmc create-service command, specify the type of the service and the name.\nA few seconds later you have a running service instance, \n
  135. In order, for an application to use a service that service must be bound to the application.\nThere are a couple of different ways to do this.\nOne approach is to bind the service when the application is first deployed.\n\nThe push command as you whether you want to bind services to the application.\n
  136. In order, for an application to use a service that service must be bound to the application.\nThere are a couple of different ways to do this.\nOne approach is to bind the service when the application is first deployed.\n\nThe push command as you whether you want to bind services to the application.\n
  137. Another option is to use the bind-service command to bind a service to an already running application\n
  138. You can also bind services from within STS\n
  139. \nLet&amp;#x2019;s look at how you deploy an application that consumes Cloud Foundry services\n
  140. The survey application stores information about customers and their answers to survey questions.\n\nWhat&amp;#x2019;s particulary interesting about this application is that it uses what we call cross-store persistence.\n\nCustomers are stored in a MySQL database.\nBut the survey questions are stored in MongoDB, which is a document-oriented NoSQL database.\n\n\n
  141. \n
  142. So how does binding actually work?\n\nWhat actually happens, is that CF sets an environment variable called VCAP_SERVICES.\nLike VCAP_APPLICATION its a JSON document.\nAnd it contains information about the services that have been bound to the application.\n\nFor example, with a MySQL database VCAP_SERVICES specifies the host, port, user name, password and schema name. An application can use this information to connect to the database.\n
  143. There are a couple of different ways of accessing the service bindings.\n\nThe brute force approach is to get the value of the env var and parse the JSON.\nThat works in every language.\nBut it is a lot of work.\n
  144. Some frameworks simplify the process of accessing bound services.\nFor example, Cloud Foundry provides some really easy ways to access services from a Spring application.\n
  145. Some frameworks simplify the process of accessing bound services.\nFor example, Cloud Foundry provides some really easy ways to access services from a Spring application.\n
  146. Some frameworks simplify the process of accessing bound services.\nFor example, Cloud Foundry provides some really easy ways to access services from a Spring application.\n
  147. Ruby also has some high-level support.\nCloud Foundry can automatically reconfigure a Ruby application to talk to the bound services.\n
  148. \n
  149. So this all good stuff.\nBut what if you want to access the services outside of application.\nFor example, you might want to run a database tool to dump or restore test data.\nOr you might want to use the services from a JUNIT integration that you run in your IDE\n\n
  150. To support these use cases, Cloud foundry has a tool called Caldecott.\nCaldecott let&amp;#x2019;s you create a tunnel to a service running within CF.\nIt works with both the MCF and also CF.com\n
  151. To use caldecott you first need to install the Ruby gem.\n
  152. Once you have done that you are ready to access the services.\nLet&amp;#x2019;s look at a demo.\n
  153. \n
  154. TODO &amp;#x2013; add some animation here.\n
  155. \n
  156. TODO &amp;#x2013; add some animation here.\n
  157. \n
  158. \n
  159. \n
  160. \n
  161. \n
  162. \n
  163. \n
  164. \n
  165. \n
  166. \n
  167. \n