SlideShare a Scribd company logo
Hands on CloudFoundry
Eric Bottard - VMware
Florent Biville - Lateral Thoughts
Eric Bottard

• Developer Advocate VMware
•   @ebottard
•   ebottard@vmware.com
Florent Biville

• Développeur chez LateralThoughts
•   @fbiville
Merci ;-)




            4
Agenda

• Pourquoi le Cloud?
• Présentation de CloudFoundry
• Maintenant, à vous




                                 5
Pourquoi le Cloud ?




                      6
Est-ce que votre application ressemble à ça?




                         Tomcat



                          .war
 Browser   Apache                      MySQL




                                               7
Nouveaux usages, nouveaux challenges




                                   8
Nouveaux usages, nouveaux challenges

• Nouveaux besoins
  – Toujours plus de clients (explosion du mobile)
  – Viralité des réseaux sociaux
  – Besoin de notification en quasi temps réel




                                                     8
Nouveaux usages, nouveaux challenges

• Nouveaux besoins
  – Toujours plus de clients (explosion du mobile)
  – Viralité des réseaux sociaux
  – Besoin de notification en quasi temps réel




                                                     8
Nouveaux usages, nouveaux challenges

• Nouveaux besoins
   – Toujours plus de clients (explosion du mobile)
   – Viralité des réseaux sociaux
   – Besoin de notification en quasi temps réel


• 1 war monolithique
   – difficile à scaler, approche tout ou rien
   – difficile à maintenir




                                                      8
Nouveaux usages, nouveaux challenges

• Nouveaux besoins
   – Toujours plus de clients (explosion du mobile)
   – Viralité des réseaux sociaux
   – Besoin de notification en quasi temps réel


• 1 war monolithique
   – difficile à scaler, approche tout ou rien
   – difficile à maintenir

• Qui provisionne vos environnements pour tests
  fonctionnels? et vos tests de perf?


                                                      8
Bientôt, vos applis ressembleront à ça
                                       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




                                                           9
Présentation de CloudFoundry




                               10
OSS community




                11
Ap
                    p lic




 Data
                       at




Services
                        io
                            n
                             Se
                                r
                                vic
                                    e
                                    In
                                      te




             Msg
                                        rfa




           Services
                                         ce




                             Other
                            Services

Additional partner
services …

                                              12
d
                                                                                               Avoi n
                                                                                               Lo ck-i
                 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




                                                                                                     13
cloudfoundry.com : offre VMware

                    CloudFoundry.COM (beta)
  Frameworks



  Services




                        vCenter / vSphere


   Infrastructure




                                              14
cloudfoundry.org : projet open-source
                     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

                                                                 15
Micro CF : le premier Cloud de poche
                        Micro Cloud Foundry

   Frameworks

   Services

                           Your Laptop/PC



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




                                              16
Déployer une application




                           17
En deux mots
vmc target <any cloud>

vmc login
  Email: you@somedomain.com
  Password: *********

vmc push myapp

vmc bind-service myservice

vmc instances myapp +10




                              18
Déployer une application




                           19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y
Application Deployed URL [ss-showcase.cloudfoundry.com]:




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y
Application Deployed URL [ss-showcase.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]:




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y
Application Deployed URL [ss-showcase.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]:
How many instances? [1]:




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y
Application Deployed URL [ss-showcase.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]:
How many instances? [1]:
Bind existing services to 'ss-showcase'? [yN]: N




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y
Application Deployed URL [ss-showcase.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]:
How many instances? [1]:
Bind existing services to 'ss-showcase'? [yN]: N
Create services to bind to 'ss-showcase'? [yN]: Y
1: blob
2: mongodb
3: mysql
4: postgresql
5: rabbitmq
6: redis




                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y
Application Deployed URL [ss-showcase.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]:
How many instances? [1]:
Bind existing services to 'ss-showcase'? [yN]: N
Create services to bind to 'ss-showcase'? [yN]: Y
1: blob
2: mongodb
3: mysql
4: postgresql
5: rabbitmq
6: redis
What kind of service?: 4



                                                        19
Déployer une application
Would you like to deploy from the current directory? [Yn]: Y
Application Name: ss-showcase
Detected a Java SpringSource Spring Application, is this
correct? [Yn]: Y
Application Deployed URL [ss-showcase.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]:
How many instances? [1]:
Bind existing services to 'ss-showcase'? [yN]: N
Create services to bind to 'ss-showcase'? [yN]: Y
1: blob
2: mongodb
3: mysql
4: postgresql
5: rabbitmq
6: redis
What kind of service?: 4
Specify the name of the service [postgresql-de404]: my-pg-db


                                                        19
