JavaOne 2014 - JVM PaaS Håkan Jonson, Citerus AB hakan.jonson@citerus.se! Patrik Fredriksson, Citerus AB patrik.fredriksson@citerus.se
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 3
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Introduction; the project January 2012 A very specific business process support system Client not in IT, no infrastructure or hosting organisation hosting and maintenance far from core business Web based with modern rich application look and feel Continuous Deployment, VCS, bug-tracking, monitoring, and all our usual developer tools 2
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 4
..as a Service SaaS SaaS Software as a Service whatever application offered online; i.e trello, gmail, dropbox, etc. More refined, less control PaaS IaaS PaaS Platform as a Service a bunch of linux machines - but with your (typically) technology stack pre-installed and maintained by the people who runs the platform. IaaS Infrastructure as a Service a bunch of linux machines; i.e Amazon EC2, Joyent, Rackspace, etc. CaaS Container as a Service bridging the gap between IaaS and PaaS by allowing developers to package their services into images (containers) and deploy them onto an IaaS. 5
Platform as a Service (PaaS) Targeting all aspects of running and hosting your application network, servers, storage, etc. runtime environments, web containers, authentication. etc. deployment processes, monitoring, scaling and occasionally also VCS Sliding scale; each service provider has their own take on what to include and where to focus Shortening time-to-market for developers and reduces developing time Let developers focus on core functionality instead of deployment and infrastructure Low initial cost, i.e pay for your resource consumption 6
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 7
Surveying the Landscape 8
Notes JVM web app with MongoDB as datastore Two versions: Clojure and Java https://github.com/citerus/notes 9
dotcloud Company Infrastructure Scaling Pricing Free Tier Technologies San Franscisco based startup. Acquired in august 2014 by german cloudcontrol. Amazon EC2 (US EAST) Horizontal and vertical scaling of application and services. By the total amount of RAM you use by the hour ( 0.6 for a 32 mb chunk/hour). Disk space included up to 10GB per 1GB of RAM allocated. Custom pricing for high usage customers. Nice pricing calculator (drag n drop). No. Free tier cancelled April 2013 (community hosted initative didn't seem to happen). MongoDB, MySQL, PostgreSQL, Redis, Apache Solr, SMTP, SSL, Opa Framework (deprecated, 2014), Jetty. Custom Service..which lets you run "virtually any application"; e.g Riak, CoachDB, Neo4j, Haskell, Erlang, etc. Language Support Deployment Machine Level Access Interface SLA Java 1.6/1.7 (Clojure, Grails, JRuby on Rails, Life, Play, Scala), PHP, Python, node.js, Perl and Ruby. Using command line tool. No built-in integration with any VCS or CD service, but you might deploy your own Jenkins instance as an application and integrate with e.g GitHub. Tunneled SSH. CLI for deployment and management. Web primarily for monitoring. Support SLAs only. 10
dotcloud; deployment Deployment of pre-built.war (clojure). Topology specified in deployment configuration.yml-file; dotcloud.yml Platform interaction using command line tool (dotcloud written in python). deployment, scaling, status, authentication, etc. Tunneled SSH access to underlying EC2-nodes. Runtime environment variables supplied by platform in environment.json file. Code snip specific for dotcloud deployment. 11
dotcloud 12
Heroku Company San Franscisco based startup. Acquired by SalesForce in december 2010. Infrastructure Scaling Amazon EC2 (US-EAST-1) Amazon EC2 (EU-WEST-1, beta) Manual horizontally using dynos. Dynos available in different sizes (RAM + CPU). Automatic scaling via add-ons (https://addons.heroku.com/adept-scale) Pricing Per dyno-hour; 512MB RAM, 1x CPU Share costs $0.05/dyno-hour. 1024MB RAM, 2x CPU Share costs $0.10/ dyno-hour, etc. Addons priced separately. Free Tier Technologies Language Support 1 dyno for free. Postgres with additional technologies as optional third party add-ons. Add-ons includes e.g MongoDB, Hadoop, Redis, ElasticSearch, Apache Solr, RabbitMQ, NewRelic, Graphite, etc. Ruby, Node.js, Java 1.6/1.7 (Clojure, Scala, Gradle, Grails, Play), Python, PHP..others via third party build packs (https://devcenter.heroku.com/articles/third-party-buildpacks) Deployment Via Git, source code only. Maven default Java builder. WAR-files via Heroku Toolbelt (only Tomcat 7, Java 6) Machine Level Access Interface SLA None. CLI (Heroku Toolbelt), Web, HTTP/JSON API. Foreman for running locally. No SLA ("We'll do everything we can to achieve 100% uptime"). Publishes Uptime history: https://status.heroku.com/uptime 13
OpenShift Online Company RedHat Infrastructure Amazon EC2 (US-EAST/EU-WEST) Scaling Automatic horizontal scaling of applications (using an HAProxy load-balancer). Pricing Free Tier Technologies Per hour and storage used. Three small gears (512 MB RAM), 1 GB storage/gear. MongoDB, MySQL, PostgreSQL, Vert.x, JBoss EAP, JBoss AS / Wildfly JBoss EWS (Tomcat), JBoss Data Virtualization, Zend, Jenkins, SwitchYard. Language Support Java, Node.js, PHP, Python, Perl, Ruby and custom. Deployment Machine Level Access Via Git, pre-built artifacts or source code. Maven default Java builder. Jenkins support. SSH. Interface CLI, Web, REST API. SLA Support SLA only. 14
OpenShift Online; deployment Deployment of pre-built.war (clojure). Platform interaction using command line tool (rhc, git). Deployment chain 1. Create and configure application 2. Configure additional cartridges 3. Clone remote Git repository 4. Commit to local Git repository 5. Push Basic Concepts Code snip specific for OpenShift Online Gear A container with a set of computing resources that runs your application. Cartridge Packaged frameworks and components (e.g. databases) used to create an application. 15
OpenShift Online 16
Google AppEngine Company Infrastructure Scaling Pricing Free Tier Google Google s infrastructure (multiple regions). Automatic vertical scaling with configurable min/max levels. Per instance hour, disk usage, datastore read/write, email api, usage and outgoing network traffic. Instance hours break down on memcache usage, search operations, etc. Disk usage break down on logs, relational data, key/value store, etc. Free quotas per application (28 instance hours, 50k read/write cloud store, 1GB in/out traffic, etc). See https://cloud.google.com/appengine/ Technologies Language Support Deployment Machine Level Access Interface Cloud SQL, Cloud Storage, Cloud Datastore, Files API, Image Manipulation, Pagespeed, SNI SSL Certificates, Socket API, Task Queue API, URLFetch, Users API, Cloud DNS, Cron, Translate API, Prediction API, BigQuery, Cloud DNS, etc. Python, Java, PHP and Go. Pre-built artifacts (using Maven). None. CLI, IDE plugins (Eclipse, IntelliJ), Ant, Maven and Web. SLA Monthly Uptime Percentage to Customer of at least 99.95% 17
Pivotal Web Services (Cloud Foundry) Company Infrastructure Scaling Pricing Free Tier Technologies Language Support Deployment Machine Level Access Interface SLA Pivotal Their own infrastructure (VM-ware?) Manual horizontal scaling and automatic vertical scaling with configurable upper bounds. $0.03/GB-hour RAM and instance. Additional technologies charges separately. 60 days free trial. MongoDB (via MongoLab), MySQL (via ClearDB), PostgreSQL (via ElephantSQL), RabbitMQ (via CloudAMPQ), Redis Cloud, Memcache, ElasticSearch, Load Impact, New Relic.! Using the lucid64 stack (a pre-built file system with some common applications pre-installed) native support for: MySQL, PostgreSQL, etc, Java, Go, Node.js, PHP, Python, Ruby and arbitrary language using a custom buildpack. Pre-built artifact for common supported languages or pre-built buildpack (which contains deployment and runtime configuration for your application), using CLI, Maven or Gradle. Partial using the CLI or directly to you application server if e.g OpenSSH-server installed. CLI, Web. No information (screenshot). 18
Jelastic (a licensed solution) Company Infrastructure Scaling Pricing Founded 2010 in Ukraine. Headquarters now in San Fransisco area with officies in Europe and Australia. Service providers spans more or less worldwide. Service provider specific; typically owned by service provider. Automatic vertical scaling (with configurable min/max levels), manual horizontal scaling. Cloudlet (128 MB RAM + 2000MHz CPU), Disk usage, SSL, IP Addresses and network traffic. Service provider specific; ServInt and Elastx estimates apx. $40-$45 for three cloudlets/month. LunaCloud only $18. Disk usage typically linear priced. Free Tier Technologies Language Support Deployment Machine Level Access Interface SLA Service provider specific; many offers a trial period or low usage free tier, e.g www.elastx.com (SE), www.lunacloud.com (Central Europe), www.servint.net (US). MySQL, PostgreSQL, MongoDB, CouchDB, MariaDB, Elastic VDS, Tomcat, Jetty, TomEE, Glassfish, Apache, NGINX, memcache. Java 1.6/1.7/1.8 (Clojure, JRuby, ColdFusion, Groovy, Scala), PHP, Ruby, Python. Pre-built artifacts. SSH. Web, Maven (deployment only), REST API (beta). Service provider specific; e.g www.elastx,com offers only support SLA. 19
Jelastic; deployment @ elastx.com Deployment of pre-built.war Platform and services interaction using web based interface(s) Manual platform configuration! Basic Concepts Environment A runtime container (application server) and a set of services Scaling, management and configuration per environment Code snip specific for Jelastic deployment. 20
Jelastic 21
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 22
Timeline 2010 Jelastic founded in Ukraine. 2012-07 Opens office in Moscow. 2014-04-15 Announces support for OpenShift cartridges. 2009-09 2011-06-25 dotcloud exits Beta. 2013-03 dotcloud, Inc releases Docker as open source. Microsoft announces Azure for Java. 2013-05-25 dotcloud shuts down their free tier option. 2008-04-07 App Engine Beta. 2009 App Engine for Java. 2011-09-01 App Engine exists beta. 2013-10-29 dotcloud, Inc changes name to Docker, Inc 2007 Heroku is founded, focusing initially on Ruby support. 2010-12-08 Acquired by Salesforce. 2014-08-01 PaaS business acquired by cloudcontrol. 2007 2008 2009 2010 2011 2012 2013 2014 2006-08-25 Amazon launches EC2 in beta. 2010 Cloudbees founded. 2011-09-19 Amazon introduces AWS Elastic Beanstalk. 2014-05-07 Pivotal announces Pivotal Web Services. 2014-09 Launches Europe. dotcloud Jelastic Heroku Amazon (Beanstalk) OpenShift Cloudbees Microsoft Azure 2009-08-19 Cloudfoundry is acquired by SpringSource. 2009-08-10 SpringSource is acquired by WMware. 2011-05-04 OpenShift Online beta launches. 2012-12-04 Cloudfoundry gets a new home as part of VM Wares Pivotal division. 2013-06-10 OpenShift Online exits beta. 2014-04-23 AWS Elastic Beanstalk launches support for Docker containers. 2014-09-11 Cloudbees exits PaaS business to fokus on Jenkins in the cloud. 2014-09 2 mil. deployed apps 2014-08-14 Announces plans for platform built on Docker container API CloudFoundry
A Market in Consolidation Moving market where new vendors appear, merge and change business strategies all the time. Hard to overview and compare since each vendor has their own approach to the platform as a service promise. Market immature when it comes to pricing and service level. Vendors rarely transparent on how your data is being handled; i.e where is it, internal encryption. etc. Everything you think you know is subject to change. 24
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 25
The Project Revisited Deployed at dotcloud Matching technology stack (Java, MongoDB, PostgreSQL and RabbitMQ) Mature (spring 2014; out of beta) Nice feature set European launch hinted 6 months Latency problems (application dependent on low latency; clients primarily in northern Europe). Platform instability. Price model changed (price increased, free tier cancelled which lead to increased cost for stage and test environments). 26
The Project Revisited 12 months Supplier gradually changed focus towards platform tooling (Docker) Support accidentally deleted production instance project credibility issues (!) Moved to Jelastic Local provider (Stockholm / Sweden) Addresses latency problems Migration took 4h Matching technology stack Backup routines enabled quick and smooth data migration 27
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 28
Conclusions; how to choose and things to consider Infrastructure and technology stack Level of maturity and owner structure is this the new kid on the block?, does their business model seem sound?, track record, etc. Service License Agreement (SLA) and support promise what kind of support is offered make sure that one exists and seems reasonable check whether it is relies on/is compatible with any underlying SLA s (i.e from a IaaS backbone). Pricing Legal considerations what happen when my data potentially falls under another country/regions jurisdiction 29
Conclusions; one foot out the door Own your data Integrate scheduled backups in your continuous deployment cycle Move backup data to third party host (e.g Amazon S3 or your basement) Leverage backup data for local testing and debugging..will force you to keep your restoring procedures up to date. 30
Conclusions; one foot out the door Avoid lock-in Use proven and common open-source technologies to avoid lock-in Google Big Table. Not so much. Keep number of platform customisations to a minimum. harder than expected when complexity increase. Keep your source and build tooling close (not necessarily closed). 31
Conclusions; platform expectation management Geography matters (maybe) Asses latency times for your use case, legal considerations, support organisation Pricing subject to change It s easy to forget that you probably need a couple of mirrored environments when you calculate prices in the pay-for-what-you-use price model (e.g stage and test); price will thus probably be higher than expected. Monitoring use third party, platforms focus on billing and resource usage, not so much on application health roll your own 32
Conclusions; how to choose and things to consider TRY IT OUT 33
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 34
Outlook Consolidation of technologies Jelastic now supports OpenShift cartridges; next generation OpenShift platform utilises Docker technology, Docker part of CloudFoundry Foundation, etc. Marketplaces Cherry pick services from third-party vendors Enables faster integration with new services Container as a Service (CaaS) Bridges the gap between infrastructure (IaaS) and platform (PaaS). Arbitrary technology stack (not limited by what the platform may or may not support). Let developers own and configure their own services and runtime, but still scale with platform servers, network and storage. 35
Citerus - Håkan Jonson (hakan.jonson@citerus.se) Agenda Background The PaaS Promise Overview Provider Walk-through (Deployments) Market Reflections Project Experience Reflections & Lessons Learned Speculations.. Brilliant Insights into the Future Questions & Answers 36
Thanks! Håkan Jonson, Citerus AB hakan.jonson@citerus.se! Patrik Fredriksson, Citerus AB patrik.fredriksson@citerus.se