SlideShare une entreprise Scribd logo
1  sur  57
Télécharger pour lire hors ligne
Introduction to Cloud Foundry
for Spring & Java Developers

Eric BOTTARD
Developer Advocate
@ebottard / ebottard@vmware.com
The Open
          Platform as a Service




   Deploy and scale applications in
seconds, without locking yourself into a
             single cloud



                 CONFIDENTIAL
Eric BOTTARD

§ Developer Advocate at VMware
§   @ebottard
§   ebottard@vmware.com




                              CONFIDENTIAL
Agenda
§   What is Platform as a Service
§   Introducing Cloud Foundry
§   The benefits of being Open
§   Avoiding Vendor Lock-in
§   Demos
§   Under the Hood
§   Spring makes it Easy
§   Cloud Foundry BOSH




                                     CONFIDENTIAL
Platform as a Service
“I just want to deploy my code…”
What if…



 	
     target	
  <any	
  cloud>
 	
  
 	
     push	
  <my	
  app>

 	
     bind	
  <my	
  services>

 	
     instances	
  <my	
  app>	
  +100	
  
What’s Happening with Applications Today?
§ Frameworks are what really matter
 • Developer productivity and innovation
 • Reduce time to market


§ New application types
 • Mobile, Social, SaaS
 • Apps released early and often


§ Data intensive
 • Emerging requirements: elasticity, multi-cloud
 • Web orientation drives exponential data volumes


§ Deployed on virtual and cloud infrastructures
 • Virtualization, Cloud, PaaS
                                      CONFIDENTIAL
Do your current apps look like this?




                         Tomcat



                          .war
 Browser    Apache                     MySQL




                                               9
Chances are they will soon look like this..
                                       Tomcat



                                       search.
                                         war




 Desktop
 Browser


                                        Tomcat



 Native                                 users.
            Node.js    Message Bus       war       Mongo
 Mobile
           Front End   e.g. RabbitMQ
  App




 HTML5
 Mobile
  App
                                         Tomcat



                                         orders.
                                           war     MySQL




                                                           10
Cloud Stack - Classic Pyramid


                   Software
                  as a Service


             Platform as a Service



          Infrastructure as a Service
Cloud Stack - By Value


                   Software
                  as a Service




             Platform as a Service



                  Infrastructure
                   as a Service
Introducing...
Cloud Foundry – The Open Platform as a Service

                      Target a choice of
                      deployment clouds




Provide a choice of                         Bind a choice of
   development                                application
   frameworks                                  services


                      github.com/cloudfoundry

                             CONFIDENTIAL
Why Cloud Foundry?
Developer Agility
  • Friction-free way to develop, test and deploy applications
  • Focus on writing applications, not meddling with middleware and infrastructure

Portability without changes
  • Write once, test-scale-deploy to private/public clouds without code changes
  • Quickly build and test on a laptop and scale to the cloud

Open - The freedom to choose
  • Choice of clouds for deployment, industry frameworks, and application services
  • Extensible architecture to “future proof” for rapid cloud innovation
  • Community open-source project - access, evaluate and contribute




                                       CONFIDENTIAL
CloudFoundry.COM – Multi-Tenant PaaS Operated by
VMware
                     CloudFoundry.COM (beta)
    Frameworks



    Services




                         vCenter / vSphere


    Infrastructure
Micro Cloud FoundryTM – Cloud on a Stick
                         Micro Cloud Foundry

    Frameworks

    Services

                            Your Laptop/PC



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




                                CONFIDENTIAL
The Benefits of Being
CloudFoundry.ORG – Community Open Source Project


               github.com/cloudfoundry


§ .NET x 2                              §   Memcached
§ PHP                                   §   SQL Server
§ JRuby                                 §   Neo4j
§ Python                                §   CouchDB
§ Rails 2.x                             §   VirtualBox
§ Clojure                               §   Mono
§ Erlang                                §   Rack
§ Haskell


                       CONFIDENTIAL
CloudFoundry.ORG – Community Open Source Project
                      CloudFoundry.ORG

           Community Frameworks Contributions

               Community Services Contributions

                        Your Infrastructure

    Download          Setup                 Tool Chain & Deploy Behind
      Code         Environment                Scripts      Firewall
                                               Cloud
                                               Foundry
                                               BOSH

          Apache2
          license

                             CONFIDENTIAL
Cloud Foundry Open Source Workflow
                               cloudfoundry.com


                                            production updated ~2x/week

                                       github
                           github.com/cloudfoundry

                                            on +2 and ✓ change pushed to github

     Reviewers   +1/-1        Gerrit Code Review              +2/-2      Committers
                           reviews.cloudfoundry.org

       test verification score ✓ ✗                    git push triggers test execution

                          Jenkins CI
                          ci.cloudfoundry.org
21
                                       CONFIDENTIAL
Open Source Advantage: more features




                    CONFIDENTIAL
Open Source Advantage: more features




                    CONFIDENTIAL
Open Source Advantage: more innovation




                   CONFIDENTIAL
