37
© 2009 VMware Inc. All rights reserved Confidential JSUG Spring勉強会資 Spring on Cloud Foundry SpringユーザのためのCloud Foundry講座 2012年9月26日 ヴイエムウェア株式会社

Springon cloudfoundry

Embed Size (px)

Citation preview

  • 1. JSUG SpringSpring on Cloud Foundry SpringCloud Foundry 2012926 Confidential 2009 VMware Inc. All rights reserved

2. n n Cloud Foundryn Spring On Cloud Foundry Auto Reconguration Cloud Namespace Spring Prolen 2Confidential 3. 3 Confidential 4. VMware VMware SaaS SaaS ViewThin App Zimbra End User Computing SaaS NTTSpringvFabric HypericCloudFoundry Cloud Applications PaaS vCloud vCloud DatacentervSpherevCentervShieldPublic/Private/Hybrid CloudDirector vCloud Virtualized InfrastructureExpressIaaS4Confidential 5. The complexity IT and developers face today Before Web(workow)* An actual application provisioning/update flow in a large enterprise. Image is blurred for privacy reasons5 Confidential4 6. The complexity IT and developers face today After Web(workow)target push bind instances + 100 * An actual application provisioning/update flow in a large enterprise. Image is blurred for privacy reasons6 Confidential4 7. Before WebWeb tomcat OS DBJVM/Web/App 102010 VMware, Inc. All right reserved. -7- 8. After WebWeb vmc target push bind instances + 100 vmc Cloud Foundry Cloud Foundry 2010 VMware, Inc. All right reserved.-8- 9. PaaSp p OSPaaSp Auto Cong)p Eclipse PlugIn Deploy AP JVM 10. Cloud Foundry10Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 11. Open PaaS Cloud FoundryVMwarePaaS BetaPaaS(www.cloudfoundry.com) PaaSwww.cloudfoundry.org) q q q q q q Other11Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 12. PaaSOpen PaaS Cloud Foundry Your Application Logic Java Node.js Ruby VM Groovy/GrailsVMSLA IaaS)Logic Logic Logic LogicGemFIre/ Redis RightScale RDMS MySQLDB OVF) Mongo DB VMware vCloud Director VMwareRabbitMQ vSphere 13. Cloud Foundry Cloud Foundry Clients (VMC,STS,Browser) CF Kernel (VCAP) Orchestrator(BOSH)IaaS(vSphere,AWS,vCloud Director)Hardware Server/Network/Memory/Storage 13Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 14. Cloud Foundry Clients (vmceclipse)EclipseiCloud Foundry vmci2010 VMware, Inc. All right reserved.- 14 - 15. vmc nvmc target [URL]! URLURL nvmc login [email]! nvmc push! Cloud Foundry nvmc instances [appname]! nvmc start/stop/restart/delete[appname]! start/stop/restart/delete2010 VMware, Inc. All right reserved. - 15 - 16. Cloud Foundry Cloud FoundryClients (vmc,sts,Browser) CF Kernel (VCAP) Orchestrator(BOSH)IaaS(vSphere,AWS,vCloud Director)Hardware Server/Network/Memory/Storage 16Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 17. Cloud Foundry vcap db Cloud Controller NatsHealth ManagerRouterDea Serviceappapp17Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 18. Cloud Foundry Cloud FoundryClients (vmc,sts,Browser) CF Kernel (VCAP) Orchestrator(BOSH)IaaS(vSphere,AWS,vCloud Director)Hardware Server/Network/Memory/Storage 18Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 19. Cloud Foundry 19Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 20. Deploy PaaS with BOSHSends droplet heart beats andexit messagesRouter Router Registers andRegisters andunregistersunregistersCLIRoutes REST API Routes droplet requests requests Droplet changenotications DropletCloud ControllerOrchestratesHealth Managerstart/stopCloud Controller(Start, Stop, Find)Droplet Executionrequests Agent (DEA) Periodically scansPersists dropletsfor consistencyand provisionedGuest applications Advertise servicesconsume CloudServiceControllerProvision andDatabase unprovisionService "A"Provision Service and"A" Provisioning Agent unprovision BOSH IaaS20Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 21. BOSHIaaS Cloud Foundry BOSH Cloud Provider Interface(CPI) https://github.com/piston/openstack-bosh-cpi21Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 22. Spring On Cloud Foundry22Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 23. Spring On Cloud Foundry CloudFoundryn Cloud foundryn Auto-Reconguration DIAuto-Recongurationn Auto-Recongurationn Spring Prole 23Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 24. @RequestMapping("/env")!!public void env(HttpServletResponse response) throws IOException { !!response.setContentType("text/plain"); !!PrintWriter out = response.getWriter();!!out.println("System Environment:");!!for (Map.Entry envvar : System.getenv().entrySet()) {out.println(envvar.getKey() + ": " + envvar.getValue()); !!}!}!!System().getenv().JSON{"postgresql-9.0": [{ !!"name": "env-postgresql", !!"label": "postgresql-9.0",!!! !!"username": "u50ce600bba434bacbc99e034bb415644",!!"password": "pf4dca5bd449d4732841f0c4ae3f299d0"!!} !!}] !!} !!!24Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 25. "VCAP_SERVICES: {}""Postgresql{"postgresql-9.0": [{ """name": "env-postgresql","""label": "postgresql-9.0", """plan": "free","""credentials": { """name": "de24667f9344b4eeaad6b5a2326d52faa", """host": "172.30.48.122", """hostname": "172.30.48.122","""port": 5432,"""user": "u50ce600bba434bacbc99e034bb415644", """username": "u50ce600bba434bacbc99e034bb415644", """password": "pf4dca5bd449d4732841f0c4ae3f299d0"""} ""}] ""}"""25Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 26. DIAuto-Reconguration Cloud Foundry ! Jar le Cloud Foundry ! MySQL cloudfoundry-runtimeMySQL CLOUD MySQL BeanBeanFactoryPostProc web.xml (__appCloudDataSource) essor Spring App cloudfoundry-runtimeCloudFoundry CLOUD MySQL Bean BeanFactoryPostProc (__appCloudDataSource)essorWAR le(Web App)web.xmlMySQL BeanSpring Framework (javax.sql.DataSource) Spring AppApplication Context.xml Spring FrameworkApplication Context.xmlLocal MySQL 26 Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 27. Auto-RecongurationBeanApplication Context ! !! !! !! !! !! ! """Service TypeBean type Mysql,Postgres javax.sql.DataSource Redisorg.springframework.data.redis.connection.RedisConnectionFactory MongoDBorg.springframework.data.document.mongodb.MongoDbFactory RabbitMQ org.springframework.amqp.rabbit.connection.ConnectionFactory27Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 28. Auto-Recongurationn MySQL Postgres)n Bean beanbean Spring bean 28Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 29. Auto-RecongurationAuto-Recongurationn SpringJavaWebSpringJavaWebcfAuto-recongurationn BeanAuto-reconguration 29 Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 30. Auto-RecongurationCloudFoundry WAR le(Web App) Spring App Spring App cloudfoundry-runtime cloudfoundry-runtimeBeanFactoryPostProcessorBeanFactoryPostProcessor MySQL Bean MongoDBFactoryBeanMySQL BeanMongoDBFactoryBeanSpring Framework Spring Framework MySQLMongo DB30Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 31. org.cloudfoundry:cloudfoundry-runtimedependencypom.xmldependency" "org.cloudfoundry"cloudfoundry-runtime"0.8.1" "" """" pom.xmlSpring Framework Milestone Repository""org.springframework.maven.milestone"Spring Framework Maven Milestone Repository"http://maven.springframework.org/milestone""""""31Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 32. n SpringJDBC DataSource id service-name "n DataSource " " " "32Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 33. Spring Prole Spring App Spring Framework Spring Prole cloudfoundry-runtime MySQL BeanBeanFactoryPostProcessor MongoDB Bean(javax.sql.DataSource)MySQL Bean MongoDBFactoryBean Cloud Foundry MySQLMongo DB MySQLMongo DB33Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 34. Spring Prolen SpringCloud Foundrycloud!!!! !!!! !!!!"" """""34Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 35. 35Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents . 36. n VMwarePaaSOpen PaaS Cloud foundryn Spring On Cloud Foundry Auto Reconguration Cloud Namespace Spring Prole36Copyright 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents .