SlideShare a Scribd company logo
Deploying and running Grails applications in the cloud Prepared for SF Grails Café Centro Feb 2011 Meetup by Philip Stehlik  and Michael Salera Thanks to  Taulia  for hosting and food!!
 
Agenda Promise of the cloud Different options for deploying and running Grails apps Deploying to AWS via CloudFoundry Deploying to Google App Engine Deploying to AWS via Elastic Beanstalk (Mike) Challenges/Bottom line
"Cloud computing is location-independent computing, whereby shared servers provide resources, software, and data to computers and other devices on demand, as with the electricity grid." - wikipedia Shared resources Not bound to physical resources On-demand And guys; its nothing like the electricity grid!
The different clouds
The different clouds Google App Engine Rackspace Cloud IBM Cloud VMware vCloud Microsoft Azure Amazon Web Services Virtual Private Cloud Private Cloud ...
'Virtual Hardware' VS 'Virtual Runtime' Virtual Hardware Complete stack (hardware, OS, servers, apps etc) Some limitations in hardware Any OS, any JDK, python, PHP etc Any app-server Take care of scaling single machines yourself Pay as you go and hard 'root servers' Virtual Runtime Runtime/Platform oriented Shared runtime environment Limitations in runtime features (security etc) Specific runtime environment Scalable runtime environment Pay as you go 
Categories of providers "shared servers provide resources, software, and data" Platform as a service different from infrastructure as a service Virtual hardware - Infrastructure as a service vCloud EC2 RackSpace Cloud Virtual 'runtime' - Platform as a service Google App Engine Elastic Bean Stalk (hybrid, kind of) Microsoft Azure
So let's get started!
Two domains with scaffolded controllers User  Post Nothing fancy!! Deploy this to different 'cloud providers' https://github.com/pstehlik/sfgrails0802-base Basic app example
Basic app example
Amazon EC2 via Cloud Foundry Intro: Wrapper around EC2 Cloud Foundry acquired by SpringSource acquired by VMware CloudFoundry uses cloud-tools Apache2 licensed cloud management tools (https://www.cloudfoundry.com/cloudtools.html) Deploys to EC2/EBS with their own AMIs Grails plugin Prerequisites: AWS account (CloudFoundry deploys to EC2 & EBS) CloudFoundry account (www.cloudfoundry.com)
Details Cloud Foundry Deploys to EC2 Files (.war etc) are stored on your S3 storage Pre-packaged AMIs from Cloud Foundry Tomcat 5.5, tcServer, eXoECM, Liferay MySQL Initialization scripts - script to execute upon startup Grails plugin uses their API to deploy
Deploying via Cloud Foundry grails install-plugin cloud-foundry configure mysql automatically? - yes Add CloudFoundry credentials grails war grails cloud-foundry-deploy https://github.com/pstehlik/sfgrails0802-base/tree/cloudfoundry
Deploying via Cloud Foundry
Deploying via Cloud Foundry
Deploying via Cloud Foundry showtime
Cloud Foundry gotchas It does not automatically set your DataSource.groovy (even though it tells you it does) Solution: Look at the plugin directory and copy over the details. user: <appname>-user, password: <appname>-password etc. MySQL user names can be up to 16 characters long  (that's not what the Cloud Foundry error message says...) If your <appname> is too long the MySQL deployment will not work with the '-user' added.  Solution: Change the app's name in the CloudFoundry.groovy and change in DataSource.groovy
Google App Engine Intro: Platform as a Service Started for python, Java support since 2009 BigTable (No MySQL) Run by ... Google Prerequisites: GAE account Have GAE SDK installed (http://code.google.com/appengine/downloads.html)
Deploy on Google App Engine grails uninstall-plugin tomcat grails install-plugin app-engine choose 'jpa' for persistence GORM no more... but gorm-jpa plugin helps a bit g rails install-plugin gorm-jpa   Annotate Domains  Make sure all queries, transactions etc are working For the example app -> fix bootstrap https://github.com/pstehlik/sfgrails0802-base/tree/gae-jpa
Deploy on Google App Engine
Deploy on Google App Engine
Deploy on Google App Engine showtime
Google App Engine Gotchas No more hibernate No more gorm (gorm-jpa maybe) No file system access No full J2EE runtime No more than 10 apps (i heard) No renaming of your app No ... http://code.google.com/appengine/docs/java/jrewhitelist.html Scaffolding that comes with Grails plugin doesn't work I am not smart enough for JPA on GAE But: Lots of automatic scale stuff
Amazon Elastic Beanstalk Intro Console style front-end to Amazon WS Standard Java - Apache / MySQL / Tomcat on 64-bit Linux Eclipse  Integration Benefits Users can think in 'versions'          as opposed to EBS snapshots, EC2 instances and AMIs, etc. Simplifies choices, management Advanced Users can customize low-level services Automagic DNS assignment - a la AppEngine      http://myapp.elasticbeanstalk.com/
Amazon Elastic Beanstalk    - V2     App example - Blogger       
Elastic Beanstalk     App example - Travel Log       
Deploy Custom AMI on Amazon EC2   Alternative for 'Cloud SysAdmin' types (IaaS) Deploy WAR files using scp or EC2 plug-in for Firefox Management console, SSH Access, Snapshots for backup 'Canonical' Java  Stack : Ubuntu 10 Server (32) Tomcat 6.0.29 MySQL Apache 2.2.x EC2 Dashboard - Manage Instances, IPs, Load balancers
Challenges Opportunities New and unknown environments What to choose? Which provider? Platform as a Service or Infrastructure as a Service? Support for all features not 100% there Watch out for cost! Make sure to scale down! No unified method of cloud computing available -> You might get locked in if you are not careful Especially platform as a service binds you to the platform specifics
Bottom Line Deploying your app in the cloud is easy Throwing your app into the clouds can be lots of effort It's OK to only port parts of your applications as a trial Easy to get started with green-field projects Different providers have different target groups It's so easy to scale up It's free to get started
Contact Philip Stehlik http://pstehlik.com  -  p @pstehlik.com   Michael Salera http://www.linkedin.com/pub/michael-salera/7/374/779  - [email_address] http://sfgrails.com @sfgrails Thanks to  Taulia  for hosting and food!!

More Related Content

What's hot (17)

PDF
Kubernetes best practices
Bill Liu
 
PDF
Quick and Solid - Baremetal on OpenStack | Rico Lin
Vietnam Open Infrastructure User Group
 
PDF
Containerised ASP.NET Core apps with Kubernetes
Codemotion Tel Aviv
 
PDF
From Docker Straight to AWS
DevOps.com
 
PDF
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
tdc-globalcode
 
PDF
All the Ops: DataOps with GitOps for Streaming data on Kafka and Kubernetes
DevOps.com
 
PDF
Overview of Grails Object Relational Mapping (GORM)
Chris Richardson
 
PDF
Continuous Integration and Deployment Best Practices on AWS
Danilo Poccia
 
PPTX
Azure Infrastructure as Code and Hashicorp Terraform
Alex Mags
 
PPTX
Azure virtual machine-network
Thi Nguyen Dinh
 
PPTX
How to build a SaaS solution in 60 days
Brett McLain
 
PPTX
PaaSing Your Code Around
Chris Tankersley
 
PPTX
Auto Retweets Using AWS Lambda
CodeOps Technologies LLP
 
PDF
Google Compute Engine Starter Guide
Simon Su
 
PDF
JavaDay Lviv: Serverless Archtiectures
Antons Kranga
 
PPTX
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks
 
PPTX
Open service broker API with Azure Kubernetes Services
Jorge Arteiro
 
Kubernetes best practices
Bill Liu
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Vietnam Open Infrastructure User Group
 
Containerised ASP.NET Core apps with Kubernetes
Codemotion Tel Aviv
 
From Docker Straight to AWS
DevOps.com
 
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
tdc-globalcode
 
All the Ops: DataOps with GitOps for Streaming data on Kafka and Kubernetes
DevOps.com
 
Overview of Grails Object Relational Mapping (GORM)
Chris Richardson
 
Continuous Integration and Deployment Best Practices on AWS
Danilo Poccia
 
Azure Infrastructure as Code and Hashicorp Terraform
Alex Mags
 
Azure virtual machine-network
Thi Nguyen Dinh
 
How to build a SaaS solution in 60 days
Brett McLain
 
PaaSing Your Code Around
Chris Tankersley
 
Auto Retweets Using AWS Lambda
CodeOps Technologies LLP
 
Google Compute Engine Starter Guide
Simon Su
 
JavaDay Lviv: Serverless Archtiectures
Antons Kranga
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks
 
Open service broker API with Azure Kubernetes Services
Jorge Arteiro
 

Similar to Deploying and running Grails in the cloud (20)

PPTX
App Deployment on Cloud
Ajey Pratap Singh
 
PDF
Run your Java code on Cloud Foundry
Andy Piper
 
PDF
Cloud Foundry for Spring Developers
Gunnar Hillert
 
PDF
clodfoundrydoc.pdf
Parag Gajbhiye
 
PDF
cloud foundry plugin doc for grails app
Kanaka Durga
 
PDF
clodfoundrydoc.pdf
Parag Gajbhiye
 
PDF
Cloud development made easy with cloud foundry indicthreads cloud computing...
IndicThreads
 
PDF
Cloud Development Made Easy with CloudFoundry - IndicThreads cloud computing...
IndicThreads
 
PDF
Cloud Best Practices
Eric Bottard
 
PDF
Cloud PaaS with Java
Eberhard Wolff
 
PDF
Java in the Cloud : PaaS Platforms in Comparison
adesso AG
 
PDF
Java in the Cloud : PaaS Platforms in Comparison
Eberhard Wolff
 
PDF
Run your Java apps on Cloud Foundry
Andy Piper
 
PDF
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
jaxLondonConference
 
PDF
Running your Java EE 6 applications in the Cloud
IndicThreads
 
PDF
Running your Java EE 6 applications in the Cloud
Arun Gupta
 
PDF
PHP Buildpacks in the Cloud on Bluemix
IBM
 
PDF
Cloud Foundry for PHP developers
Daniel Krook
 
PDF
Practical PaaS presentation
hmalphettes
 
PDF
A 60-mn tour of AWS compute (March 2016)
Julien SIMON
 
App Deployment on Cloud
Ajey Pratap Singh
 
Run your Java code on Cloud Foundry
Andy Piper
 
Cloud Foundry for Spring Developers
Gunnar Hillert
 
clodfoundrydoc.pdf
Parag Gajbhiye
 
cloud foundry plugin doc for grails app
Kanaka Durga
 
clodfoundrydoc.pdf
Parag Gajbhiye
 
Cloud development made easy with cloud foundry indicthreads cloud computing...
IndicThreads
 
Cloud Development Made Easy with CloudFoundry - IndicThreads cloud computing...
IndicThreads
 
Cloud Best Practices
Eric Bottard
 
Cloud PaaS with Java
Eberhard Wolff
 
Java in the Cloud : PaaS Platforms in Comparison
adesso AG
 
Java in the Cloud : PaaS Platforms in Comparison
Eberhard Wolff
 
Run your Java apps on Cloud Foundry
Andy Piper
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
jaxLondonConference
 
Running your Java EE 6 applications in the Cloud
IndicThreads
 
Running your Java EE 6 applications in the Cloud
Arun Gupta
 
PHP Buildpacks in the Cloud on Bluemix
IBM
 
Cloud Foundry for PHP developers
Daniel Krook
 
Practical PaaS presentation
hmalphettes
 
A 60-mn tour of AWS compute (March 2016)
Julien SIMON
 
Ad

Recently uploaded (20)

PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Ad

Deploying and running Grails in the cloud

  • 1. Deploying and running Grails applications in the cloud Prepared for SF Grails Café Centro Feb 2011 Meetup by Philip Stehlik  and Michael Salera Thanks to Taulia for hosting and food!!
  • 2.  
  • 3. Agenda Promise of the cloud Different options for deploying and running Grails apps Deploying to AWS via CloudFoundry Deploying to Google App Engine Deploying to AWS via Elastic Beanstalk (Mike) Challenges/Bottom line
  • 4. &quot;Cloud computing is location-independent computing, whereby shared servers provide resources, software, and data to computers and other devices on demand, as with the electricity grid.&quot; - wikipedia Shared resources Not bound to physical resources On-demand And guys; its nothing like the electricity grid!
  • 6. The different clouds Google App Engine Rackspace Cloud IBM Cloud VMware vCloud Microsoft Azure Amazon Web Services Virtual Private Cloud Private Cloud ...
  • 7. 'Virtual Hardware' VS 'Virtual Runtime' Virtual Hardware Complete stack (hardware, OS, servers, apps etc) Some limitations in hardware Any OS, any JDK, python, PHP etc Any app-server Take care of scaling single machines yourself Pay as you go and hard 'root servers' Virtual Runtime Runtime/Platform oriented Shared runtime environment Limitations in runtime features (security etc) Specific runtime environment Scalable runtime environment Pay as you go 
  • 8. Categories of providers &quot;shared servers provide resources, software, and data&quot; Platform as a service different from infrastructure as a service Virtual hardware - Infrastructure as a service vCloud EC2 RackSpace Cloud Virtual 'runtime' - Platform as a service Google App Engine Elastic Bean Stalk (hybrid, kind of) Microsoft Azure
  • 9. So let's get started!
  • 10. Two domains with scaffolded controllers User  Post Nothing fancy!! Deploy this to different 'cloud providers' https://github.com/pstehlik/sfgrails0802-base Basic app example
  • 12. Amazon EC2 via Cloud Foundry Intro: Wrapper around EC2 Cloud Foundry acquired by SpringSource acquired by VMware CloudFoundry uses cloud-tools Apache2 licensed cloud management tools (https://www.cloudfoundry.com/cloudtools.html) Deploys to EC2/EBS with their own AMIs Grails plugin Prerequisites: AWS account (CloudFoundry deploys to EC2 & EBS) CloudFoundry account (www.cloudfoundry.com)
  • 13. Details Cloud Foundry Deploys to EC2 Files (.war etc) are stored on your S3 storage Pre-packaged AMIs from Cloud Foundry Tomcat 5.5, tcServer, eXoECM, Liferay MySQL Initialization scripts - script to execute upon startup Grails plugin uses their API to deploy
  • 14. Deploying via Cloud Foundry grails install-plugin cloud-foundry configure mysql automatically? - yes Add CloudFoundry credentials grails war grails cloud-foundry-deploy https://github.com/pstehlik/sfgrails0802-base/tree/cloudfoundry
  • 17. Deploying via Cloud Foundry showtime
  • 18. Cloud Foundry gotchas It does not automatically set your DataSource.groovy (even though it tells you it does) Solution: Look at the plugin directory and copy over the details. user: <appname>-user, password: <appname>-password etc. MySQL user names can be up to 16 characters long  (that's not what the Cloud Foundry error message says...) If your <appname> is too long the MySQL deployment will not work with the '-user' added.  Solution: Change the app's name in the CloudFoundry.groovy and change in DataSource.groovy
  • 19. Google App Engine Intro: Platform as a Service Started for python, Java support since 2009 BigTable (No MySQL) Run by ... Google Prerequisites: GAE account Have GAE SDK installed (http://code.google.com/appengine/downloads.html)
  • 20. Deploy on Google App Engine grails uninstall-plugin tomcat grails install-plugin app-engine choose 'jpa' for persistence GORM no more... but gorm-jpa plugin helps a bit g rails install-plugin gorm-jpa   Annotate Domains  Make sure all queries, transactions etc are working For the example app -> fix bootstrap https://github.com/pstehlik/sfgrails0802-base/tree/gae-jpa
  • 21. Deploy on Google App Engine
  • 22. Deploy on Google App Engine
  • 23. Deploy on Google App Engine showtime
  • 24. Google App Engine Gotchas No more hibernate No more gorm (gorm-jpa maybe) No file system access No full J2EE runtime No more than 10 apps (i heard) No renaming of your app No ... http://code.google.com/appengine/docs/java/jrewhitelist.html Scaffolding that comes with Grails plugin doesn't work I am not smart enough for JPA on GAE But: Lots of automatic scale stuff
  • 25. Amazon Elastic Beanstalk Intro Console style front-end to Amazon WS Standard Java - Apache / MySQL / Tomcat on 64-bit Linux Eclipse Integration Benefits Users can think in 'versions'         as opposed to EBS snapshots, EC2 instances and AMIs, etc. Simplifies choices, management Advanced Users can customize low-level services Automagic DNS assignment - a la AppEngine      http://myapp.elasticbeanstalk.com/
  • 26. Amazon Elastic Beanstalk   - V2     App example - Blogger       
  • 27. Elastic Beanstalk     App example - Travel Log       
  • 28. Deploy Custom AMI on Amazon EC2   Alternative for 'Cloud SysAdmin' types (IaaS) Deploy WAR files using scp or EC2 plug-in for Firefox Management console, SSH Access, Snapshots for backup 'Canonical' Java Stack : Ubuntu 10 Server (32) Tomcat 6.0.29 MySQL Apache 2.2.x EC2 Dashboard - Manage Instances, IPs, Load balancers
  • 29. Challenges Opportunities New and unknown environments What to choose? Which provider? Platform as a Service or Infrastructure as a Service? Support for all features not 100% there Watch out for cost! Make sure to scale down! No unified method of cloud computing available -> You might get locked in if you are not careful Especially platform as a service binds you to the platform specifics
  • 30. Bottom Line Deploying your app in the cloud is easy Throwing your app into the clouds can be lots of effort It's OK to only port parts of your applications as a trial Easy to get started with green-field projects Different providers have different target groups It's so easy to scale up It's free to get started
  • 31. Contact Philip Stehlik http://pstehlik.com - p @pstehlik.com   Michael Salera http://www.linkedin.com/pub/michael-salera/7/374/779  - [email_address] http://sfgrails.com @sfgrails Thanks to Taulia for hosting and food!!