Open Source Advantage: more innovation




                   CONFIDENTIAL
Avoiding Vendor Lock-In
Multi-Cloud Flexibility is Critical
§ Make use of both public and private clouds without rewriting your
  applications
§ Protect against vendor lock-in
§ Meet different compliance and geographical needs
§ Manage your growth, accommodate peak loads & optimize costs

                        Public     Private       Micro
                        Clouds     Clouds        Clouds




                                  CONFIDENTIAL
Main Risk: Lock In
                        Welcome to the hotel california
                        Such a lovely place
                        Such a lovely face
                        Plenty of room at the hotel california
                        Any time of year, you can find it here


                        Last thing I remember, I was
                        Running for the door
                        I had to find the passage back
                        To the place I was before
                        ’relax,’ said the night man,
                        We are programmed to receive.
                        You can checkout any time you like,
                        But you can never leave!

                                                    -the Eagles

                     CONFIDENTIAL
Broad Industry Investment




                     CONFIDENTIAL
Cloud Foundry - Making Multi-Cloud a Reality
  Private Cloud   Management and     Public Cloud
  Distributions     Deployment        Operators




                                           .COM




                      Bare metal




                      CONFIDENTIAL
Cloud Foundry: Clouds
         § AppFog.com
           • community lead for PHP
           • PaaS for PHP


         § Joyent
           • community lead for Node.js



         § ActiveState
           • community lead for Python, Perl
           • Providers of Stackato private PaaS




                             CONFIDENTIAL
Demos
Under the Hood
Cloud Foundry Logical View
     Developers                               Users
              vmc




                         Routers


     CloudControllers    App            App


                                              HealthManager
                         Execution Agents
        Services
                            (DEA) Pool


                        Messaging


                         CONFIDENTIAL
“   Environment Variables [...] unlike custom config
    files, or other config mechanisms such as Java
    System Properties, are a language- and OS-
    agnostic standard
    The Twelve Factor App, http://www.12factor.net




                                                       35
VCAP_*
VCAP_APP_HOST = 192.168.1.13

VCAP_APP_PORT = 58121

VCAP_SERVICES =
{
  "redis-2.2": [
     {
       "name": "my-redis-service",
       "label": "redis-2.2",
       "plan": "free",
       "tags": [
          "key-value",
          "nosql",
          "redis-2.2",
          "redis"
       ],
       "credentials": {
          "hostname": "127.0.0.1",
          "host": "127.0.0.1",
          "port": 5000,
          "password": "ce7b483f-66d1-436d-8aa7-7c33a9ee31ac",
          "name": "e740add8-24ce-40f5-94ed-8a2623e0be57"
       }
     }
  ],
  "postgresql-9.0": [...]
}




                                                                36
So, you could...
Use System.getEnv(“VCAP_SERVICES”)

but it’s better to:

<dependency>
   <groupId>org.cloudfoundry</groupId>
   <artifactId>cloudfoundry-runtime</artifactId>
   <version>0.8.2</version>
</dependency>




                                                   37
CloudEnvironment & Friends

// Gives access to the VCAP_* variables
CloudEnvironment env = new CloudEnvironment();
if (env.isCloudFoundry()) {
  // Parses and retrieves info about the service named "mydb"
  RdbmsServiceInfo info =
      env.getServiceInfo("mydb", RdbmsServiceInfo.class);
  // From there, you can either...
  info.getHost();
  info.getPort();
  // ...or create a DataSource with the given info
  RdbmsServiceCreator creator = new RdbmsServiceCreator();
  DataSource ds = creator.createService(info);
}




                                                            38
Spring Makes it Easy
Spring: your local config
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
     <property name="driverClassName" value="com.mysql.jdbc.Driver" />
     <property name="url" value="jdbc:mysql://localhost:3306/mydb" />
     <property name="username" value="myuser" />
     <property name="password" value="s3cr3t" />
</bean>


<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
	    <property name="dataSource" ref="dataSource" />
	    <property name="persistenceUnitName" value="myPersistenceUnit" />
	    <property name="jpaVendorAdapter">
	    	    <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
	    	    	    <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" />
	    	    </bean>
	    </property>
</bean>




                                                                                                      40
Spring: Cloud Foundry config




                               41
Spring: Cloud Foundry config
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
     <property name="driverClassName" value="com.mysql.jdbc.Driver" />
     <property name="url" value="jdbc:mysql://localhost:3306/mydb" />
     <property name="username" value="myuser" />
     <property name="password" value="s3cr3t" />
</bean>


<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
	    <property name="dataSource" ref="dataSource" />
	    <property name="persistenceUnitName" value="myPersistenceUnit" />
	    <property name="jpaVendorAdapter">
	    	    <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
	    	    	    <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" />
	    	    </bean>
	    </property>
</bean>




                                                                                                      41
Auto-reconfiguration
§ Works for Spring, Node, Ruby
§ Spring: Uses a BeanFactoryPostProcessor
   under the hood
   • adds a jar to your app
   • modifies web.xml to load the BFPP
   • also adds correct jdbc driver jar
§ Only works if no ambiguity (80% of apps)
 • One service of a kind




                           CONFIDENTIAL
Introducing the <cloud:x> namespace
§ For the remaining 20% of apps
 • if your app uses e.g. 2 DataSources
 • or if you want more control

<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:cloud="http://schema.cloudfoundry.org/spring"
      xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://schema.cloudfoundry.org/spring
http://schema.cloudfoundry.org/spring/cloudfoundry-
spring-0.8.xsd">




                                    CONFIDENTIAL
<cloud:service-scan />
§ Scans all bound services and creates a bean for each
§ Use @Qualifier to disambiguate:
	   @Inject
	   @Qualifier("mysql-source")
	   private DataSource sourceDS;
	
	   @Inject
	   @Qualifier("mysql-destination")
	   private DataSource destDS;




                                      CONFIDENTIAL
Explicit service listing
<cloud:data-source id="beanId" service-name="mysql-db">
	   <cloud:connection properties="..."/>
	   <cloud:pool pool-size="..." max-wait-time="..."/>
</cloud:data-source>

<cloud:mongo-db-factory id="..." service-name="..." write-concern="NONE">
	   <cloud:mongo-options connections-per-host="..." max-wait-time="..."/>
</cloud:mongo-db-factory>

<cloud:rabbit-connection-factory id="..." service-name="...">
	   <cloud:rabbit-options channel-cache-size="..."/>
</cloud:rabbit-connection-factory>

<cloud:redis-connection-factory id="..." service-name="...">
	   <cloud:pool pool-size="..." max-wait-time="..."/>
</cloud:redis-connection-factory>




                                     CONFIDENTIAL
Using Profiles
§ Spring 3.1 introduced the concept of profiles
   • A set of beans that can be activated as required
   • Usually controlled by spring.profiles.active system property
   • Cloud Foundry activates “cloud” profile for you
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans
	   http://www.springframework.org/schema/beans/spring-beans.xsd">
	
	   <beans profile="profileA">
	   	    <bean id="someId" />
	   	    <bean id="onlyInProfileA"/>
	   </beans>

	   <beans profile="profileB">
	   	    <bean id="someId" />
	   </beans>
	
	   <bean id="always-present" />
</beans>
                                        CONFIDENTIAL
Using Profiles
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xmlns:cloud="http://schema.cloudfoundry.org/spring"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://schema.cloudfoundry.org/spring
http://schema.cloudfoundry.org/spring/cloudfoundry-spring-0.8.xsd">
	
	   <beans profile="default">
	   	    <bean id="dataSource" class="BasicDataSource">
             ...
	   	    </bean>
	   </beans>

	   <beans profile="cloud">
	   	    <cloud:data-source id="dataSource" service-name="mysql-db"/>
	   </beans>
	
</beans>




                                     CONFIDENTIAL
Cloud Foundry BOSH
Production Grade Cloud Foundry Clusters
§   500 – 5,000 VMs                                      cloudfoundry.com

§   40+ unique node types
§   75+ unique software packages
§   75+ unique environments
§   2x/week cf.com updates
§   24x7x365 non-stop operation
§   No-downtime deployments
§   Reliable, robust, repeatable
     deployments, updates, capacity
     adjustments
§ Small teams manage many
                                               production, staging, stress, qa, dev
     instances

Google style problem è                          Google style solution
                                      CONFIDENTIAL
Cloud Foundry BOSH
§ Cloud Foundry BOSH is an open source tool-chain for release
  engineering, deployment, and lifecycle management of large scale
  distributed services
  • Prescriptive way of creating releases and managing systems and services
  • It is not a collection of shell scripts, not a pile of Perl


§ Built to deploy and manage production-class, large scale clusters
  • Production grade Cloud Foundry clusters: 500+ VMs, 40+ jobs, 75+ packages
  • Multi-node, multi-tier, complex clusters: e.g., our Gerrit/Jenkins Cluster


§ Built for devops usage and scale by a crack team of veterans
  • A project, not a product: command line interface, YAML, etc.
  • Continuous improvement, iterative development, rough edges

github.com/cloudfoundry/bosh
                                          CONFIDENTIAL
BOSH: under the hood

          BOSH User
                      “BOSH is deployed by BOSH”

 bosh cli              director           healthmon
                                                        cloudfoundry.com




     db                 redis                  nats




                      workers           blobs               active jobs


                                                agent
                      IaaS CPI              stemcell         disk

51                                       CONFIDENTIAL
IaaS neutral by design

vSphere: battle tested implementation,
thousands of deployments                                            CPI: code complete
vCloud Director: “work in progress”, 2H 2012                        functional status: “work in progress”




                                         Cloud Foundry BOSH


                              Cloud Provider Interface (CPI)




                                                                    github.com/piston/openstack-bosh-
                                                                    cpi

                               contribute: github.com/cloudfoundry/bosh