Déployer une application




                           20
Déployer une application
Create another? [yN]: N




                           20
Déployer une application
Create another? [yN]: N
Would you like to save this configuration? [yN]: N




                                                     20
Déployer une application
Create another? [yN]: N
Would you like to save this configuration? [yN]: N
Creating Application: OK
Creating Service [my-pg-db]: OK
Binding Service [my-pg-db]: OK
Uploading Application:
  Checking for available resources: OK
  Processing resources: OK
  Packing application: OK
  Uploading (7K): OK
Push Status: OK
Staging Application 'ss-showcase': OK
Starting Application 'ss-showcase': OK




                                                     20
STS




      21
STS




      22
STS


      Check   Add




                    23
STS



      Drag & Drop




                    24
Maintenant, à vous !




                       25
Exercice 1




             26
Exercice 2




             27
Contrôler le Cloud




                     28
Rappel des concepts

• CloudFoundry, c’est des applications et des services
• On associe les deux via des bindings

• CloudController = REST API

• nombre d’instances, urls, mémoire, logs, stats, etc...




                                                           29
Exercice 3




             30
Consommer des services




                         31
Un point commun entre tous les OS




   “   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




                                                          32
Exercice 4




             33
Auto-reconfiguration




                       34
Mais mes applis ressemblent à ça...

<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>




                                                                                                      35
Exercice 5




             36
Bon ben voilà, merci d’être venus...




                                       37
Deux datasources sont dans un bateau




                                       38
Exercice 6




             39
Configuration explicite




                          40
Namespace <cloud: />

<cloud:data-source id="myDataSourceBean" service-name="boundServiceName" />


<cloud:mongo-db-factory id="mongoDbFactory" write-concern="FSYNC_SAFE">
    <cloud:mongo-options connections-per-host="10" max-wait-time="2000" />
</cloud:mongo-db-factory>


<!-- et bientôt : <cloud:françois />-->




                                                                              41
Les profils
     <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"...>

     <bean id="mongoTemplate"
                class="org.springframework.data.mongodb.core.MongoTemplate">
	         <constructor-arg ref="mongoDbFactory" />
	     </bean>

	     <beans profile="default">
     	     <mongo:db-factory id="mongoDbFactory"
                 dbname="test"
                 host="127.0.0.1"
                 port="27017"
                 username="foo"
                 password="bar" />
	     </beans>

	    <beans profile="cloud">
    	     <cloud:mongo-db-factory id="mongoDbFactory"
                service-name="myBoundServiceName" />
	    </beans>
</beans>



                                                                               42
Exercice 7




             43
Et si mon appli n’utilise pas Spring ?

    org.cloudfoundry.runtime.env.CloudEnvironment

    RdbmsServiceInfo serviceInfo = cloudEnvironment.getServiceInfo(
         “postgres-reporting”,
         RdbmsServiceInfo.class
    );

	   serviceInfo.getDatabase();

	   serviceInfo.getHost();

	   serviceInfo.getPort();

	   serviceInfo.getUserName();

	   serviceInfo.getPassword();




                                                                      44
Conclusion




             45
Conclusion

• CloudFoundry = le PaaS ouvert de VMware
   –   langages
   –   frameworks
   –   services
   –   cloud provider




                                            45
Conclusion

• CloudFoundry = le PaaS ouvert de VMware
   –   langages
   –   frameworks
   –   services
   –   cloud provider

• Extensible
   – open source (ASL v2)




                                            45
Conclusion

• CloudFoundry = le PaaS ouvert de VMware
   –   langages
   –   frameworks
   –   services
   –   cloud provider

• Extensible
   – open source (ASL v2)

• Simple
   – push, bind, instances++


                                            45

More Related Content

What's hot

3rd Ed Track Finals: D-Orbit
3rd Ed Track Finals: D-Orbit3rd Ed Track Finals: D-Orbit
3rd Ed Track Finals: D-Orbit
Building Global Innovators (BGI)
 
Jean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud AllianceJean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud Alliance
Stefane Fermigier
 
Recma russia billings final jul2012
Recma russia billings final jul2012Recma russia billings final jul2012
Recma russia billings final jul2012
MEC Russia
 
