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

PDF
RCS Simplified: Home-Grown and Hosting Models
PDF
Simplifying and enabling rcs service delivery
PDF
From concept to cloud (cf opentour india)
PDF
Cloud Foundry for Java devs
PDF
Chan presentation final
PDF
Deep dive network requirementsfor enterprise video conferencing
PDF
Wireless Boot Camp 2010 Handout
PDF
From Selling Technology to Selling Value (2008)
RCS Simplified: Home-Grown and Hosting Models
Simplifying and enabling rcs service delivery
From concept to cloud (cf opentour india)
Cloud Foundry for Java devs
Chan presentation final
Deep dive network requirementsfor enterprise video conferencing
Wireless Boot Camp 2010 Handout
From Selling Technology to Selling Value (2008)

What's hot (10)

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

Viewers also liked (7)

PDF
CloudFoundry Bootcamp springone2gx
PDF
Devoxx France 2013 Cloud Best Practices
PDF
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
PDF
Cloud Best Practices
PDF
Cf intro for spring devs
PDF
Hands On Spring Data
PDF
vagad's brochure
CloudFoundry Bootcamp springone2gx
Devoxx France 2013 Cloud Best Practices
LyonJUG - Combo - Quick Cloud Foundry Intro + Cloud Best Practices
Cloud Best Practices
Cf intro for spring devs
Hands On Spring Data
vagad's brochure
Ad

Similar to Hands On CloudFoundry (20)

PDF
Cloud Foundry bootcamp at ContributingCode
PDF
PaaS Parade - Cloud Foundry
PDF
Cloudcamp Ghent - Cloud foundry-20111121
PDF
Thinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
PDF
RubyWorld 2011
PDF
Portrait of the developer as The Artist - SpringOne India 2012
PDF
Cloud Foundry Introduction - Canada - October 2012
PDF
What's New in Cloud Foundry
PDF
Cloud Foundry Architecture and Overview
PDF
Cloud Foundry - A Lightning Introduction
PDF
Building an Open Cloud Ecosystem with Cloud Foundry
PDF
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
PDF
Portrait of the Developer as the Artist - OpenTour Sofia
PDF
Migrating to CloudFoundry
PDF
Portrait of the Developer As "The Artist" - English Version
PDF
OSCON 2011
PDF
Cloud foundry - the building of the open paas presentation
PDF
Making a Cleaner Cloud with Open Source
PDF
Breaking through the Clouds
PDF
Cloud Foundry: Inside the Machine
Cloud Foundry bootcamp at ContributingCode
PaaS Parade - Cloud Foundry
Cloudcamp Ghent - Cloud foundry-20111121
Thinking Outside the Container: Deploying Standalone Apps to Cloud Foundry
RubyWorld 2011
Portrait of the developer as The Artist - SpringOne India 2012
Cloud Foundry Introduction - Canada - October 2012
What's New in Cloud Foundry
Cloud Foundry Architecture and Overview
Cloud Foundry - A Lightning Introduction
Building an Open Cloud Ecosystem with Cloud Foundry
SpringOne 2GX 2011 - Writing applications for Cloud Foundry using Spring and ...
Portrait of the Developer as the Artist - OpenTour Sofia
Migrating to CloudFoundry
Portrait of the Developer As "The Artist" - English Version
OSCON 2011
Cloud foundry - the building of the open paas presentation
Making a Cleaner Cloud with Open Source
Breaking through the Clouds
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

  • #2: \n
  • #3: \n
  • #4: \n
  • #5: \n
  • #6: \n
  • #7: \n
  • #8: Facile &amp;#xE0; d&amp;#xE9;velopper, tester, d&amp;#xE9;ployer.\nOui mais...\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: 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
  • #13: 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
  • #14: \n
  • #15: \n
  • #16: \n
  • #17: 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
  • #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: \n
  • #60: multi langages, multi ...\n\n
  • #61: multi langages, multi ...\n\n
  • #62: multi langages, multi ...\n\n