52
                                               CONFIDENTIAL
BOSH Resources
               @DrNic
              http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/


               @BrianMMcClain
               http://www.brianmmcclain.com/2012/05/08/using-bosh-with-vsphere-part-2/


                        @VadimSpivak
                       http://www.youtube.com/watch?v=pASQT5mGc_g




https://github.com/cloudfoundry/bosh


https://groups.google.com/a/cloudfoundry.org/group/bosh-users/topics


https://github.com/piston/openstack-bosh-cpi
                                       CONFIDENTIAL
Key Takeaways
§ PaaS is the application platform for the Cloud era
§ Cloud Foundry is the Industry’s Open PaaS
  • Developer agility
  • Portability without changes
  • Open system


§ What’s next?
  • Free Signup: www.cloudfoundry.com (use “cloudtoday” as a promocode)
  • Get started: docs.cloudfoundry.com/getting-started.html
  • Learn more on the blog: blog.cloudfoundry.com
  • Download your Micro Cloud Foundry: my.cloudfoundry.com/micro
  • Get the source code: www.cloudfoundry.org
  • Follow us: @cloudfoundry
  • Watch us: www.youtube.com/cloudfoundry
                                      CONFIDENTIAL
Thank You!




Eric BOTTARD
Developer Advocate
@ebottard / ebottard@vmware.com



               CONFIDENTIAL
Credits
§ With slides and ideas from
 • Josh Long (@starbuxman)
 • Patrick Chanezon (@chanezon)


§ Images
 • http://www.sxc.hu/photo/651837
 • http://www.sxc.hu/photo/525580
 • http://www.sxc.hu/photo/1234314
 • http://www.sxc.hu/photo/1080691
 • http://www.sxc.hu/photo/1409317
 • http://www.sxc.hu/photo/830331




                                     CONFIDENTIAL

Contenu connexe

Tendances

Devops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, TektonDevops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, TektonWinton Winton
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developersDaniel Krook
 
Open Stack Cloud Services
Open Stack Cloud ServicesOpen Stack Cloud Services
Open Stack Cloud ServicesSaurabh Gupta
 
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
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service OverviewKyle Brown
 
Crash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud ComputingCrash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud ComputingMark Hinkle
 
Private Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerPrivate Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerDavinder Kohli
 
Build a Cloud Day SF - Crash Course on Open Source Cloud Computing
Build a Cloud Day SF - Crash Course on Open Source Cloud ComputingBuild a Cloud Day SF - Crash Course on Open Source Cloud Computing
Build a Cloud Day SF - Crash Course on Open Source Cloud ComputingMark Hinkle
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitMarco Ferrigno
 
OpenCloudConf: It takes an (Open Source) Village to Build a Cloud
OpenCloudConf: It takes an (Open Source) Village to Build a CloudOpenCloudConf: It takes an (Open Source) Village to Build a Cloud
OpenCloudConf: It takes an (Open Source) Village to Build a CloudMark Hinkle
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixIBM
 
LinuxFest Northwest: Crash Course in Open Source Cloud Computing
LinuxFest Northwest: Crash Course in Open Source Cloud Computing LinuxFest Northwest: Crash Course in Open Source Cloud Computing
LinuxFest Northwest: Crash Course in Open Source Cloud Computing Mark Hinkle
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampJoshua Long
 
AWS for Start-ups - Leveraging AWS for the Lean Development Cycle
AWS for Start-ups  - Leveraging AWS for the Lean Development CycleAWS for Start-ups  - Leveraging AWS for the Lean Development Cycle
AWS for Start-ups - Leveraging AWS for the Lean Development CycleAmazon Web Services
 
VMworld 2014: How I Learned to Stop Worrying and Love the Public Cloud
VMworld 2014: How I Learned to Stop Worrying and Love the Public CloudVMworld 2014: How I Learned to Stop Worrying and Love the Public Cloud
VMworld 2014: How I Learned to Stop Worrying and Love the Public CloudVMworld
 
Kafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationKafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationWinton Winton
 
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012CloudBees
 
Docker meetup talk - chicago March 2014
Docker meetup talk - chicago March 2014Docker meetup talk - chicago March 2014
Docker meetup talk - chicago March 2014Ryan Koop
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerDavid Currie
 

Tendances (20)

Devops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, TektonDevops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, Tekton
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 
Open Stack Cloud Services
Open Stack Cloud ServicesOpen Stack Cloud Services
Open Stack Cloud Services
 
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
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service Overview
 
Crash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud ComputingCrash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud Computing
 
Private Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerPrivate Cloud with Open Stack, Docker
Private Cloud with Open Stack, Docker
 
Build a Cloud Day SF - Crash Course on Open Source Cloud Computing
Build a Cloud Day SF - Crash Course on Open Source Cloud ComputingBuild a Cloud Day SF - Crash Course on Open Source Cloud Computing
Build a Cloud Day SF - Crash Course on Open Source Cloud Computing
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
 