1610002 srx sales_deck
1610002 srx sales_deck1610002 srx sales_deck
1610002 srx sales_deck
Augustus Katende
 
Emulex Corporate Presentation: Company Overview
Emulex Corporate Presentation: Company OverviewEmulex Corporate Presentation: Company Overview
Emulex Corporate Presentation: Company Overview
Emulex Corporation
 
CATS: A Context-Aware Transportation Services Framework for Mobile Environments
CATS: A Context-Aware Transportation Services Framework for Mobile EnvironmentsCATS: A Context-Aware Transportation Services Framework for Mobile Environments
CATS: A Context-Aware Transportation Services Framework for Mobile Environments
OSGi User Group France
 
2005 Datang Mobile & TD-SCDMA
2005 Datang Mobile & TD-SCDMA 2005 Datang Mobile & TD-SCDMA
2005 Datang Mobile & TD-SCDMA
tdd.pek
 
Crsm 6 Crsm 2009 Filip Louagie The Flemish Cognitive Radio Research Cluster
Crsm 6 Crsm 2009   Filip Louagie   The Flemish Cognitive Radio Research ClusterCrsm 6 Crsm 2009   Filip Louagie   The Flemish Cognitive Radio Research Cluster
Crsm 6 Crsm 2009 Filip Louagie The Flemish Cognitive Radio Research Cluster
imec.archive
 
Spain Getting Ready For Cloud Computing
Spain Getting Ready For Cloud ComputingSpain Getting Ready For Cloud Computing
Spain Getting Ready For Cloud Computing
Carlos Domingo
 
OSGi Devcon 2009 Keynote
OSGi Devcon 2009 KeynoteOSGi Devcon 2009 Keynote
OSGi Devcon 2009 Keynote
Peter Kriens
 

What's hot (10)

3rd Ed Track Finals: D-Orbit
3rd Ed Track Finals: D-Orbit3rd Ed Track Finals: D-Orbit
3rd Ed Track Finals: D-Orbit
 
Jean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud AllianceJean-Paul Smets - Free Cloud Alliance
Jean-Paul Smets - Free Cloud Alliance
 
Recma russia billings final jul2012
Recma russia billings final jul2012Recma russia billings final jul2012
Recma russia billings final jul2012
 
1610002 srx sales_deck
1610002 srx sales_deck1610002 srx sales_deck
1610002 srx sales_deck
 
Emulex Corporate Presentation: Company Overview
Emulex Corporate Presentation: Company OverviewEmulex Corporate Presentation: Company Overview
Emulex Corporate Presentation: Company Overview
 
CATS: A Context-Aware Transportation Services Framework for Mobile Environments
CATS: A Context-Aware Transportation Services Framework for Mobile EnvironmentsCATS: A Context-Aware Transportation Services Framework for Mobile Environments
CATS: A Context-Aware Transportation Services Framework for Mobile Environments
 
2005 Datang Mobile & TD-SCDMA
2005 Datang Mobile & TD-SCDMA 2005 Datang Mobile & TD-SCDMA
2005 Datang Mobile & TD-SCDMA
 
Crsm 6 Crsm 2009 Filip Louagie The Flemish Cognitive Radio Research Cluster
Crsm 6 Crsm 2009   Filip Louagie   The Flemish Cognitive Radio Research ClusterCrsm 6 Crsm 2009   Filip Louagie   The Flemish Cognitive Radio Research Cluster
Crsm 6 Crsm 2009 Filip Louagie The Flemish Cognitive Radio Research Cluster
 
Spain Getting Ready For Cloud Computing
Spain Getting Ready For Cloud ComputingSpain Getting Ready For Cloud Computing
Spain Getting Ready For Cloud Computing
 
OSGi Devcon 2009 Keynote
OSGi Devcon 2009 KeynoteOSGi Devcon 2009 Keynote
OSGi Devcon 2009 Keynote
 

Viewers also liked

CloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gxCloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gx
Eric Bottard
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
Eric 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 Practices
Eric Bottard
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
Eric Bottard
 
Cf intro for spring devs
Cf intro for spring devsCf intro for spring devs
Cf intro for spring devs
Eric Bottard
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring Data
Eric Bottard
 
vagad's brochure
vagad's brochurevagad's brochure
vagad's brochureSalim Raima
 

Viewers also liked (7)

CloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gxCloudFoundry Bootcamp springone2gx
CloudFoundry Bootcamp springone2gx
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
 
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
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
Cf intro for spring devs
Cf intro for spring devsCf intro for spring devs
Cf intro for spring devs
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring Data
 
vagad's brochure
vagad's brochurevagad's brochure
vagad's brochure
 

Similar to Hands On CloudFoundry

Cloud Foundry bootcamp at ContributingCode
Cloud Foundry bootcamp at ContributingCodeCloud Foundry bootcamp at ContributingCode
Cloud Foundry bootcamp at ContributingCode
Chris Richardson
 
PaaS Parade - Cloud Foundry
PaaS Parade - Cloud FoundryPaaS Parade - Cloud Foundry
PaaS Parade - Cloud Foundry
martinlippert
 
Cloudcamp Ghent - Cloud foundry-20111121
Cloudcamp Ghent - Cloud foundry-20111121Cloudcamp Ghent - Cloud foundry-20111121
Cloudcamp Ghent - Cloud foundry-20111121
Lode Vermeiren
 
Thinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
Thinking Outside the Container: Deploying Standalone Apps to Cloud FoundryThinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
Thinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
Jennifer Hickey
 
RubyWorld 2011
RubyWorld 2011RubyWorld 2011
RubyWorld 2011
Derek Collison
 
Portrait of the developer as The Artist - SpringOne India 2012
Portrait of the developer as The Artist - SpringOne India 2012Portrait of the developer as The Artist - SpringOne India 2012
Portrait of the developer as The Artist - SpringOne India 2012
Patrick Chanezon
 
Cloud Foundry Introduction - Canada - October 2012
Cloud Foundry Introduction - Canada - October 2012Cloud Foundry Introduction - Canada - October 2012
Cloud Foundry Introduction - Canada - October 2012
Patrick Chanezon
 
What's New in Cloud Foundry
What's New in Cloud FoundryWhat's New in Cloud Foundry
What's New in Cloud Foundry
Jennifer Hickey
 
Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overview
rajdeep
 
Cloud Foundry - A Lightning Introduction
Cloud Foundry - A Lightning IntroductionCloud Foundry - A Lightning Introduction
Cloud Foundry - A Lightning Introduction
Andy Piper
 
Building an Open Cloud Ecosystem with Cloud Foundry
Building an Open Cloud Ecosystem with Cloud FoundryBuilding an Open Cloud Ecosystem with Cloud Foundry
Building an Open Cloud Ecosystem with Cloud Foundry
Andy Piper
 
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
trisberg
 
Portrait of the Developer as the Artist - OpenTour Sofia
Portrait of the Developer as the Artist - OpenTour SofiaPortrait of the Developer as the Artist - OpenTour Sofia
Portrait of the Developer as the Artist - OpenTour Sofia
Patrick Chanezon
 
Migrating to CloudFoundry
Migrating to CloudFoundryMigrating to CloudFoundry
Migrating to CloudFoundry
GR8Conf
 
Portrait of the Developer As "The Artist" - English Version
Portrait of the Developer As "The Artist" - English VersionPortrait of the Developer As "The Artist" - English Version
Portrait of the Developer As "The Artist" - English Version
Patrick Chanezon
 
OSCON 2011
OSCON 2011OSCON 2011
OSCON 2011
Derek Collison
 
Cloud foundry - the building of the open paas presentation
Cloud foundry - the building of the open paas presentationCloud foundry - the building of the open paas presentation
Cloud foundry - the building of the open paas presentation
Xianzhu Yue
 
Making a Cleaner Cloud with Open Source
Making a Cleaner Cloud with Open SourceMaking a Cleaner Cloud with Open Source
Making a Cleaner Cloud with Open Source
Andy Piper
 
Breaking through the Clouds
Breaking through the CloudsBreaking through the Clouds
Breaking through the Clouds
Andy Piper
 
Cloud Foundry: Inside the Machine
Cloud Foundry: Inside the MachineCloud Foundry: Inside the Machine
Cloud Foundry: Inside the Machine
Derek Collison
 

Similar to Hands On CloudFoundry (20)

Cloud Foundry bootcamp at ContributingCode
Cloud Foundry bootcamp at ContributingCodeCloud Foundry bootcamp at ContributingCode
Cloud Foundry bootcamp at ContributingCode
 
PaaS Parade - Cloud Foundry
PaaS Parade - Cloud FoundryPaaS Parade - Cloud Foundry
PaaS Parade - Cloud Foundry
 
Cloudcamp Ghent - Cloud foundry-20111121
Cloudcamp Ghent - Cloud foundry-20111121Cloudcamp Ghent - Cloud foundry-20111121
Cloudcamp Ghent - Cloud foundry-20111121
 
Thinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
Thinking Outside the Container: Deploying Standalone Apps to Cloud FoundryThinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
Thinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
 
RubyWorld 2011
RubyWorld 2011RubyWorld 2011
RubyWorld 2011
 
Portrait of the developer as The Artist - SpringOne India 2012
Portrait of the developer as The Artist - SpringOne India 2012Portrait of the developer as The Artist - SpringOne India 2012
Portrait of the developer as The Artist - SpringOne India 2012
 
Cloud Foundry Introduction - Canada - October 2012
Cloud Foundry Introduction - Canada - October 2012Cloud Foundry Introduction - Canada - October 2012
Cloud Foundry Introduction - Canada - October 2012
 
What's New in Cloud Foundry
What's New in Cloud FoundryWhat's New in Cloud Foundry
What's New in Cloud Foundry
 
Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overview
 
Cloud Foundry - A Lightning Introduction
Cloud Foundry - A Lightning IntroductionCloud Foundry - A Lightning Introduction
Cloud Foundry - A Lightning Introduction
 
Building an Open Cloud Ecosystem with Cloud Foundry
Building an Open Cloud Ecosystem with Cloud FoundryBuilding an Open Cloud Ecosystem with Cloud Foundry
Building an Open Cloud Ecosystem with Cloud Foundry
 
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
 
Portrait of the Developer as the Artist - OpenTour Sofia
Portrait of the Developer as the Artist - OpenTour SofiaPortrait of the Developer as the Artist - OpenTour Sofia
Portrait of the Developer as the Artist - OpenTour Sofia
 
Migrating to CloudFoundry
Migrating to CloudFoundryMigrating to CloudFoundry
Migrating to CloudFoundry
 
Portrait of the Developer As "The Artist" - English Version
Portrait of the Developer As "The Artist" - English VersionPortrait of the Developer As "The Artist" - English Version
Portrait of the Developer As "The Artist" - English Version
 
OSCON 2011
OSCON 2011OSCON 2011
OSCON 2011
 
Cloud foundry - the building of the open paas presentation
Cloud foundry - the building of the open paas presentationCloud foundry - the building of the open paas presentation
Cloud foundry - the building of the open paas presentation
 
Making a Cleaner Cloud with Open Source
Making a Cleaner Cloud with Open SourceMaking a Cleaner Cloud with Open Source
Making a Cleaner Cloud with Open Source
 
Breaking through the Clouds
Breaking through the CloudsBreaking through the Clouds
Breaking through the Clouds
 
Cloud Foundry: Inside the Machine
Cloud Foundry: Inside the MachineCloud Foundry: Inside the Machine
Cloud Foundry: Inside the Machine
 

Hands On CloudFoundry

  • 1. Hands on CloudFoundry Eric Bottard - VMware Florent Biville - Lateral Thoughts
  • 2. Eric Bottard • Developer Advocate VMware • @ebottard • ebottard@vmware.com
  • 3. Florent Biville • Développeur chez LateralThoughts • @fbiville
  • 5. Agenda • Pourquoi le Cloud? • Présentation de CloudFoundry • Maintenant, à vous 5
  • 7. Est-ce que votre application ressemble à ça? Tomcat .war Browser Apache MySQL 7
  • 9. Nouveaux usages, nouveaux challenges • Nouveaux besoins – Toujours plus de clients (explosion du mobile) – Viralité des réseaux sociaux – Besoin de notification en quasi temps réel 8
  • 10. Nouveaux usages, nouveaux challenges • Nouveaux besoins – Toujours plus de clients (explosion du mobile) – Viralité des réseaux sociaux – Besoin de notification en quasi temps réel 8
  • 11. Nouveaux usages, nouveaux challenges • Nouveaux besoins – Toujours plus de clients (explosion du mobile) – Viralité des réseaux sociaux – Besoin de notification en quasi temps réel • 1 war monolithique – difficile à scaler, approche tout ou rien – difficile à maintenir 8
  • 12. Nouveaux usages, nouveaux challenges • Nouveaux besoins – Toujours plus de clients (explosion du mobile) – Viralité des réseaux sociaux – Besoin de notification en quasi temps réel • 1 war monolithique – difficile à scaler, approche tout ou rien – difficile à maintenir • Qui provisionne vos environnements pour tests fonctionnels? et vos tests de perf? 8
  • 13. Bientôt, vos applis ressembleront à ça 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 9
  • 16. Ap p lic Data at Services io n Se r vic e In te Msg rfa Services ce Other Services Additional partner services … 12
  • 17. d Avoi n Lo ck-i 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 13
  • 18. cloudfoundry.com : offre VMware CloudFoundry.COM (beta) Frameworks Services vCenter / vSphere Infrastructure 14
  • 19. cloudfoundry.org : projet open-source 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 15
  • 20. Micro CF : le premier Cloud de poche Micro Cloud Foundry Frameworks Services Your Laptop/PC Single VM instance of Cloud Foundry that runs on a developer’s MAC or PC 16
  • 22. En deux mots vmc target <any cloud> vmc login Email: you@somedomain.com Password: ********* vmc push myapp vmc bind-service myservice vmc instances myapp +10 18
  • 24. Déployer une application Would you like to deploy from the current directory? [Yn]: Y 19
  • 25. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase 19
  • 26. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y 19
  • 27. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y Application Deployed URL [ss-showcase.cloudfoundry.com]: 19
  • 28. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y Application Deployed URL [ss-showcase.cloudfoundry.com]: Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: 19
  • 29. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y Application Deployed URL [ss-showcase.cloudfoundry.com]: Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: How many instances? [1]: 19
  • 30. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y Application Deployed URL [ss-showcase.cloudfoundry.com]: Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: How many instances? [1]: Bind existing services to 'ss-showcase'? [yN]: N 19
  • 31. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y Application Deployed URL [ss-showcase.cloudfoundry.com]: Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: How many instances? [1]: Bind existing services to 'ss-showcase'? [yN]: N Create services to bind to 'ss-showcase'? [yN]: Y 1: blob 2: mongodb 3: mysql 4: postgresql 5: rabbitmq 6: redis 19
  • 32. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y Application Deployed URL [ss-showcase.cloudfoundry.com]: Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: How many instances? [1]: Bind existing services to 'ss-showcase'? [yN]: N Create services to bind to 'ss-showcase'? [yN]: Y 1: blob 2: mongodb 3: mysql 4: postgresql 5: rabbitmq 6: redis What kind of service?: 4 19
  • 33. Déployer une application Would you like to deploy from the current directory? [Yn]: Y Application Name: ss-showcase Detected a Java SpringSource Spring Application, is this correct? [Yn]: Y Application Deployed URL [ss-showcase.cloudfoundry.com]: Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: How many instances? [1]: Bind existing services to 'ss-showcase'? [yN]: N Create services to bind to 'ss-showcase'? [yN]: Y 1: blob 2: mongodb 3: mysql 4: postgresql 5: rabbitmq 6: redis What kind of service?: 4 Specify the name of the service [postgresql-de404]: my-pg-db 19
  • 35. Déployer une application Create another? [yN]: N 20
  • 36. Déployer une application Create another? [yN]: N Would you like to save this configuration? [yN]: N 20
  • 37. Déployer une application Create another? [yN]: N Would you like to save this configuration? [yN]: N Creating Application: OK Creating Service [my-pg-db]: OK Binding Service [my-pg-db]: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (7K): OK Push Status: OK Staging Application 'ss-showcase': OK Starting Application 'ss-showcase': OK 20
  • 38. STS 21
  • 39. STS 22
  • 40. STS Check Add 23
  • 41. STS Drag & Drop 24
  • 46. Rappel des concepts • CloudFoundry, c’est des applications et des services • On associe les deux via des bindings • CloudController = REST API • nombre d’instances, urls, mémoire, logs, stats, etc... 29
  • 49. Un point commun entre tous les OS “ 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 32
  • 52. Mais mes applis ressemblent à ça... <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> 35
  • 54. Bon ben voilà, merci d’être venus... 37
  • 55. Deux datasources sont dans un bateau 38
  • 58. Namespace <cloud: /> <cloud:data-source id="myDataSourceBean" service-name="boundServiceName" /> <cloud:mongo-db-factory id="mongoDbFactory" write-concern="FSYNC_SAFE"> <cloud:mongo-options connections-per-host="10" max-wait-time="2000" /> </cloud:mongo-db-factory> <!-- et bientôt : <cloud:françois />--> 41
  • 59. Les profils <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"...> <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate"> <constructor-arg ref="mongoDbFactory" /> </bean> <beans profile="default"> <mongo:db-factory id="mongoDbFactory" dbname="test" host="127.0.0.1" port="27017" username="foo" password="bar" /> </beans> <beans profile="cloud"> <cloud:mongo-db-factory id="mongoDbFactory" service-name="myBoundServiceName" /> </beans> </beans> 42
  • 61. Et si mon appli n’utilise pas Spring ? org.cloudfoundry.runtime.env.CloudEnvironment RdbmsServiceInfo serviceInfo = cloudEnvironment.getServiceInfo( “postgres-reporting”, RdbmsServiceInfo.class ); serviceInfo.getDatabase(); serviceInfo.getHost(); serviceInfo.getPort(); serviceInfo.getUserName(); serviceInfo.getPassword(); 44
  • 63. Conclusion • CloudFoundry = le PaaS ouvert de VMware – langages – frameworks – services – cloud provider 45
  • 64. Conclusion • CloudFoundry = le PaaS ouvert de VMware – langages – frameworks – services – cloud provider • Extensible – open source (ASL v2) 45
  • 65. Conclusion • CloudFoundry = le PaaS ouvert de VMware – langages – frameworks – services – cloud provider • Extensible – open source (ASL v2) • Simple – push, bind, instances++ 45

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. Facile &amp;#xE0; d&amp;#xE9;velopper, tester, d&amp;#xE9;ployer.\nOui mais...\n
  8. viralit&amp;#xE9; = n&amp;#xE9;cessite l&amp;#x2019;elasticit&amp;#xE9;\ntemps r&amp;#xE9;el = peut-&amp;#xEA;tre un front-end node.js?\n\nmaintenance : un seul livrable = plus de risques &amp;#xE0; chaque d&amp;#xE9;ploiement. Egalement, fort couplage = n&amp;#xE9;cessite forte synchronisation = releases moins fr&amp;#xE9;quentes.\n\nbranche de maintenance metaboli, on attend toujours...\n\n
  9. viralit&amp;#xE9; = n&amp;#xE9;cessite l&amp;#x2019;elasticit&amp;#xE9;\ntemps r&amp;#xE9;el = peut-&amp;#xEA;tre un front-end node.js?\n\nmaintenance : un seul livrable = plus de risques &amp;#xE0; chaque d&amp;#xE9;ploiement. Egalement, fort couplage = n&amp;#xE9;cessite forte synchronisation = releases moins fr&amp;#xE9;quentes.\n\nbranche de maintenance metaboli, on attend toujours...\n\n
  10. viralit&amp;#xE9; = n&amp;#xE9;cessite l&amp;#x2019;elasticit&amp;#xE9;\ntemps r&amp;#xE9;el = peut-&amp;#xEA;tre un front-end node.js?\n\nmaintenance : un seul livrable = plus de risques &amp;#xE0; chaque d&amp;#xE9;ploiement. Egalement, fort couplage = n&amp;#xE9;cessite forte synchronisation = releases moins fr&amp;#xE9;quentes.\n\nbranche de maintenance metaboli, on attend toujours...\n\n
  11. viralit&amp;#xE9; = n&amp;#xE9;cessite l&amp;#x2019;elasticit&amp;#xE9;\ntemps r&amp;#xE9;el = peut-&amp;#xEA;tre un front-end node.js?\n\nmaintenance : un seul livrable = plus de risques &amp;#xE0; chaque d&amp;#xE9;ploiement. Egalement, fort couplage = n&amp;#xE9;cessite forte synchronisation = releases moins fr&amp;#xE9;quentes.\n\nbranche de maintenance metaboli, on attend toujours...\n\n
  12. Du coup, c&amp;#x2019;est un petit peu plus compliqu&amp;#xE9;.\nLes devs doivent se concentrer sur le dev. Laissons la plomberie au PaaS\n\n
  13. \n
  14. \n
  15. \n
  16. avoid lock-in:\n vis a vis d&amp;#x2019;un provider (eg AppFog, IronFoundry, etc)\n vis a vis de tout provider : CF inside the FW\n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. multi langages, multi ...\n\n
  60. multi langages, multi ...\n\n
  61. multi langages, multi ...\n\n