www.tothenew.com
APPLICATION DEPLOYMENT ON
CLOUD
- Ajey Pratap Singh
www.tothenew.com
Agenda
● Introduction to cloud computing
● SAAS, PAAS and IAAS - A quick comparison
● Benefits of deploying on cloud
● Challenges while deploying on cloud
● Things to consider when moving to cloud - Business and Architectural aspects
● A thing about clustering
● Comparison between various Platform as a Service (PAAS) providers.
● Demo using:
○ Firebase - https://firebase.google.com/
○ AWS - https://aws.amazon.com/
○ Heroku - http://heroku.com/
○ Cloud Foundry - https://www.cloudfoundry.org/
www.tothenew.com
Wondering What Cloud Computing is?
www.tothenew.com
Cloud Computing
In the simplest terms,
cloud computing means
storing and accessing data and programs over
the Internet instead of your computer's hard drive.
www.tothenew.com
SaaS, PaaS and IaaS - A Quick Comparison
www.tothenew.com
Benefits of Deploying on the Cloud
www.tothenew.com
A Few More Reasons to Use Cloud
● Scalability
● Availability
● No need for DevOps expertise
● If a pre-packaged service is not suitable for one’s need, you can get a custom solution with added cost
www.tothenew.com
Challenges While Deploying on the Cloud
• Dependency on the Internet connection
• Legal issues (ownership of data)
• Data transfer can be time consuming
• Dependency on the service provider
• Limited control and reliability
• May require new training
• Security and privacy of the data as per rules and regulations
• Security measures against a cyber attack
• App structure may require changes
www.tothenew.com
Even with all of the above challenges associated with Cloud computing, the environment has immense
potential for many business models. As platforms mature and the economies of scale continue to grow, costs
will continue to fall and reliability and security standards will improve further.
Immense Potential of the Cloud Environment
www.tothenew.com
Things to Consider When Moving to Cloud - Business Aspects
● Implementation & Integration
○ Planning
○ Compatibility
○ Flexibility
● Cost
○ Cost Variations
○ Hardware Costs
○ System Complexity
● Availability & Performance
○ Bandwidth
○ Uptime
○ Support & Maintenance
● Data Security & Protection
○ Data Protection
○ Hardware Security
○ Backup & Disaster Recovery
● Standards & Regulations
○ Compliance
○ Confidentiality
○ Policies and Procedures
www.tothenew.com
Things to Consider When Moving to Cloud - Architectural Aspects
● Single Instance vs Clustered
● Deployment
● Green-blue deployment
● Rescaling
● Auto-scaling
○ RPM, Swap Utilization, Message Queue, CPU Utilization
● Restarting
● Rollback
● Config
○ Changing config requires restart of all servers
● Logs - Logstash, Logentries, Papertrail, etc.
● Performance monitoring - New relic, Airbrake
www.tothenew.com
A Thing About Clustering
● A way to provide high-availability by replicating your system
● Handles hardware/software failure
● Traffic is not always high
● Provides for horizontal scaling
● Overcomes CPU/RAM limitations
www.tothenew.com
Setting up a Local Cluster
/etc/nginx/sites-available/default
------------------------
server {
listen 80;
location / {
proxy_pass http://intellimeetservers;
}
}
upstream intellimeetservers {
server 127.0.0.1:7070;
server 127.0.0.1:8080;
}
● nginx Load Balancing - http://goo.gl/78uu8O
● Apache Load Balancing - http://goo.gl/c5seF2
www.tothenew.com
Comparison between various
Platform as a Service (PaaS) providers
www.tothenew.com
www.tothenew.com
● Firebase is known primarily as a PaaS
● It is deeply integrated with Google Cloud Platform, allowing you to use Google's Infrastructure-as-a-Service directly within your Firebase
project.
Key Features:
It's more than capable of handling real-time data updates between devices. Provides
cross platform API if you are using firebase DB with an app.
Limitations:
Storage format is entirely different to that of SQL, (Firebase uses JSON) so you won’t
be able to migrate that easily. Reporting tools won't be anywhere near to the ones of
standard SQL.
Pricing:
It has a free plan for hobbyists along with a fixed price plan of $25/Month for
predictable pricing for growing apps and a pay as you go plan for commodity
pricing.
Bonus:
New users can get real time db with up to 1GB of database storage, 5GB of file
storage to handle file uploads and 1GB of hosting space to upload your static site
content. This is more than enough to launch a small website.
Few Insights
www.tothenew.com
Hosting Your Web-app on Firebase
• Setup Firebase CLI for ubuntu - here
• Visit Firebase website - here
• Create a web-app on Firebase console
• Set auth to access database
• Sign-in to Google
– firebase login
• Initialize Firebase on your development machine
– firebase init
• Check your application
– firebase serve
• Deploy your application
– firebase deploy
www.tothenew.com
www.tothenew.com
● AWS is primarily known as an IaaS
● Many of the services available in AWS are comparable to services available in PaaS offerings
Key Features:
Since AWS is largely an IaaS, there is virtually no limit to the languages,
databases or server side technologies you can install and run.
Limitations:
AWS services may require more management overhead than other PaaS
options.
Pricing:
Pricing is based on instances, storage, application services and data egress
charges. Amazon, however, offers a monthly calculator to help you estimate your
costs.
Bonus:
New users can get 750 hours, 30GB storage, and 15GB bandwidth for free with
AWS's Free Usage Tier.
Few Insights
www.tothenew.com
Hosting Your Web-app on AWS
• Launch an EC2 instance
• Select an AMI- preferably Linux
• Choose instance type
• Configure instance (can be left alone and the default settings will be applied)
• Add Storage
• Tag instance
• Configure the Security Group by adding rules - Create new or use existing
• Review and launch
• Create a new key and download or use an existing key that is listed
• After the instance is up and running, you can set it up as you want
www.tothenew.com
Deploying Your Grails App on AWS
• Create a new EC2 instance from the AWS dashboard. Please ensure that the Security Group is configured to allow SSH on port 22 and HTTP
on port 80
• Login to the system using ssh and run the following commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install nginx tomcat7 unzip git oracle-java7-installer
• Install "sdkman" to manage your Grails version
curl -s http://get.sdkman.io | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install grails <grails version>
www.tothenew.com
Deploying Your Grails App on AWS (contd.)
• Modify the default nginx site to redirect all traffic to the tomcat instance running on port 8080
default
----------
server {
listen 80;
server_name 127.0.0.1;
location / {
proxy_pass http://localhost:8080;
proxy_redirect default;
}
}
Restart nginx and check if your site is showing the default tomcat page
www.tothenew.com
Deploying Your Grails App on AWS (contd.)
● Generate a new ssh key for your instance and add the public key (id_rsa.pub) as a deploy key to your app. This will allow the instance to
clone the code repository every time you want to deploy
ssh-keygen -t rsa
● Once you have cloned the code repository on the instance, run the "grails war" command to create a new WAR file
sudo service tomcat7 stop
rm -rf /var/lib/tomcat7/webapps/*
grails war
sudo mv target/*.war /var/lib/tomcat7/webapps/ROOT.war
sudo service tomcat7 start
● Check if the site is working correctly
www.tothenew.com
www.tothenew.com
Key Features:
One of the early PaaS providers, Heroku is ideal for quick deployments and fits a
wide range of distributed applications.
Limitations:
Cost of add-ons varies and estimating costs can be challenging as the number of
add-ons increases and loads vary across application components.
Pricing:
Based on the number and size of dynos deployed ($0.05/hour - $0.10/hour), the
size of Postgres database and add-ons used.
Bonus:
Starter databases with up to 10,000 rows are free. It has a huge marketplace and
one can find a lot of add-ons and support.
● Provides abstract computing environments called dynos
● Dynos are classified as: Web dynos or worker dynos; the former respond to HTTP requests and the latter to task requests in a queue
● Ideal for quick deployments
Few Insights
www.tothenew.com
Hosting Your Web-app on Heroku
• Setup Heroku toolbelt for ubuntu- link
• Deployment
– git push heroku master
• Rescaling
– heroku ps:scale web=2
– heroku ps:scale web+2
• Restarting
– heroku restart
• Rollback to old deployment version
– heroku rollback v46
• Config // automatic restarts all dynos/instances
– heroku config:set KEY=VALUE
• Logs
– heroku logs –t
– heroku logs –t –p web
www.tothenew.com
www.tothenew.com
● You can deploy apps written in 8 languages to your private infrastructure of choice
● 5 frameworks are also available at your disposal
Key Features:
Cloud Foundry is extensible, so you can add more functionality via buildpacks or
similar mechanisms.
Limitations:
You cannot specify command line parameters like JAVA_OPTS and auto-scaling is
not provided.
Pricing: 0.03$/hr after 60 days free trial
Bonus: First class support for Grails.
Few Insights
www.tothenew.com
Deploying Your Grails App on Cloud Foundry
● Register a new account at https://run.pivotal.io/
● Install their CLI tool and run the following command:
cf login -a https://api.run.pivotal.io
● Add a manifest.yml file to be read by Cloud Foundry
manifest.yml
---
applications:
- name: im-todo
memory: 2G
instances: 1
path: target/AngularJS-0.1.war
buildpack: java_buildpack
services:
- mysql
www.tothenew.com
Deploying Your Grails App on Cloud Foundry (contd.)
● Provision a new mysql service using the following command:
cf create-service cleardb spark mysql
Read more about services here: https://docs.cloudfoundry.org/devguide/services/
● Modify the DataSource.groovy file to use the DATABASE_URL environment variable
Sample code:
https://github.com/cloudfoundry-samples/pong_matcher_grails/blob/master/grails-app/conf/DataSource.groovy
● Create the war file using the "grails war" command. This will create a war file in the target folder of your application
● Create a new app in your cloud foundry account
● To deploy, just run the command:
cf push im-todo
www.tothenew.com
Microsoft
Azure
www.tothenew.com
● Microsoft eventually added Infrastructure-as-a-Service (IaaS) functionality to Azure and included Linux servers in the IaaS line-up as well as
Windows operating systems.
● 5 frameworks are also available at your disposal.
● If current deployment fails, it automatically deploys the last known successful war.
Key Features:
Since Windows Azure is an IaaS and PaaS in one, developers can mix and match
IaaS components with PaaS offerings giving you more control.
Limitations: Minimalist administration portal.
Pricing:
Based on size of instances running; prices range from $0.02/hour (768MB of RAM &
1 shared virtual core) to $0.64/hour (14GB of RAM & 8 virtual cores). Pricing for high
memory machines is also available.
Bonus: Free 30-day trial with a limit of up to $200 is available for new users.
Few Insights
www.tothenew.com
www.tothenew.com
● You can deploy apps written in 6 languages to 2 different infrastructures.
● You can scale your applications vertically , horizontally or let OpenShift Online automatically scale your instances
Key Features:
It has a large number of component options spanning the application stack from
frontend to backend services. Developers can interface with OpenShift through a web
console, the command line or through an integrated development environment.
Limitations: It works well with Git, but non-Git deployments might require additional steps.
Pricing:
OpenShift Online pricing is based on the number and types of components (called
gears) you deploy. Gear prices range from $0.02/hour to $0.10/hour, depending on the
size: 512MB (small), 1GB (medium), or 2GB (large). The Silver support plan is $20/month
plus usage costs.
Bonus:
A limited number of resources are available as a trial; 3 small gears and 1GB of storage
per gear are free.
Few Insights
www.tothenew.com
References
❏ http://www.tomsitpro.com/articles/paas-providers,1-1517.html
❏ http://www.paasify.it/vendors
❏ http://www.smartceo.com/dp-solutions-5-things-to-consider-when-moving-to-the-cloud/
❏ https://www.simple-talk.com/cloud/development/moving-applications-to-the-cloud-part-1-8211-what-are-the-considerations/
www.tothenew.com
Thank you!

More Related Content

PDF
Aerospike AdTech Gets Hacked in Lower Manhattan
PPTX
Distributing Data The Aerospike Way
PDF
Terraforming your Infrastructure on GCP
PPTX
Configuring Aerospike - Part 2
PPTX
Terraform
PDF
Terraform: An Overview & Introduction
PDF
Wido den Hollander - building highly available cloud with Ceph and CloudStack
PDF
Boyan Krosnov - Building a software-defined cloud - our experience
Aerospike AdTech Gets Hacked in Lower Manhattan
Distributing Data The Aerospike Way
Terraforming your Infrastructure on GCP
Configuring Aerospike - Part 2
Terraform
Terraform: An Overview & Introduction
Wido den Hollander - building highly available cloud with Ceph and CloudStack
Boyan Krosnov - Building a software-defined cloud - our experience

What's hot (20)

PDF
Best Practices of Infrastructure as Code with Terraform
PDF
Automation of Hadoop cluster operations in Arm Treasure Data
PDF
The Practice of Alluxio in JD.com
PDF
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PPTX
Aerospike: Maximizing Performance
PDF
Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
PDF
Atom: A cloud native deep learning platform at Supremind
PDF
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
PDF
Global deduplication for Ceph - Myoungwon Oh
PDF
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
PPTX
Running Solr in the Cloud at Memory Speed with Alluxio
PPTX
SAOUG 2018 - Rapid Home Provisioning
PDF
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
PDF
RGW Beyond Cloud: Live Video Storage with Ceph - Shengjing Zhu, Yiming Xie
PDF
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
PPTX
Configuring Aerospike - Part 1
PDF
Tuning TCP and NGINX on EC2
PDF
Be a Cloud Native
PDF
PDF
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Best Practices of Infrastructure as Code with Terraform
Automation of Hadoop cluster operations in Arm Treasure Data
The Practice of Alluxio in JD.com
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
Aerospike: Maximizing Performance
Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Atom: A cloud native deep learning platform at Supremind
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Global deduplication for Ceph - Myoungwon Oh
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
Running Solr in the Cloud at Memory Speed with Alluxio
SAOUG 2018 - Rapid Home Provisioning
Adobe Advertising Cloud: The Reality of Cloud Bursting with OpenStack
RGW Beyond Cloud: Live Video Storage with Ceph - Shengjing Zhu, Yiming Xie
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
Configuring Aerospike - Part 1
Tuning TCP and NGINX on EC2
Be a Cloud Native
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Ad

Viewers also liked (12)

PDF
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...
PPTX
DevOps for Your Mobile App
PDF
Defining Mobile App Deployment for the Modern Campus: Benchmarking and Best P...
PDF
End to End Cloud App Deployment Solution
PDF
Automate the Application Deployment Process
 
PDF
Modern Deployment Strategies
PPTX
Model-Driven Deployment : The Best Practice Successor to Virtual Appliances
PPTX
Immutable Infrastructure: the new App Deployment
PPT
Managing Software from Development to Deployment in the Cloud
PPTX
Cloud service models 101
PPTX
Application Model for Cloud Deployment
PDF
Javantura v4 - Self-service app deployment with Kubernetes and OpenShift - Ma...
Developing in the Fastlane -> How LookLive uses Fastlane to automate and spee...
DevOps for Your Mobile App
Defining Mobile App Deployment for the Modern Campus: Benchmarking and Best P...
End to End Cloud App Deployment Solution
Automate the Application Deployment Process
 
Modern Deployment Strategies
Model-Driven Deployment : The Best Practice Successor to Virtual Appliances
Immutable Infrastructure: the new App Deployment
Managing Software from Development to Deployment in the Cloud
Cloud service models 101
Application Model for Cloud Deployment
Javantura v4 - Self-service app deployment with Kubernetes and OpenShift - Ma...
Ad

Similar to App Deployment on Cloud (20)

PDF
Java in the Cloud : PaaS Platforms in Comparison
PDF
Java in the Cloud : PaaS Platforms in Comparison
PDF
AWS Vs Firebase Vs Heroku- Which is Suitable for your Next Project?
PPTX
Introduction to Google Cloud Services / Platforms
KEY
Rails Usergroup Hamburg: Heroku
KEY
Cloud tools
PDF
Lets SAASify that Desktop Application
PPTX
Cloud & PHP
PDF
GCP overview
PDF
Introduction to Cloud Computing (New)
PDF
Spring in the Cloud
PDF
Powerful Google Cloud tools for your hack
PPTX
What are clouds made from
PPT
Deploying and running Grails in the cloud
PDF
Cloud PaaS with Java
PDF
Practical PaaS presentation
PDF
From localhost to the cloud: A Journey of Deployments
PDF
Midwest php 2013 deploying php on paas- why & how
PPTX
Cloud and agile software projects: Overview and Benefits
PDF
Harper Reed: Cloud Contraints
Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison
AWS Vs Firebase Vs Heroku- Which is Suitable for your Next Project?
Introduction to Google Cloud Services / Platforms
Rails Usergroup Hamburg: Heroku
Cloud tools
Lets SAASify that Desktop Application
Cloud & PHP
GCP overview
Introduction to Cloud Computing (New)
Spring in the Cloud
Powerful Google Cloud tools for your hack
What are clouds made from
Deploying and running Grails in the cloud
Cloud PaaS with Java
Practical PaaS presentation
From localhost to the cloud: A Journey of Deployments
Midwest php 2013 deploying php on paas- why & how
Cloud and agile software projects: Overview and Benefits
Harper Reed: Cloud Contraints

Recently uploaded (20)

PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
STKI Israel Market Study 2025 version august
PDF
August Patch Tuesday
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPT
What is a Computer? Input Devices /output devices
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Unlock new opportunities with location data.pdf
PDF
Architecture types and enterprise applications.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Developing a website for English-speaking practice to English as a foreign la...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Zenith AI: Advanced Artificial Intelligence
Univ-Connecticut-ChatGPT-Presentaion.pdf
Enhancing emotion recognition model for a student engagement use case through...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
STKI Israel Market Study 2025 version august
August Patch Tuesday
O2C Customer Invoices to Receipt V15A.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
What is a Computer? Input Devices /output devices
A comparative study of natural language inference in Swahili using monolingua...
Unlock new opportunities with location data.pdf
Architecture types and enterprise applications.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
sustainability-14-14877-v2.pddhzftheheeeee
observCloud-Native Containerability and monitoring.pptx
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Final SEM Unit 1 for mit wpu at pune .pptx
Developing a website for English-speaking practice to English as a foreign la...

App Deployment on Cloud

  • 2. www.tothenew.com Agenda ● Introduction to cloud computing ● SAAS, PAAS and IAAS - A quick comparison ● Benefits of deploying on cloud ● Challenges while deploying on cloud ● Things to consider when moving to cloud - Business and Architectural aspects ● A thing about clustering ● Comparison between various Platform as a Service (PAAS) providers. ● Demo using: ○ Firebase - https://firebase.google.com/ ○ AWS - https://aws.amazon.com/ ○ Heroku - http://heroku.com/ ○ Cloud Foundry - https://www.cloudfoundry.org/
  • 4. www.tothenew.com Cloud Computing In the simplest terms, cloud computing means storing and accessing data and programs over the Internet instead of your computer's hard drive.
  • 5. www.tothenew.com SaaS, PaaS and IaaS - A Quick Comparison
  • 7. www.tothenew.com A Few More Reasons to Use Cloud ● Scalability ● Availability ● No need for DevOps expertise ● If a pre-packaged service is not suitable for one’s need, you can get a custom solution with added cost
  • 8. www.tothenew.com Challenges While Deploying on the Cloud • Dependency on the Internet connection • Legal issues (ownership of data) • Data transfer can be time consuming • Dependency on the service provider • Limited control and reliability • May require new training • Security and privacy of the data as per rules and regulations • Security measures against a cyber attack • App structure may require changes
  • 9. www.tothenew.com Even with all of the above challenges associated with Cloud computing, the environment has immense potential for many business models. As platforms mature and the economies of scale continue to grow, costs will continue to fall and reliability and security standards will improve further. Immense Potential of the Cloud Environment
  • 10. www.tothenew.com Things to Consider When Moving to Cloud - Business Aspects ● Implementation & Integration ○ Planning ○ Compatibility ○ Flexibility ● Cost ○ Cost Variations ○ Hardware Costs ○ System Complexity ● Availability & Performance ○ Bandwidth ○ Uptime ○ Support & Maintenance ● Data Security & Protection ○ Data Protection ○ Hardware Security ○ Backup & Disaster Recovery ● Standards & Regulations ○ Compliance ○ Confidentiality ○ Policies and Procedures
  • 11. www.tothenew.com Things to Consider When Moving to Cloud - Architectural Aspects ● Single Instance vs Clustered ● Deployment ● Green-blue deployment ● Rescaling ● Auto-scaling ○ RPM, Swap Utilization, Message Queue, CPU Utilization ● Restarting ● Rollback ● Config ○ Changing config requires restart of all servers ● Logs - Logstash, Logentries, Papertrail, etc. ● Performance monitoring - New relic, Airbrake
  • 12. www.tothenew.com A Thing About Clustering ● A way to provide high-availability by replicating your system ● Handles hardware/software failure ● Traffic is not always high ● Provides for horizontal scaling ● Overcomes CPU/RAM limitations
  • 13. www.tothenew.com Setting up a Local Cluster /etc/nginx/sites-available/default ------------------------ server { listen 80; location / { proxy_pass http://intellimeetservers; } } upstream intellimeetservers { server 127.0.0.1:7070; server 127.0.0.1:8080; } ● nginx Load Balancing - http://goo.gl/78uu8O ● Apache Load Balancing - http://goo.gl/c5seF2
  • 16. www.tothenew.com ● Firebase is known primarily as a PaaS ● It is deeply integrated with Google Cloud Platform, allowing you to use Google's Infrastructure-as-a-Service directly within your Firebase project. Key Features: It's more than capable of handling real-time data updates between devices. Provides cross platform API if you are using firebase DB with an app. Limitations: Storage format is entirely different to that of SQL, (Firebase uses JSON) so you won’t be able to migrate that easily. Reporting tools won't be anywhere near to the ones of standard SQL. Pricing: It has a free plan for hobbyists along with a fixed price plan of $25/Month for predictable pricing for growing apps and a pay as you go plan for commodity pricing. Bonus: New users can get real time db with up to 1GB of database storage, 5GB of file storage to handle file uploads and 1GB of hosting space to upload your static site content. This is more than enough to launch a small website. Few Insights
  • 17. www.tothenew.com Hosting Your Web-app on Firebase • Setup Firebase CLI for ubuntu - here • Visit Firebase website - here • Create a web-app on Firebase console • Set auth to access database • Sign-in to Google – firebase login • Initialize Firebase on your development machine – firebase init • Check your application – firebase serve • Deploy your application – firebase deploy
  • 19. www.tothenew.com ● AWS is primarily known as an IaaS ● Many of the services available in AWS are comparable to services available in PaaS offerings Key Features: Since AWS is largely an IaaS, there is virtually no limit to the languages, databases or server side technologies you can install and run. Limitations: AWS services may require more management overhead than other PaaS options. Pricing: Pricing is based on instances, storage, application services and data egress charges. Amazon, however, offers a monthly calculator to help you estimate your costs. Bonus: New users can get 750 hours, 30GB storage, and 15GB bandwidth for free with AWS's Free Usage Tier. Few Insights
  • 20. www.tothenew.com Hosting Your Web-app on AWS • Launch an EC2 instance • Select an AMI- preferably Linux • Choose instance type • Configure instance (can be left alone and the default settings will be applied) • Add Storage • Tag instance • Configure the Security Group by adding rules - Create new or use existing • Review and launch • Create a new key and download or use an existing key that is listed • After the instance is up and running, you can set it up as you want
  • 21. www.tothenew.com Deploying Your Grails App on AWS • Create a new EC2 instance from the AWS dashboard. Please ensure that the Security Group is configured to allow SSH on port 22 and HTTP on port 80 • Login to the system using ssh and run the following commands: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install nginx tomcat7 unzip git oracle-java7-installer • Install "sdkman" to manage your Grails version curl -s http://get.sdkman.io | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install grails <grails version>
  • 22. www.tothenew.com Deploying Your Grails App on AWS (contd.) • Modify the default nginx site to redirect all traffic to the tomcat instance running on port 8080 default ---------- server { listen 80; server_name 127.0.0.1; location / { proxy_pass http://localhost:8080; proxy_redirect default; } } Restart nginx and check if your site is showing the default tomcat page
  • 23. www.tothenew.com Deploying Your Grails App on AWS (contd.) ● Generate a new ssh key for your instance and add the public key (id_rsa.pub) as a deploy key to your app. This will allow the instance to clone the code repository every time you want to deploy ssh-keygen -t rsa ● Once you have cloned the code repository on the instance, run the "grails war" command to create a new WAR file sudo service tomcat7 stop rm -rf /var/lib/tomcat7/webapps/* grails war sudo mv target/*.war /var/lib/tomcat7/webapps/ROOT.war sudo service tomcat7 start ● Check if the site is working correctly
  • 25. www.tothenew.com Key Features: One of the early PaaS providers, Heroku is ideal for quick deployments and fits a wide range of distributed applications. Limitations: Cost of add-ons varies and estimating costs can be challenging as the number of add-ons increases and loads vary across application components. Pricing: Based on the number and size of dynos deployed ($0.05/hour - $0.10/hour), the size of Postgres database and add-ons used. Bonus: Starter databases with up to 10,000 rows are free. It has a huge marketplace and one can find a lot of add-ons and support. ● Provides abstract computing environments called dynos ● Dynos are classified as: Web dynos or worker dynos; the former respond to HTTP requests and the latter to task requests in a queue ● Ideal for quick deployments Few Insights
  • 26. www.tothenew.com Hosting Your Web-app on Heroku • Setup Heroku toolbelt for ubuntu- link • Deployment – git push heroku master • Rescaling – heroku ps:scale web=2 – heroku ps:scale web+2 • Restarting – heroku restart • Rollback to old deployment version – heroku rollback v46 • Config // automatic restarts all dynos/instances – heroku config:set KEY=VALUE • Logs – heroku logs –t – heroku logs –t –p web
  • 28. www.tothenew.com ● You can deploy apps written in 8 languages to your private infrastructure of choice ● 5 frameworks are also available at your disposal Key Features: Cloud Foundry is extensible, so you can add more functionality via buildpacks or similar mechanisms. Limitations: You cannot specify command line parameters like JAVA_OPTS and auto-scaling is not provided. Pricing: 0.03$/hr after 60 days free trial Bonus: First class support for Grails. Few Insights
  • 29. www.tothenew.com Deploying Your Grails App on Cloud Foundry ● Register a new account at https://run.pivotal.io/ ● Install their CLI tool and run the following command: cf login -a https://api.run.pivotal.io ● Add a manifest.yml file to be read by Cloud Foundry manifest.yml --- applications: - name: im-todo memory: 2G instances: 1 path: target/AngularJS-0.1.war buildpack: java_buildpack services: - mysql
  • 30. www.tothenew.com Deploying Your Grails App on Cloud Foundry (contd.) ● Provision a new mysql service using the following command: cf create-service cleardb spark mysql Read more about services here: https://docs.cloudfoundry.org/devguide/services/ ● Modify the DataSource.groovy file to use the DATABASE_URL environment variable Sample code: https://github.com/cloudfoundry-samples/pong_matcher_grails/blob/master/grails-app/conf/DataSource.groovy ● Create the war file using the "grails war" command. This will create a war file in the target folder of your application ● Create a new app in your cloud foundry account ● To deploy, just run the command: cf push im-todo
  • 32. www.tothenew.com ● Microsoft eventually added Infrastructure-as-a-Service (IaaS) functionality to Azure and included Linux servers in the IaaS line-up as well as Windows operating systems. ● 5 frameworks are also available at your disposal. ● If current deployment fails, it automatically deploys the last known successful war. Key Features: Since Windows Azure is an IaaS and PaaS in one, developers can mix and match IaaS components with PaaS offerings giving you more control. Limitations: Minimalist administration portal. Pricing: Based on size of instances running; prices range from $0.02/hour (768MB of RAM & 1 shared virtual core) to $0.64/hour (14GB of RAM & 8 virtual cores). Pricing for high memory machines is also available. Bonus: Free 30-day trial with a limit of up to $200 is available for new users. Few Insights
  • 34. www.tothenew.com ● You can deploy apps written in 6 languages to 2 different infrastructures. ● You can scale your applications vertically , horizontally or let OpenShift Online automatically scale your instances Key Features: It has a large number of component options spanning the application stack from frontend to backend services. Developers can interface with OpenShift through a web console, the command line or through an integrated development environment. Limitations: It works well with Git, but non-Git deployments might require additional steps. Pricing: OpenShift Online pricing is based on the number and types of components (called gears) you deploy. Gear prices range from $0.02/hour to $0.10/hour, depending on the size: 512MB (small), 1GB (medium), or 2GB (large). The Silver support plan is $20/month plus usage costs. Bonus: A limited number of resources are available as a trial; 3 small gears and 1GB of storage per gear are free. Few Insights
  • 35. www.tothenew.com References ❏ http://www.tomsitpro.com/articles/paas-providers,1-1517.html ❏ http://www.paasify.it/vendors ❏ http://www.smartceo.com/dp-solutions-5-things-to-consider-when-moving-to-the-cloud/ ❏ https://www.simple-talk.com/cloud/development/moving-applications-to-the-cloud-part-1-8211-what-are-the-considerations/