Cloud Foundry Open Tour Keynote

Framework Integration in
Cloud Foundry

Ramnivas Laddad
@ramnivas


© 2012 VMware, Inc. All rights reserved
@ramnivas

  Spring framework committer
  Cloud Foundry committer
  Main interests
  • Cloud computing
  • Aspect-oriented programming
  • Scala and functional programming
  Author of books and articles
  • AspectJ in Action (1st and 2nd edition)
  Speaker at many professional conferences
  • JavaOne, JavaPolis, SpringOne, Software Development, No Fluff Just Stuff,
    EclipseCon, O’Reilly OSCON etc.

  Active involvement in AspectJ, Spring, and Cloud Foundry
  since their early form
                                         CONFIDENTIAL

                                                                                2
Technologies “Я” Us
                                                            Closure     Java
                     AMQP         HTML5            Akka
        Mongo                                               Spring      Scala
Redis                        JSF                  Grails
        Hibernate                                                  node.js
RabbitMQ              JDBC
                                           Lift
                                                           Rails
              JMS                                                     Ruby
 Hadoop                                      Sinatra
                       Batch Job           Django
              JTA                                  Python
 MySQL                          Web Services
              JPA     Caching                  LDAP
  Postgres                     Scripting
                       Testing            Security
             Neo4j                REST
                            CONFIDENTIAL

                                                                             3
Technologies “Я” Us

                  Access logs               Network
  Routing
            Hardware failures           DNS
                                                   Storage
 Load balancing
                   Auditing           Rolling Updates
User management

                  Security               DoS
  Backups                                             DBA

            OS                        Monitoring
                    Patches
                       CONFIDENTIAL

                                                             4
Facets of complexity: Product
 More functionality
 Time to market pressure
 Complex integration
 Higher stake in quality




                            CONFIDENTIAL

                                           5
Facets of complexity: Development
 Sound architecture: future proofing without overdoing
 Unit and integration tests
 Responding to changing business needs
 Confusing technology landscape




                               CONFIDENTIAL

                                                          6
Facets of complexity: Deployment and
operation
 Choosing the right hardware, operating system, web server
 Monitoring applications
 Responding to scalability needs
 Dealing with hardware- and system-level failures
 Upgrading without substantial down time




                              CONFIDENTIAL

                                                              7
Inherent vs. Apparent Complexity



                                   What can we do
                                       about this?




   Implementation overhead
                                                            Apparent
        Implementation                                     complexity
                                                Inherent
        Functional logic                       complexity




                    CONFIDENTIAL

                                                                        8
What can we do?




                  ?
                  CONFIDENTIAL

                                 9
Three layers of Cloud Computing

                  SaaS
  Software as a Service




                  PaaS
  Platform as a Service




                   IaaS
    Infrastructure as a
                Service

                          CONFIDENTIAL

                                         10
Cloud Foundry open PaaS - Choice of clouds




      Data
     Services
                                                              Private
                                                              Clouds
                  Msg                                    Public
                Services
                                                         Clouds

                            Other
                                                     Micro
                           Services
                                                     Clouds


                                      CONFIDENTIAL

                                                                        11
Cloud Foundry open PaaS - Choice of clouds




          Data
         Services
                                                                  Private
                                                                  Clouds    Partners

                      Msg                                    Public
                    Services
                                                             Clouds

                                Other
                                                         Micro
                               Services
                                                         Clouds

Apache2 license
                                          CONFIDENTIAL

                                                                                       12
Frameworks in Cloud Foundry




           CONFIDENTIAL

                              13
The Cloud Foundry Universe




                   Core Frameworks




          Community and Partner contributions



                          CONFIDENTIAL

                                                14
Core Runtimes and Frameworks
 Java
 • Spring
 • Grails
 • Lift
 Ruby
 • Rails
 • Sinatra
 • Rack
 Node.js (Community lead: Joyent)




                              CONFIDENTIAL

                                             15
Community and partners contributions
 Python
    • Django
    • WSGI
   Erlang OTP/Rebar
   PHP
   Perl
   .Net
    • On Iron Foundry




                        CONFIDENTIAL

                                       16
The Platinum Rule




     Treat each framework
the way it will like to be treated!



                    CONFIDENTIAL

                                      17
Common Framework Support




          CONFIDENTIAL

                           18
Command-line access
 Create apps and services
 Update bindings, memory etc.
 Scale instances




 $ vmc push conference
 $ vmc create-service mysql conf-db
 $ vmc bind-service conf-db conference
 $ vmc instances conference +2

                                 CONFIDENTIAL

                                                19