OpenCloudConf: It takes an (Open Source) Village to Build a Cloud
OpenCloudConf: It takes an (Open Source) Village to Build a CloudOpenCloudConf: It takes an (Open Source) Village to Build a Cloud
OpenCloudConf: It takes an (Open Source) Village to Build a Cloud
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & Bluemix
 
LinuxFest Northwest: Crash Course in Open Source Cloud Computing
LinuxFest Northwest: Crash Course in Open Source Cloud Computing LinuxFest Northwest: Crash Course in Open Source Cloud Computing
LinuxFest Northwest: Crash Course in Open Source Cloud Computing
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
V fabric overview
V fabric overviewV fabric overview
V fabric overview
 
AWS for Start-ups - Leveraging AWS for the Lean Development Cycle
AWS for Start-ups  - Leveraging AWS for the Lean Development CycleAWS for Start-ups  - Leveraging AWS for the Lean Development Cycle
AWS for Start-ups - Leveraging AWS for the Lean Development Cycle
 
VMworld 2014: How I Learned to Stop Worrying and Love the Public Cloud
VMworld 2014: How I Learned to Stop Worrying and Love the Public CloudVMworld 2014: How I Learned to Stop Worrying and Love the Public Cloud
VMworld 2014: How I Learned to Stop Worrying and Love the Public Cloud
 
Kafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationKafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical Presentation
 
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
 
Docker meetup talk - chicago March 2014
Docker meetup talk - chicago March 2014Docker meetup talk - chicago March 2014
Docker meetup talk - chicago March 2014
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
 

En vedette

Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesEric Bottard
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring DataEric Bottard
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best PracticesEric Bottard
 
CloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gxCloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gxEric Bottard
 
Hands On CloudFoundry
Hands On CloudFoundryHands On CloudFoundry
Hands On CloudFoundryEric Bottard
 
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best PracticesLyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best PracticesEric Bottard
 
vagad's brochure
vagad's brochurevagad's brochure
vagad's brochureSalim Raima
 

En vedette (7)

Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring Data
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
CloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gxCloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gx
 
Hands On CloudFoundry
Hands On CloudFoundryHands On CloudFoundry
Hands On CloudFoundry
 
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best PracticesLyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
 
vagad's brochure
vagad's brochurevagad's brochure
vagad's brochure
 

Similaire à Cf intro for spring devs

Cloud Foundry Introduction and Overview
Cloud Foundry Introduction and OverviewCloud Foundry Introduction and Overview
Cloud Foundry Introduction and OverviewAndy Piper
 
Cloud Foundry for Spring Developers
Cloud Foundry for Spring DevelopersCloud Foundry for Spring Developers
Cloud Foundry for Spring DevelopersGunnar Hillert
 
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
 
V mware evolutionary cloud 12 2012
V mware evolutionary cloud 12 2012V mware evolutionary cloud 12 2012
V mware evolutionary cloud 12 2012Khazret Sapenov
 
Docker Orchestration: Welcome to the Jungle! JavaOne 2015
Docker Orchestration: Welcome to the Jungle! JavaOne 2015Docker Orchestration: Welcome to the Jungle! JavaOne 2015
Docker Orchestration: Welcome to the Jungle! JavaOne 2015Patrick Chanezon
 
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...VMworld
 
Dockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx CasablancaDockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx CasablancaMichel Courtine
 
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Patrick Chanezon
 
Smalltalk In the Cloud
Smalltalk In the CloudSmalltalk In the Cloud
Smalltalk In the CloudESUG
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...Ludovic Piot
 
Presenter manual cloud computing (specially for summer interns)
Presenter manual   cloud computing (specially for summer interns)Presenter manual   cloud computing (specially for summer interns)
Presenter manual cloud computing (specially for summer interns)XPERT INFOTECH
 
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and KubernetesDevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and KubernetesMatt Ray
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixIBM
 
Crash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud Computing Crash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud Computing Mark Hinkle
 
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...Patrick Chanezon
 
Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015Patrick Chanezon
 
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the CloudLinux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the CloudMark Hinkle
 

Similaire à Cf intro for spring devs (20)

Cloud Foundry Overview
Cloud Foundry OverviewCloud Foundry Overview
Cloud Foundry Overview
 
Cloud Foundry Introduction and Overview
Cloud Foundry Introduction and OverviewCloud Foundry Introduction and Overview
Cloud Foundry Introduction and Overview
 
Cloud Foundry for Spring Developers
Cloud Foundry for Spring DevelopersCloud Foundry for Spring Developers
Cloud Foundry for Spring Developers
 
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
 
V mware evolutionary cloud 12 2012
V mware evolutionary cloud 12 2012V mware evolutionary cloud 12 2012
V mware evolutionary cloud 12 2012
 
Docker Orchestration: Welcome to the Jungle! JavaOne 2015
Docker Orchestration: Welcome to the Jungle! JavaOne 2015Docker Orchestration: Welcome to the Jungle! JavaOne 2015
Docker Orchestration: Welcome to the Jungle! JavaOne 2015
 
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
VMworld 2015: Build and Run Cloud Native Apps in your Software Defined Data C...
 
