0
RUN YOUR JAVA CODE ON
CLOUD FOUNDRY
Andy Piper - @andypiper
Cloud Foundry Developer Advocate, Pivotal
Hello I’m Andy
a few things about me
Developer Advocate @ Cloud Foundry
social web enthusiast
maker, educator, LEGO fan
OSS contributor
E...
Developer Advocate? hellz to the yeah!
@andypiper
[works on]
#cloudfoundry
[at]
@gopivotal
3 themes
openness, cloud computing,
and Java
1. Why be / do / think Open?
2. Why is an Open Cloud Platform important?
3. Why run Java on an open cloud?
1. Why be / do / think Open?
An important year in software
1991
Hello everybody out
there using minix -
I’m doing a (free)
operating system
(just a hob...
~21 years later: Linux has won
Linux runs everywhere
(even old versions, on crashy
airline entertainment systems...)
#P0WN ALL
TEH
GADGETZ !
The Penguin is
triumphant!
(maybe not this one…)
Linux is ubiquitous
(but often invisible)
It works.
2. What about Cloud?
3 layers IaaS, PaaS, SaaS
Infrastructure
Platform
Software
Gmail, Salesforce,
Flickr, Google Docs...
Amazon EC2, Google CE...
How did we get here?
Infrastructure Clouds
- consumer web companies built out according to
their own needs to support Software
But - still need to build
& manage Platform
Why is it so hard...? A real deployment flow (!)
An alternative approach...
Cloud Foundry can
make it simpler!
cf#iaas.yml
provision0<my0cloud>
add_capacity0<my0cloud>
tar...
C L O U D F O U N D R Y
Demo
Cloud Foundry - the Open PaaS
Open Source
Micro&
Clouds
Private&
Clouds
Public&
Clouds
CUSTOM
SERVICES
CUSTOM
RUNTIMES
All the pieces to make
your own!
“if you can’t open it, you
don’t own it” (O’Reilly MAKE)
Open & public from the start Code all on Github
Google AppEngine,
Heroku, Cloud Foundry,
OpenShift, Stackato,
Cloudbees, AppFog,
Elastic Beanstalk,
anyNines, Apprenda...
Not all PaaSes are
created equal...
Run on: AWS, OpenStack,
vSphere... more to come!
All about Choice
Private
Clouds
Public
Clouds
Micro
Clouds
Build your own from
github.com/cloudfoundry,
buy from Pivotal, ...
(pause)
44 years since Mach 1
3. What about Java and the JVM?
From VM-centric to Application Centric
Infrastructure
One
JVM
VM
Infrastructure
One
Infrastructure
Two
App
Container 1
App...
Buildpacks
Buildpacks are responsible for preparing the
machine image for an application
Application
Container
Runtime
Ope...
Compatibility
Cloud Foundry buildpacks follow the
Heroku buildpack design
Cloud Foundry and Heroku buildpacks are compatib...
Built-in Buildpacks
→
→
→
Tested Buildpacks
https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks
LanguagesContainers
Haskell
Java Buildpack
Supports a variety of JVM languages, containers,
and frameworks with a modular, configurable, and
extensible...
Java Buildpack Concepts
Containers Frameworks
JREs
OpenJDK, etc.
Java main()
Tomcat
Groovy
Spring Boot CLI
Play
Spring con...
Container Detection Criteria
Java main()
META-INF/MANIFEST.MF exists
with Main-class attribute set
Tomcat WEB-INF director...
Framework Detection Criteria
Spring spring-core*.jar exists
Play config Play application detected
Play JPA config play-java-...
Customization
Two ways to customize the Java buildpack
Configure artifacts used by standard
JREs, Containers, and Framework...
Choice!
• IBM donated WebSphere Liberty Buildpack
• http://blog.cloudfoundry.com/2013/09/09/ibm-
websphere-liberty-buildpa...
the new Spring spring.io
WEB
Controllers, REST,
WebSocket
INTEGRATION
Channels, Adapters,
Filters, Transformers
BATCH
Jobs, Steps,
Readers, Writers...
Groovy and Spring Boot
Groovy and Spring Boot
Groovy and Spring Boot
Spring and the Cloud
• Goal: deploy Spring apps to the cloud without
changing a single line of code
• Cloud Foundry automa...
Portability
S P R I N G
Demo
4. ... the end?
Join us!
... a pull request is all it
takes!
Connect
http://twitter.com/andypiper
http://andypiper.co.uk
http://slideshare.net/andypiper
Image credits
• Happy Tux http://igloo.crystalxp.net/ZeNDaMs
• Signpost http://www.flickr.com/photos/16002150@N08/200626669...
Upcoming SlideShare
Loading in...5
×

Run your Java code on Cloud Foundry

2,524

Published on

Public, private, and hybrid; software, platform, and infrastructure. A discussion of the current state of the Platform-as-a-Service space, and why the keys to success lie in enabling developer productivity, and providing openness and choice. This presentation considers the success of Open Source in general, looks at the Cloud Foundry project, and explains why Cloud Foundry-based PaaSes are the best places to host your applications written in Java and other JVM-based languages.

Presented at GOTO Aarhus 2013

Published in: Technology
1 Comment
8 Likes
Statistics
Notes
  • What a great slide! We're looking at message broker solutions right now ... you a top candidate!
    http://www.mediafire.com/download/kx9l74xfsn96454/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
2,524
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
92
Comments
1
Likes
8
Embeds 0
No embeds

No notes for slide

Transcript of "Run your Java code on Cloud Foundry"

  1. 1. RUN YOUR JAVA CODE ON CLOUD FOUNDRY Andy Piper - @andypiper Cloud Foundry Developer Advocate, Pivotal
  2. 2. Hello I’m Andy
  3. 3. a few things about me Developer Advocate @ Cloud Foundry social web enthusiast maker, educator, LEGO fan OSS contributor Eclipse Project Lead (Paho / MQTT) excited by “what’s next”, Internet of Things, etc. @andypiper apiper@gopivotal.com
  4. 4. Developer Advocate? hellz to the yeah!
  5. 5. @andypiper [works on] #cloudfoundry [at] @gopivotal
  6. 6. 3 themes openness, cloud computing, and Java
  7. 7. 1. Why be / do / think Open? 2. Why is an Open Cloud Platform important? 3. Why run Java on an open cloud?
  8. 8. 1. Why be / do / think Open?
  9. 9. An important year in software 1991 Hello everybody out there using minix - I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones. From:&torvalds@klaava.Helsinki.FI Newsgroups:&comp.os.minix Date:&25&Aug&91&20:57:08&GMT Organization:&University&of&Helsinki
  10. 10. ~21 years later: Linux has won
  11. 11. Linux runs everywhere (even old versions, on crashy airline entertainment systems...) #P0WN ALL TEH GADGETZ !
  12. 12. The Penguin is triumphant! (maybe not this one…)
  13. 13. Linux is ubiquitous (but often invisible)
  14. 14. It works.
  15. 15. 2. What about Cloud?
  16. 16. 3 layers IaaS, PaaS, SaaS Infrastructure Platform Software Gmail, Salesforce, Flickr, Google Docs... Amazon EC2, Google CE, OpenStack, vSphere, Joyent, Cloud Stack, Eucalyptus... Google AppEngine, Heroku, Cloud Foundry, EngineYard, Apprenda...
  17. 17. How did we get here?
  18. 18. Infrastructure Clouds - consumer web companies built out according to their own needs to support Software
  19. 19. But - still need to build & manage Platform
  20. 20. Why is it so hard...? A real deployment flow (!)
  21. 21. An alternative approach... Cloud Foundry can make it simpler! cf#iaas.yml provision0<my0cloud> add_capacity0<my0cloud> target0<my0cloud> push0<my0app> create0<my0services> bind0<my0services> scale0<my0app>0+100 OPERATOR DEVELOPER Cloud Deployment: 2-4 hours App Deployment: 30-90 seconds
  22. 22. C L O U D F O U N D R Y Demo
  23. 23. Cloud Foundry - the Open PaaS Open Source Micro& Clouds Private& Clouds Public& Clouds CUSTOM SERVICES CUSTOM RUNTIMES
  24. 24. All the pieces to make your own! “if you can’t open it, you don’t own it” (O’Reilly MAKE)
  25. 25. Open & public from the start Code all on Github
  26. 26. Google AppEngine, Heroku, Cloud Foundry, OpenShift, Stackato, Cloudbees, AppFog, Elastic Beanstalk, anyNines, Apprenda...
  27. 27. Not all PaaSes are created equal... Run on: AWS, OpenStack, vSphere... more to come!
  28. 28. All about Choice Private Clouds Public Clouds Micro Clouds Build your own from github.com/cloudfoundry, buy from Pivotal, or run a compatible private version Run in a local virtual machine with identical services and runtimes (MCF, Vagrant) At run.pivotal.io or any Cloud Foundry- powered PaaS
  29. 29. (pause)
  30. 30. 44 years since Mach 1
  31. 31. 3. What about Java and the JVM?
  32. 32. From VM-centric to Application Centric Infrastructure One JVM VM Infrastructure One Infrastructure Two App Container 1 App Server JVM Container 2 App Server JVM Dev Framework Dev Framework App Server Configurations Manifests, Automations Infrastructure Two JVM VM Dev Framework App Server Configurations App App App
  33. 33. Buildpacks Buildpacks are responsible for preparing the machine image for an application Application Container Runtime Operating System Libraries DEA Buildpack }Droplet
  34. 34. Compatibility Cloud Foundry buildpacks follow the Heroku buildpack design Cloud Foundry and Heroku buildpacks are compatible (if you take care to make them compatible) Other PaaS providers are adopting the buildpack design - emerging convention
  35. 35. Built-in Buildpacks → → →
  36. 36. Tested Buildpacks https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks LanguagesContainers Haskell
  37. 37. Java Buildpack Supports a variety of JVM languages, containers, and frameworks with a modular, configurable, and extensible design
  38. 38. Java Buildpack Concepts Containers Frameworks JREs OpenJDK, etc. Java main() Tomcat Groovy Spring Boot CLI Play Spring config Play config Play JPA config New Relic
  39. 39. Container Detection Criteria Java main() META-INF/MANIFEST.MF exists with Main-class attribute set Tomcat WEB-INF directory exists Groovy .groovy file with a main() method, or .groovy file with no classes, or .groovy file with a shebang (#!) declaration Spring Boot CLI one or more POGO .groovy files with no main() method, and no WEB-INF directory Play start and lib/play.play_*.jar exist Choose zero or one
  40. 40. Framework Detection Criteria Spring spring-core*.jar exists Play config Play application detected Play JPA config play-java-jpa plugin exists in app New Relic New Relic service bound to app Choose all that apply
  41. 41. Customization Two ways to customize the Java buildpack Configure artifacts used by standard JREs, Containers, and Frameworks Extend the buildpack with your own JREs, Containers, and Frameworks Customization is done by forking the buildpack →
  42. 42. Choice! • IBM donated WebSphere Liberty Buildpack • http://blog.cloudfoundry.com/2013/09/09/ibm- websphere-liberty-buildpack-contributed-to-cloud- foundry/
  43. 43. the new Spring spring.io
  44. 44. WEB Controllers, REST, WebSocket INTEGRATION Channels, Adapters, Filters, Transformers BATCH Jobs, Steps, Readers, Writers BIG DATA Ingestion, Export, Orchestration, Hadoop DATA NON-RELATIONALRELATIONAL CORE GROOVYFRAMEWORK SECURITY REACTOR GRAILS Full-stack, Web XD Stream, Taps, Jobs BOOT Bootable, Minimal, Ops-Ready
  45. 45. Groovy and Spring Boot
  46. 46. Groovy and Spring Boot
  47. 47. Groovy and Spring Boot
  48. 48. Spring and the Cloud • Goal: deploy Spring apps to the cloud without changing a single line of code • Cloud Foundry automatically re-configures bean definitions to bind to cloud services • Works with Spring and Grails
  49. 49. Portability
  50. 50. S P R I N G Demo
  51. 51. 4. ... the end?
  52. 52. Join us! ... a pull request is all it takes!
  53. 53. Connect http://twitter.com/andypiper http://andypiper.co.uk http://slideshare.net/andypiper
  54. 54. Image credits • Happy Tux http://igloo.crystalxp.net/ZeNDaMs • Signpost http://www.flickr.com/photos/16002150@N08/2006266695/ • Other images are author’s own, or royalty-free and CC-licensed works from Wikimedia Commons • Build your own Heroku video http://www.youtube.com/watch?v=e0EprkBamvQ
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×