Access to services and app info
 Access to services and app info through environment variables
 • Service host, port, credentials
 • App ip and port
   VCAP_SERVICES: {
       "postgresql-9.0": [{
            "name": "env-postgresql",
            "label": "postgresql-9.0",
            "plan": "free",
            "credentials": {
                "name": "de24667f9344b4eeaad6b5a2326d52faa",
                "host": "172.30.48.122",
                "port": 5432,
                "user": "u50ce600bba434bacbc99e034bb415644",
                "password": "pf4dca5bd449d4732841f0c4ae3f299d0"
            }
       }]
                                           CONFIDENTIAL
   }                                                              20
Simplified app configration
 A runtime library to access service and app info
 Auto-reconfiguration for typical apps
 • Node.js coming soon




                                CONFIDENTIAL

                                                     21
Access to service through Caldecott

 $ vmc tunnel conf-db
 Binding Service [conf-db]: OK
 Stopping Application 'caldecott': OK
 Staging Application 'caldecott': OK
 Starting Application 'caldecott': OK
 Getting tunnel connection info: OK

 Service connection info:
  username : uG5jVXaBPmjl6
  password : pE3HOwIwGgkbv
  name : d76e62447a4c04f2b8e7b79f41c450aa0

 Starting tunnel to conf-db on port 10000.
 1: none
 2: mysql
 3: mysqldump
 Which client would you like to start?: 2

                                    CONFIDENTIAL

                                                   22
Access to service through Caldecott

 Launching 'mysql --protocol=TCP --host=localhost --port=10000
          --user=uG5jVXaBPmjl6
          --password=pE3HOwIwGgkbv
          d76e62447a4c04f2b8e7b79f41c450aa0'

 ...


 mysql> select * from users;




                                  CONFIDENTIAL

                                                                 23
Manifest Support
       ---
       applications:
        .:
             name: conference
             url: ${name}.${target-base}
             framework:
              name: rails3
              info:
               mem: 256M
               description: Rails Application
               exec:
             mem: 256M
             instances: 1
             services:
              conf-db:
               type: mysql
                                     CONFIDENTIAL

                                                    24
Spring




 CONFIDENTIAL

                25
The Platinum Rule: Spring and Grails
 IDE integration
    • SpringSource Tools Suite and Eclipse
    • Open source
   Auto-reconfiguration by hooking into Spring application context
   <cloud:> namespace
   Spring 3.1 profile support
   Maven plugin




                                      CONFIDENTIAL

                                                                      26
IDE Integration




                  CONFIDENTIAL

                                 27
Auto-Reconfiguration: Relational DB
 Detects beans of type javax.sql.DataSource
 Connects to MySQL or PostgreSQL services
    • Specifies driver, url, username, password, validation query
 Creates Commons DBCP or Tomcat DataSource

<bean class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close" id="dataSource">
 <property name="driverClassName" value="org.h2.Driver" />
 <property name="url" value="jdbc:h2:mem:" />
 <property name="username" value="sa" />
 <property name="password" value="" />
</bean>
                                    CONFIDENTIAL

                                                                    28
<cloud:service-scan>
 Scans all services bound to the application and creates a bean of
 an appropriate type for each
    • Same bean types as auto-reconfiguration
 Useful during early development phases



        <beans …>
           <cloud:service-scan/>
        </beans>




                                   CONFIDENTIAL

                                                                      29
<cloud:service-scan> Autowire Dependencies
 Created beans can be autowired as dependencies
 Use @Qualifier with service name if multiple services of same type
 bound to app


@Autowired(required=false) private ConnectionFactory rabbitConnectionFactory;


@Autowired private RedisConnectionFactory redisConnectionFactory;


@Autowired @Qualifier("test_mysql_database")
private DataSource mysqlDataSource;


@Autowired(required=false) @Qualifier("test_postgres_database")
private DataSource postgresDataSource;

                                   CONFIDENTIAL

                                                                                30
<cloud:data-source>
 Configures a DataSource bean
     • Commons DBCP or Tomcat DataSource
 Basic attributes:
     • id: defaults to service name
     • service-name: only needed if you have multiple relational database
      services bound to the app




            <cloud:data-source id="dataSource"/>




                                      CONFIDENTIAL

                                                                            31
Isolating Cloud Foundry Configuration

<bean class="org.sf.orm.jpa.LocalContainerEntityManagerFactoryBean"
      id="entityManagerFactory">
  <property name="dataSource" ref="dataSource"/>
</bean>


<beans profile="cloud">
  <cloud:data-source id="dataSource" />
</beans>


<beans profile="default">
  <bean class=”o.a.commons.dbcp.BasicDataSource" id="dataSource">
   <property name="url" value="jdbc:mysql://localhost/inventory" />
 </bean>