Cloud Foundry et le Cloud vu par VMware
Cloud Foundry et le Cloud vu par VMwareCloud Foundry et le Cloud vu par VMware
Cloud Foundry et le Cloud vu par VMware
 
Dockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx CasablancaDockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx Casablanca
 
Cloud foundry and openstackcloud
Cloud foundry and openstackcloudCloud foundry and openstackcloud
Cloud foundry and openstackcloud
 
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
 
Smalltalk In the Cloud
Smalltalk In the CloudSmalltalk In the Cloud
Smalltalk In the Cloud
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
 
Presenter manual cloud computing (specially for summer interns)
Presenter manual   cloud computing (specially for summer interns)Presenter manual   cloud computing (specially for summer interns)
Presenter manual cloud computing (specially for summer interns)
 
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and KubernetesDevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on Bluemix
 
Crash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud Computing Crash Course in Open Source Cloud Computing
Crash Course in Open Source Cloud Computing
 
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...
 
Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015
 
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the CloudLinux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
 

Cf intro for spring devs

  • 1. Introduction to Cloud Foundry for Spring & Java Developers Eric BOTTARD Developer Advocate @ebottard / ebottard@vmware.com
  • 2. The Open Platform as a Service Deploy and scale applications in seconds, without locking yourself into a single cloud CONFIDENTIAL
  • 3. Eric BOTTARD § Developer Advocate at VMware § @ebottard § ebottard@vmware.com CONFIDENTIAL
  • 4. Agenda § What is Platform as a Service § Introducing Cloud Foundry § The benefits of being Open § Avoiding Vendor Lock-in § Demos § Under the Hood § Spring makes it Easy § Cloud Foundry BOSH CONFIDENTIAL
  • 5. Platform as a Service
  • 6. “I just want to deploy my code…”
  • 7. What if…   target  <any  cloud>     push  <my  app>   bind  <my  services>   instances  <my  app>  +100  
  • 8. What’s Happening with Applications Today? § Frameworks are what really matter • Developer productivity and innovation • Reduce time to market § New application types • Mobile, Social, SaaS • Apps released early and often § Data intensive • Emerging requirements: elasticity, multi-cloud • Web orientation drives exponential data volumes § Deployed on virtual and cloud infrastructures • Virtualization, Cloud, PaaS CONFIDENTIAL
  • 9. Do your current apps look like this? Tomcat .war Browser Apache MySQL 9
  • 10. Chances are they will soon look like this.. Tomcat search. war Desktop Browser Tomcat Native users. Node.js Message Bus war Mongo Mobile Front End e.g. RabbitMQ App HTML5 Mobile App Tomcat orders. war MySQL 10
  • 11. Cloud Stack - Classic Pyramid Software as a Service Platform as a Service Infrastructure as a Service
  • 12. Cloud Stack - By Value Software as a Service Platform as a Service Infrastructure as a Service
  • 14. Cloud Foundry – The Open Platform as a Service Target a choice of deployment clouds Provide a choice of Bind a choice of development application frameworks services github.com/cloudfoundry CONFIDENTIAL
  • 15. Why Cloud Foundry? Developer Agility • Friction-free way to develop, test and deploy applications • Focus on writing applications, not meddling with middleware and infrastructure Portability without changes • Write once, test-scale-deploy to private/public clouds without code changes • Quickly build and test on a laptop and scale to the cloud Open - The freedom to choose • Choice of clouds for deployment, industry frameworks, and application services • Extensible architecture to “future proof” for rapid cloud innovation • Community open-source project - access, evaluate and contribute CONFIDENTIAL
  • 16. CloudFoundry.COM – Multi-Tenant PaaS Operated by VMware CloudFoundry.COM (beta) Frameworks Services vCenter / vSphere Infrastructure
  • 17. Micro Cloud FoundryTM – Cloud on a Stick Micro Cloud Foundry Frameworks Services Your Laptop/PC Single VM instance of Cloud Foundry that runs on a developer’s MAC or PC CONFIDENTIAL
  • 19. CloudFoundry.ORG – Community Open Source Project github.com/cloudfoundry § .NET x 2 § Memcached § PHP § SQL Server § JRuby § Neo4j § Python § CouchDB § Rails 2.x § VirtualBox § Clojure § Mono § Erlang § Rack § Haskell CONFIDENTIAL
  • 20. CloudFoundry.ORG – Community Open Source Project CloudFoundry.ORG Community Frameworks Contributions Community Services Contributions Your Infrastructure Download Setup Tool Chain & Deploy Behind Code Environment Scripts Firewall Cloud Foundry BOSH Apache2 license CONFIDENTIAL
  • 21. Cloud Foundry Open Source Workflow cloudfoundry.com production updated ~2x/week github github.com/cloudfoundry on +2 and ✓ change pushed to github Reviewers +1/-1 Gerrit Code Review +2/-2 Committers reviews.cloudfoundry.org test verification score ✓ ✗ git push triggers test execution Jenkins CI ci.cloudfoundry.org 21 CONFIDENTIAL
  • 22. Open Source Advantage: more features CONFIDENTIAL
  • 23. Open Source Advantage: more features CONFIDENTIAL
  • 24. Open Source Advantage: more innovation CONFIDENTIAL
  • 25. Open Source Advantage: more innovation CONFIDENTIAL
  • 27. Multi-Cloud Flexibility is Critical § Make use of both public and private clouds without rewriting your applications § Protect against vendor lock-in § Meet different compliance and geographical needs § Manage your growth, accommodate peak loads & optimize costs Public Private Micro Clouds Clouds Clouds CONFIDENTIAL
  • 28. Main Risk: Lock In Welcome to the hotel california Such a lovely place Such a lovely face Plenty of room at the hotel california Any time of year, you can find it here Last thing I remember, I was Running for the door I had to find the passage back To the place I was before ’relax,’ said the night man, We are programmed to receive. You can checkout any time you like, But you can never leave! -the Eagles CONFIDENTIAL
  • 30. Cloud Foundry - Making Multi-Cloud a Reality Private Cloud Management and Public Cloud Distributions Deployment Operators .COM Bare metal CONFIDENTIAL
  • 31. Cloud Foundry: Clouds § AppFog.com • community lead for PHP • PaaS for PHP § Joyent • community lead for Node.js § ActiveState • community lead for Python, Perl • Providers of Stackato private PaaS CONFIDENTIAL
  • 32. Demos
  • 34. Cloud Foundry Logical View Developers Users vmc Routers CloudControllers App App HealthManager Execution Agents Services (DEA) Pool Messaging CONFIDENTIAL
  • 35. Environment Variables [...] unlike custom config files, or other config mechanisms such as Java System Properties, are a language- and OS- agnostic standard The Twelve Factor App, http://www.12factor.net 35
  • 36. VCAP_* VCAP_APP_HOST = 192.168.1.13 VCAP_APP_PORT = 58121 VCAP_SERVICES = { "redis-2.2": [ { "name": "my-redis-service", "label": "redis-2.2", "plan": "free", "tags": [ "key-value", "nosql", "redis-2.2", "redis" ], "credentials": { "hostname": "127.0.0.1", "host": "127.0.0.1", "port": 5000, "password": "ce7b483f-66d1-436d-8aa7-7c33a9ee31ac", "name": "e740add8-24ce-40f5-94ed-8a2623e0be57" } } ], "postgresql-9.0": [...] } 36
  • 37. So, you could... Use System.getEnv(“VCAP_SERVICES”) but it’s better to: <dependency> <groupId>org.cloudfoundry</groupId> <artifactId>cloudfoundry-runtime</artifactId> <version>0.8.2</version> </dependency> 37
  • 38. CloudEnvironment & Friends // Gives access to the VCAP_* variables CloudEnvironment env = new CloudEnvironment(); if (env.isCloudFoundry()) { // Parses and retrieves info about the service named "mydb" RdbmsServiceInfo info = env.getServiceInfo("mydb", RdbmsServiceInfo.class); // From there, you can either... info.getHost(); info.getPort(); // ...or create a DataSource with the given info RdbmsServiceCreator creator = new RdbmsServiceCreator(); DataSource ds = creator.createService(info); } 38
  • 40. Spring: your local config <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/mydb" /> <property name="username" value="myuser" /> <property name="password" value="s3cr3t" /> </bean> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="persistenceUnitName" value="myPersistenceUnit" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" /> </bean> </property> </bean> 40
  • 42. Spring: Cloud Foundry config <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/mydb" /> <property name="username" value="myuser" /> <property name="password" value="s3cr3t" /> </bean> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="persistenceUnitName" value="myPersistenceUnit" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" /> </bean> </property> </bean> 41
  • 43. Auto-reconfiguration § Works for Spring, Node, Ruby § Spring: Uses a BeanFactoryPostProcessor under the hood • adds a jar to your app • modifies web.xml to load the BFPP • also adds correct jdbc driver jar § Only works if no ambiguity (80% of apps) • One service of a kind CONFIDENTIAL
  • 44. Introducing the <cloud:x> namespace § For the remaining 20% of apps • if your app uses e.g. 2 DataSources • or if you want more control <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cloud="http://schema.cloudfoundry.org/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://schema.cloudfoundry.org/spring http://schema.cloudfoundry.org/spring/cloudfoundry- spring-0.8.xsd"> CONFIDENTIAL
  • 45. <cloud:service-scan /> § Scans all bound services and creates a bean for each § Use @Qualifier to disambiguate: @Inject @Qualifier("mysql-source") private DataSource sourceDS; @Inject @Qualifier("mysql-destination") private DataSource destDS; CONFIDENTIAL
  • 46. Explicit service listing <cloud:data-source id="beanId" service-name="mysql-db"> <cloud:connection properties="..."/> <cloud:pool pool-size="..." max-wait-time="..."/> </cloud:data-source> <cloud:mongo-db-factory id="..." service-name="..." write-concern="NONE"> <cloud:mongo-options connections-per-host="..." max-wait-time="..."/> </cloud:mongo-db-factory> <cloud:rabbit-connection-factory id="..." service-name="..."> <cloud:rabbit-options channel-cache-size="..."/> </cloud:rabbit-connection-factory> <cloud:redis-connection-factory id="..." service-name="..."> <cloud:pool pool-size="..." max-wait-time="..."/> </cloud:redis-connection-factory> CONFIDENTIAL
  • 47. Using Profiles § Spring 3.1 introduced the concept of profiles • A set of beans that can be activated as required • Usually controlled by spring.profiles.active system property • Cloud Foundry activates “cloud” profile for you <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <beans profile="profileA"> <bean id="someId" /> <bean id="onlyInProfileA"/> </beans> <beans profile="profileB"> <bean id="someId" /> </beans> <bean id="always-present" /> </beans> CONFIDENTIAL
  • 48. Using Profiles <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cloud="http://schema.cloudfoundry.org/spring" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://schema.cloudfoundry.org/spring http://schema.cloudfoundry.org/spring/cloudfoundry-spring-0.8.xsd"> <beans profile="default"> <bean id="dataSource" class="BasicDataSource"> ... </bean> </beans> <beans profile="cloud"> <cloud:data-source id="dataSource" service-name="mysql-db"/> </beans> </beans> CONFIDENTIAL
  • 50. Production Grade Cloud Foundry Clusters § 500 – 5,000 VMs cloudfoundry.com § 40+ unique node types § 75+ unique software packages § 75+ unique environments § 2x/week cf.com updates § 24x7x365 non-stop operation § No-downtime deployments § Reliable, robust, repeatable deployments, updates, capacity adjustments § Small teams manage many production, staging, stress, qa, dev instances Google style problem è Google style solution CONFIDENTIAL
  • 51. Cloud Foundry BOSH § Cloud Foundry BOSH is an open source tool-chain for release engineering, deployment, and lifecycle management of large scale distributed services • Prescriptive way of creating releases and managing systems and services • It is not a collection of shell scripts, not a pile of Perl § Built to deploy and manage production-class, large scale clusters • Production grade Cloud Foundry clusters: 500+ VMs, 40+ jobs, 75+ packages • Multi-node, multi-tier, complex clusters: e.g., our Gerrit/Jenkins Cluster § Built for devops usage and scale by a crack team of veterans • A project, not a product: command line interface, YAML, etc. • Continuous improvement, iterative development, rough edges github.com/cloudfoundry/bosh CONFIDENTIAL
  • 52. BOSH: under the hood BOSH User “BOSH is deployed by BOSH” bosh cli director healthmon cloudfoundry.com db redis nats workers blobs active jobs agent IaaS CPI stemcell disk 51 CONFIDENTIAL
  • 53. IaaS neutral by design vSphere: battle tested implementation, thousands of deployments CPI: code complete vCloud Director: “work in progress”, 2H 2012 functional status: “work in progress” Cloud Foundry BOSH Cloud Provider Interface (CPI) github.com/piston/openstack-bosh- cpi contribute: github.com/cloudfoundry/bosh 52 CONFIDENTIAL
  • 54. BOSH Resources @DrNic http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/ @BrianMMcClain http://www.brianmmcclain.com/2012/05/08/using-bosh-with-vsphere-part-2/ @VadimSpivak http://www.youtube.com/watch?v=pASQT5mGc_g https://github.com/cloudfoundry/bosh https://groups.google.com/a/cloudfoundry.org/group/bosh-users/topics https://github.com/piston/openstack-bosh-cpi CONFIDENTIAL
  • 55. Key Takeaways § PaaS is the application platform for the Cloud era § Cloud Foundry is the Industry’s Open PaaS • Developer agility • Portability without changes • Open system § What’s next? • Free Signup: www.cloudfoundry.com (use “cloudtoday” as a promocode) • Get started: docs.cloudfoundry.com/getting-started.html • Learn more on the blog: blog.cloudfoundry.com • Download your Micro Cloud Foundry: my.cloudfoundry.com/micro • Get the source code: www.cloudfoundry.org • Follow us: @cloudfoundry • Watch us: www.youtube.com/cloudfoundry CONFIDENTIAL
  • 56. Thank You! Eric BOTTARD Developer Advocate @ebottard / ebottard@vmware.com CONFIDENTIAL
  • 57. Credits § With slides and ideas from • Josh Long (@starbuxman) • Patrick Chanezon (@chanezon) § Images • http://www.sxc.hu/photo/651837 • http://www.sxc.hu/photo/525580 • http://www.sxc.hu/photo/1234314 • http://www.sxc.hu/photo/1080691 • http://www.sxc.hu/photo/1409317 • http://www.sxc.hu/photo/830331 CONFIDENTIAL