</beans>                            CONFIDENTIAL

                                                                      32
Scala/Lift
  Auto-reconfiguration for Scala Lift apps
  PostgreSQL support coming soon




                              CONFIDENTIAL

                                              33
Ruby




CONFIDENTIAL

               34
The Platinum Rule: Rails, Sinatra, Rack
 Bundle support
 • Just include a Gemfile.lock
 Rails console
 • Debugging
 Auto-reconfiguration through meta-programming
 cf-runtime gem




                                 CONFIDENTIAL

                                                  35
Rails Console
$ vmc rails-console conf
Connecting to 'conf' console: OK
irb():001:0> u = User.find_by_email('ramnivas@ramnivas.com')
=> #<User id: 1, email: "ramnivas@ramnivas.com", reason: "It is cool!",
created_at: "2012-03-29 23:10:34", updated_at: "2012-03-29 23:10:34">
irb():002:0> u.email = "rladdad@vmware.com"
=> "rladdad@vmware.com"
irb():003:0> u.save
=> true
irb():004:0> u = User.find_by_email('rladdad@vmware.com')
=> #<User id: 1, email: "rladdad@vmware.com", reason: "It is cool!",
created_at: "2012-03-29 23:10:34", updated_at: "2012-03-29 23:14:17">


                                   CONFIDENTIAL

                                                                          36
Ruby auto-reconfiguration

require 'mongo'

module Demo
 class App < Sinatra::Base
  configure do
    mongo = Mongo::Connection.new(:host => '127.0.0.1',
                     :port => 27017)
    db = mongo['db']
  end
  ...
 end
end




                                CONFIDENTIAL

                                                          37
cf-runtime: Ruby Runtime Gem



require 'cfruntime/mongodb'
connection =
 CFRuntime::MongoClient.create_from_svc('docs')
db = connection.db
...




                              CONFIDENTIAL

                                                  38
Running locally and in Cloud Foundry


require 'cfruntime/mongodb'
...
db = CFRuntime::MongoClient.create.db
      rescue Mongo::Connection.new("localhost",
                       27017)
                    .db("db”)
...



                                CONFIDENTIAL

                                                  39
Taking full control

 if CFRuntime::CloudApp.running_in_cloud?
   @service_props = CFRuntime::CloudApp.service_props('docs’)
 else
   @service_props = {}
   @service_props[:host] = 'localhost'
   @service_props[:port] = 27017
   @service_props[:db] = 'testdb'
 end
 db = Mongo::Connection.new(@service_props[:host],
                  @service_props[:port])
               .db(@service_props[:db])
 if CFRuntime::CloudApp.running_in_cloud?
   db.authenticate(@service_props[:username],
            @service_props[:password])
 end



                                  CONFIDENTIAL

                                                                40
Node.js




 CONFIDENTIAL

                41
The Platinum Rule: Node.js
 NPM support
 • Coming soon!
 Debugging using node-inspector
 Auto-reconfiguration and runtime package
 • Coming soon!




                              CONFIDENTIAL

                                             42
Debugging node.js apps




                   CONFIDENTIAL

                                  43
Auto-reconfiguration in node.js
var host = 'localhost',
  port = 3000,
  url = require('url');

var client = require("redis").createClient();

require('http').createServer(function (req, res) {
 ...




                                 CONFIDENTIAL

                                                     44
Accessing apps and services info
var cfruntime = require('cfruntime'),
  host = cfruntime.CloudApp.host || 'localhost',
  port = cfruntime.CloudApp.port || 3000,
  url = require('url');

if (cfruntime.CloudApp.runningInCloud) {
  var client = cfruntime.RedisClient.create();
} else {
  var client = require("redis").createClient();
}

require('http').createServer(function (req, res) {
 ...




                                  CONFIDENTIAL

                                                     45
Peeking into future




       CONFIDENTIAL

                      46
Standalone apps
 Bring your own container
 • Jetty
 • Netty
 •…
 Non-web apps
 • Resque workers
 • Spring Batch
 • Spring Integration


 Still to come
 • Short-running apps
 • Scheduled tasks



                             CONFIDENTIAL

                                            47
Enhanced Scala Support
 Lift updated support
 Play!
 Akka




                         CONFIDENTIAL

                                        48
Improved Tools
 Revamped vmc
 • Embeddable core
 • Scripting friendly
 • Even more intuitive user interaction
 Eclipse plugin
 • Enhanced wizard with service requirement detection
 • Manifest support
 • Caldecott integration




                                      CONFIDENTIAL

                                                        49
Questions?


Ramnivas Laddad
@ramnivas


© 2012 VMware, Inc. All rights reserved
1 of 50

Recommended

9 dani künzli citrix cloud solution 2 by
9 dani künzli citrix cloud solution 29 dani künzli citrix cloud solution 2
9 dani künzli citrix cloud solution 2Digicomp Academy AG
688 views35 slides
Daniel künzli net scaler 10 by
Daniel künzli net scaler 10Daniel künzli net scaler 10
Daniel künzli net scaler 10Digicomp Academy AG
1.7K views34 slides
Smalltalk In the Cloud by
Smalltalk In the CloudSmalltalk In the Cloud
Smalltalk In the CloudESUG
1.1K views37 slides
Softchoice Webinar Series: VMware vSphere 5.1 Changes by
Softchoice Webinar Series: VMware vSphere 5.1 ChangesSoftchoice Webinar Series: VMware vSphere 5.1 Changes
Softchoice Webinar Series: VMware vSphere 5.1 ChangesSoftchoice Corporation
1.9K views31 slides
Cloud Foundry et le Cloud vu par VMware by
Cloud Foundry et le Cloud vu par VMwareCloud Foundry et le Cloud vu par VMware
Cloud Foundry et le Cloud vu par VMwarePublicis Sapient Engineering
1.3K views22 slides
Automating Security for the Cloud - Make it Easy, Make it Safe by
Automating Security for the Cloud - Make it Easy, Make it SafeAutomating Security for the Cloud - Make it Easy, Make it Safe
Automating Security for the Cloud - Make it Easy, Make it SafeCloudPassage
831 views46 slides

More Related Content

What's hot

Joyent Cloud Data Sheet by
Joyent Cloud Data SheetJoyent Cloud Data Sheet
Joyent Cloud Data SheetScott Herson
390 views2 slides
Cisco open network environment by
Cisco open network environmentCisco open network environment
Cisco open network environmentdeepers
1.7K views17 slides
Presenter manual cloud computing (specially for summer interns) by
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
582 views8 slides
BayThreat Why The Cloud Changes Everything by
BayThreat Why The Cloud Changes EverythingBayThreat Why The Cloud Changes Everything
BayThreat Why The Cloud Changes EverythingCloudPassage
690 views42 slides
Cloud Application Platforms – Reality & Promise by
Cloud Application Platforms – Reality & PromiseCloud Application Platforms – Reality & Promise
Cloud Application Platforms – Reality & PromiseIntel Corporation
740 views27 slides
A Hitchhiker's Guide to the Inter-Cloud by
A Hitchhiker's Guide to the Inter-CloudA Hitchhiker's Guide to the Inter-Cloud
A Hitchhiker's Guide to the Inter-CloudGovCloud Network
4K views16 slides

What's hot(20)

Joyent Cloud Data Sheet by Scott Herson
Joyent Cloud Data SheetJoyent Cloud Data Sheet
Joyent Cloud Data Sheet
Scott Herson390 views
Cisco open network environment by deepers
Cisco open network environmentCisco open network environment
Cisco open network environment
deepers1.7K views
Presenter manual cloud computing (specially for summer interns) by XPERT INFOTECH
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 INFOTECH582 views
BayThreat Why The Cloud Changes Everything by CloudPassage
BayThreat Why The Cloud Changes EverythingBayThreat Why The Cloud Changes Everything
BayThreat Why The Cloud Changes Everything
CloudPassage690 views
Cloud Application Platforms – Reality & Promise by Intel Corporation
Cloud Application Platforms – Reality & PromiseCloud Application Platforms – Reality & Promise
Cloud Application Platforms – Reality & Promise
Intel Corporation740 views
A Hitchhiker's Guide to the Inter-Cloud by GovCloud Network
A Hitchhiker's Guide to the Inter-CloudA Hitchhiker's Guide to the Inter-Cloud
A Hitchhiker's Guide to the Inter-Cloud
GovCloud Network4K views
Mon1420 build clouds-oliviermaes-citrix by eurocloud
Mon1420 build clouds-oliviermaes-citrixMon1420 build clouds-oliviermaes-citrix
Mon1420 build clouds-oliviermaes-citrix
eurocloud504 views
IAPP Atlanta Chapter Meeting 2013 February by Phil Agcaoili
IAPP Atlanta Chapter Meeting 2013 FebruaryIAPP Atlanta Chapter Meeting 2013 February
IAPP Atlanta Chapter Meeting 2013 February
Phil Agcaoili652 views
Symantec VMworld 2011 News by Symantec
Symantec VMworld 2011 NewsSymantec VMworld 2011 News
Symantec VMworld 2011 News
Symantec928 views
g Eclipse @ Eclipse Summit Europe 2008 by guest462d7
g Eclipse @ Eclipse Summit Europe 2008g Eclipse @ Eclipse Summit Europe 2008
g Eclipse @ Eclipse Summit Europe 2008
guest462d7696 views
RightScale Introduction, Amazon EBS by Matt Small
RightScale Introduction, Amazon EBSRightScale Introduction, Amazon EBS
RightScale Introduction, Amazon EBS
Matt Small877 views
Onboarding For Public Private And Hybrid Clouds Aws 30.04.09 by Chris Purrington
Onboarding For Public Private And Hybrid Clouds Aws 30.04.09Onboarding For Public Private And Hybrid Clouds Aws 30.04.09
Onboarding For Public Private And Hybrid Clouds Aws 30.04.09
Chris Purrington659 views
MAY 6, 2012: Interop Las Vegas "Why Open Clouds Are Winning" by troyangrignon
MAY 6, 2012: Interop Las Vegas "Why Open Clouds Are Winning"MAY 6, 2012: Interop Las Vegas "Why Open Clouds Are Winning"
MAY 6, 2012: Interop Las Vegas "Why Open Clouds Are Winning"
troyangrignon347 views
e-Infrastructures for Science and Industry by Wolfgang Gentzsch
e-Infrastructures for Science and Industrye-Infrastructures for Science and Industry
e-Infrastructures for Science and Industry
Wolfgang Gentzsch568 views
20120609 cod mms_feedback_osamut by Osamu Takazoe
20120609 cod mms_feedback_osamut20120609 cod mms_feedback_osamut
20120609 cod mms_feedback_osamut
Osamu Takazoe876 views
Microsoft Best Practices - AWS India Summit 2012 by Amazon Web Services
Microsoft Best Practices - AWS India Summit 2012Microsoft Best Practices - AWS India Summit 2012
Microsoft Best Practices - AWS India Summit 2012
Open stack for open source private cloud 20120425-shanghai by OpenCity Community
Open stack for open source  private cloud  20120425-shanghaiOpen stack for open source  private cloud  20120425-shanghai
Open stack for open source private cloud 20120425-shanghai
OpenCity Community1.5K views
NIC 2013 - Configure and Deploy Private Cloud by Kristian Nese
NIC 2013 - Configure and Deploy Private CloudNIC 2013 - Configure and Deploy Private Cloud
NIC 2013 - Configure and Deploy Private Cloud
Kristian Nese954 views

Similar to Cloud Foundry Open Tour Keynote

Cloudfoundry architecture by
Cloudfoundry architectureCloudfoundry architecture
Cloudfoundry architectureRamnivas Laddad
18.4K views97 slides
Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC... by
Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC...Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC...
Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC...CloudAngels
1.2K views33 slides
Be Prepared for Tomorrow's IT Forecast Great Chance of Hybrid Clouds by
Be Prepared for Tomorrow's IT Forecast Great Chance of Hybrid CloudsBe Prepared for Tomorrow's IT Forecast Great Chance of Hybrid Clouds
Be Prepared for Tomorrow's IT Forecast Great Chance of Hybrid CloudsEucalyptus Systems, Inc.
274 views21 slides
Be Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid Clouds by
Be Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid CloudsBe Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid Clouds
Be Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid CloudsEucalyptus Systems, Inc.
221 views21 slides

Similar to Cloud Foundry Open Tour Keynote(20)

Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC... by CloudAngels
Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC...Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC...
Niko Nelissen - Sun Microsystems - Keynote 'What's next in the Cloud?' CloudC...
CloudAngels1.2K views
Be Prepared for Tomorrow's IT Forecast Great Chance of Hybrid Clouds by Eucalyptus Systems, Inc.
Be Prepared for Tomorrow's IT Forecast Great Chance of Hybrid CloudsBe Prepared for Tomorrow's IT Forecast Great Chance of Hybrid Clouds
Be Prepared for Tomorrow's IT Forecast Great Chance of Hybrid Clouds
Be Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid Clouds by Eucalyptus Systems, Inc.
Be Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid CloudsBe Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid Clouds
Be Prepared for Tomorrow's IT Forecast: Great Chance of Hybrid Clouds
Intel Cloud Summit ODCA - NAB Customer presentation by IntelAPAC
Intel Cloud Summit ODCA - NAB Customer presentationIntel Cloud Summit ODCA - NAB Customer presentation
Intel Cloud Summit ODCA - NAB Customer presentation
IntelAPAC331 views
BlazeClan Technologies by Varoon Rajani
BlazeClan TechnologiesBlazeClan Technologies
BlazeClan Technologies
Varoon Rajani1.7K views
Cloud computing NIC 2012 by Kristian Nese
Cloud computing NIC 2012Cloud computing NIC 2012
Cloud computing NIC 2012
Kristian Nese633 views
Deadly Sins Bcs Elite by Jon G. Hall
Deadly Sins Bcs EliteDeadly Sins Bcs Elite
Deadly Sins Bcs Elite
Jon G. Hall1.1K views
BlazeClan Technologies - Company Presentation by Supratik Ghatak
BlazeClan Technologies - Company PresentationBlazeClan Technologies - Company Presentation
BlazeClan Technologies - Company Presentation
Supratik Ghatak2K views
Security in a Cloudy Architecture by Bob Rhubart
Security in a Cloudy ArchitectureSecurity in a Cloudy Architecture
Security in a Cloudy Architecture
Bob Rhubart1.6K views
Intel Cloud Summit 2012 ODCA + NAB by IntelAPAC
Intel Cloud Summit 2012 ODCA + NABIntel Cloud Summit 2012 ODCA + NAB
Intel Cloud Summit 2012 ODCA + NAB
IntelAPAC340 views
The Cloud and Next Gen IT Gordon Haff - p camp-boston2012 by ProductCamp Boston
The Cloud and Next Gen IT   Gordon Haff - p camp-boston2012The Cloud and Next Gen IT   Gordon Haff - p camp-boston2012
The Cloud and Next Gen IT Gordon Haff - p camp-boston2012
ProductCamp Boston676 views
Tour de Clouds: Understanding Multi-Cloud Integration by RightScale
Tour de Clouds: Understanding Multi-Cloud IntegrationTour de Clouds: Understanding Multi-Cloud Integration
Tour de Clouds: Understanding Multi-Cloud Integration
RightScale1K views
Rs product deck january 2012 by Brad , Yun Lee
Rs product deck january 2012Rs product deck january 2012
Rs product deck january 2012
Brad , Yun Lee434 views

Recently uploaded

CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
94 views13 slides
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...ShapeBlue
101 views17 slides
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
146 views15 slides
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
179 views7 slides
The Role of Patterns in the Era of Large Language Models by
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language ModelsYunyao Li
80 views65 slides
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...ShapeBlue
123 views28 slides

Recently uploaded(20)

CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue94 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue101 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue146 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue179 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li80 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue123 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue138 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue144 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue197 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue176 views
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue88 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely78 views
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue210 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue222 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc160 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue163 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue253 views

Cloud Foundry Open Tour Keynote

  • 1. Framework Integration in Cloud Foundry Ramnivas Laddad @ramnivas © 2012 VMware, Inc. All rights reserved
  • 2. @ramnivas  Spring framework committer  Cloud Foundry committer  Main interests • Cloud computing • Aspect-oriented programming • Scala and functional programming  Author of books and articles • AspectJ in Action (1st and 2nd edition)  Speaker at many professional conferences • JavaOne, JavaPolis, SpringOne, Software Development, No Fluff Just Stuff, EclipseCon, O’Reilly OSCON etc.  Active involvement in AspectJ, Spring, and Cloud Foundry since their early form CONFIDENTIAL 2
  • 3. Technologies “Я” Us Closure Java AMQP HTML5 Akka Mongo Spring Scala Redis JSF Grails Hibernate node.js RabbitMQ JDBC Lift Rails JMS Ruby Hadoop Sinatra Batch Job Django JTA Python MySQL Web Services JPA Caching LDAP Postgres Scripting Testing Security Neo4j REST CONFIDENTIAL 3
  • 4. Technologies “Я” Us Access logs Network Routing Hardware failures DNS Storage Load balancing Auditing Rolling Updates User management Security DoS Backups DBA OS Monitoring Patches CONFIDENTIAL 4
  • 5. Facets of complexity: Product  More functionality  Time to market pressure  Complex integration  Higher stake in quality CONFIDENTIAL 5
  • 6. Facets of complexity: Development  Sound architecture: future proofing without overdoing  Unit and integration tests  Responding to changing business needs  Confusing technology landscape CONFIDENTIAL 6
  • 7. Facets of complexity: Deployment and operation  Choosing the right hardware, operating system, web server  Monitoring applications  Responding to scalability needs  Dealing with hardware- and system-level failures  Upgrading without substantial down time CONFIDENTIAL 7
  • 8. Inherent vs. Apparent Complexity What can we do about this? Implementation overhead Apparent Implementation complexity Inherent Functional logic complexity CONFIDENTIAL 8
  • 9. What can we do? ? CONFIDENTIAL 9
  • 10. Three layers of Cloud Computing SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service CONFIDENTIAL 10
  • 11. Cloud Foundry open PaaS - Choice of clouds Data Services Private Clouds Msg Public Services Clouds Other Micro Services Clouds CONFIDENTIAL 11
  • 12. Cloud Foundry open PaaS - Choice of clouds Data Services Private Clouds Partners Msg Public Services Clouds Other Micro Services Clouds Apache2 license CONFIDENTIAL 12
  • 13. Frameworks in Cloud Foundry CONFIDENTIAL 13
  • 14. The Cloud Foundry Universe Core Frameworks Community and Partner contributions CONFIDENTIAL 14
  • 15. Core Runtimes and Frameworks  Java • Spring • Grails • Lift  Ruby • Rails • Sinatra • Rack  Node.js (Community lead: Joyent) CONFIDENTIAL 15
  • 16. Community and partners contributions  Python • Django • WSGI  Erlang OTP/Rebar  PHP  Perl  .Net • On Iron Foundry CONFIDENTIAL 16
  • 17. The Platinum Rule Treat each framework the way it will like to be treated! CONFIDENTIAL 17
  • 18. Common Framework Support CONFIDENTIAL 18
  • 19. Command-line access  Create apps and services  Update bindings, memory etc.  Scale instances $ vmc push conference $ vmc create-service mysql conf-db $ vmc bind-service conf-db conference $ vmc instances conference +2 CONFIDENTIAL 19
  • 20. Access to services and app info  Access to services and app info through environment variables • Service host, port, credentials • App ip and port VCAP_SERVICES: { "postgresql-9.0": [{ "name": "env-postgresql", "label": "postgresql-9.0", "plan": "free", "credentials": { "name": "de24667f9344b4eeaad6b5a2326d52faa", "host": "172.30.48.122", "port": 5432, "user": "u50ce600bba434bacbc99e034bb415644", "password": "pf4dca5bd449d4732841f0c4ae3f299d0" } }] CONFIDENTIAL } 20
  • 21. Simplified app configration  A runtime library to access service and app info  Auto-reconfiguration for typical apps • Node.js coming soon CONFIDENTIAL 21
  • 22. Access to service through Caldecott $ vmc tunnel conf-db Binding Service [conf-db]: OK Stopping Application 'caldecott': OK Staging Application 'caldecott': OK Starting Application 'caldecott': OK Getting tunnel connection info: OK Service connection info: username : uG5jVXaBPmjl6 password : pE3HOwIwGgkbv name : d76e62447a4c04f2b8e7b79f41c450aa0 Starting tunnel to conf-db on port 10000. 1: none 2: mysql 3: mysqldump Which client would you like to start?: 2 CONFIDENTIAL 22
  • 23. Access to service through Caldecott Launching 'mysql --protocol=TCP --host=localhost --port=10000 --user=uG5jVXaBPmjl6 --password=pE3HOwIwGgkbv d76e62447a4c04f2b8e7b79f41c450aa0' ... mysql> select * from users; CONFIDENTIAL 23
  • 24. Manifest Support --- applications: .: name: conference url: ${name}.${target-base} framework: name: rails3 info: mem: 256M description: Rails Application exec: mem: 256M instances: 1 services: conf-db: type: mysql CONFIDENTIAL 24
  • 26. The Platinum Rule: Spring and Grails  IDE integration • SpringSource Tools Suite and Eclipse • Open source  Auto-reconfiguration by hooking into Spring application context  <cloud:> namespace  Spring 3.1 profile support  Maven plugin CONFIDENTIAL 26
  • 27. IDE Integration CONFIDENTIAL 27
  • 28. Auto-Reconfiguration: Relational DB  Detects beans of type javax.sql.DataSource  Connects to MySQL or PostgreSQL services • Specifies driver, url, username, password, validation query  Creates Commons DBCP or Tomcat DataSource <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource"> <property name="driverClassName" value="org.h2.Driver" /> <property name="url" value="jdbc:h2:mem:" /> <property name="username" value="sa" /> <property name="password" value="" /> </bean> CONFIDENTIAL 28
  • 29. <cloud:service-scan>  Scans all services bound to the application and creates a bean of an appropriate type for each • Same bean types as auto-reconfiguration  Useful during early development phases <beans …> <cloud:service-scan/> </beans> CONFIDENTIAL 29
  • 30. <cloud:service-scan> Autowire Dependencies  Created beans can be autowired as dependencies  Use @Qualifier with service name if multiple services of same type bound to app @Autowired(required=false) private ConnectionFactory rabbitConnectionFactory; @Autowired private RedisConnectionFactory redisConnectionFactory; @Autowired @Qualifier("test_mysql_database") private DataSource mysqlDataSource; @Autowired(required=false) @Qualifier("test_postgres_database") private DataSource postgresDataSource; CONFIDENTIAL 30
  • 31. <cloud:data-source>  Configures a DataSource bean • Commons DBCP or Tomcat DataSource  Basic attributes: • id: defaults to service name • service-name: only needed if you have multiple relational database services bound to the app <cloud:data-source id="dataSource"/> CONFIDENTIAL 31
  • 32. Isolating Cloud Foundry Configuration <bean class="org.sf.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"> <property name="dataSource" ref="dataSource"/> </bean> <beans profile="cloud"> <cloud:data-source id="dataSource" /> </beans> <beans profile="default"> <bean class=”o.a.commons.dbcp.BasicDataSource" id="dataSource"> <property name="url" value="jdbc:mysql://localhost/inventory" /> </bean> </beans> CONFIDENTIAL 32
  • 33. Scala/Lift  Auto-reconfiguration for Scala Lift apps  PostgreSQL support coming soon CONFIDENTIAL 33
  • 35. The Platinum Rule: Rails, Sinatra, Rack  Bundle support • Just include a Gemfile.lock  Rails console • Debugging  Auto-reconfiguration through meta-programming  cf-runtime gem CONFIDENTIAL 35
  • 36. Rails Console $ vmc rails-console conf Connecting to 'conf' console: OK irb():001:0> u = User.find_by_email('ramnivas@ramnivas.com') => #<User id: 1, email: "ramnivas@ramnivas.com", reason: "It is cool!", created_at: "2012-03-29 23:10:34", updated_at: "2012-03-29 23:10:34"> irb():002:0> u.email = "rladdad@vmware.com" => "rladdad@vmware.com" irb():003:0> u.save => true irb():004:0> u = User.find_by_email('rladdad@vmware.com') => #<User id: 1, email: "rladdad@vmware.com", reason: "It is cool!", created_at: "2012-03-29 23:10:34", updated_at: "2012-03-29 23:14:17"> CONFIDENTIAL 36
  • 37. Ruby auto-reconfiguration require 'mongo' module Demo class App < Sinatra::Base configure do mongo = Mongo::Connection.new(:host => '127.0.0.1', :port => 27017) db = mongo['db'] end ... end end CONFIDENTIAL 37
  • 38. cf-runtime: Ruby Runtime Gem require 'cfruntime/mongodb' connection = CFRuntime::MongoClient.create_from_svc('docs') db = connection.db ... CONFIDENTIAL 38
  • 39. Running locally and in Cloud Foundry require 'cfruntime/mongodb' ... db = CFRuntime::MongoClient.create.db rescue Mongo::Connection.new("localhost", 27017) .db("db”) ... CONFIDENTIAL 39
  • 40. Taking full control if CFRuntime::CloudApp.running_in_cloud? @service_props = CFRuntime::CloudApp.service_props('docs’) else @service_props = {} @service_props[:host] = 'localhost' @service_props[:port] = 27017 @service_props[:db] = 'testdb' end db = Mongo::Connection.new(@service_props[:host], @service_props[:port]) .db(@service_props[:db]) if CFRuntime::CloudApp.running_in_cloud? db.authenticate(@service_props[:username], @service_props[:password]) end CONFIDENTIAL 40
  • 42. The Platinum Rule: Node.js  NPM support • Coming soon!  Debugging using node-inspector  Auto-reconfiguration and runtime package • Coming soon! CONFIDENTIAL 42
  • 43. Debugging node.js apps CONFIDENTIAL 43
  • 44. Auto-reconfiguration in node.js var host = 'localhost', port = 3000, url = require('url'); var client = require("redis").createClient(); require('http').createServer(function (req, res) { ... CONFIDENTIAL 44
  • 45. Accessing apps and services info var cfruntime = require('cfruntime'), host = cfruntime.CloudApp.host || 'localhost', port = cfruntime.CloudApp.port || 3000, url = require('url'); if (cfruntime.CloudApp.runningInCloud) { var client = cfruntime.RedisClient.create(); } else { var client = require("redis").createClient(); } require('http').createServer(function (req, res) { ... CONFIDENTIAL 45
  • 46. Peeking into future CONFIDENTIAL 46
  • 47. Standalone apps  Bring your own container • Jetty • Netty •…  Non-web apps • Resque workers • Spring Batch • Spring Integration  Still to come • Short-running apps • Scheduled tasks CONFIDENTIAL 47
  • 48. Enhanced Scala Support  Lift updated support  Play!  Akka CONFIDENTIAL 48
  • 49. Improved Tools  Revamped vmc • Embeddable core • Scripting friendly • Even more intuitive user interaction  Eclipse plugin • Enhanced wizard with service requirement detection • Manifest support • Caldecott integration CONFIDENTIAL 49
  • 50. Questions? Ramnivas Laddad @ramnivas © 2012 VMware, Inc. All rights reserved