What is this about? Developer perspective on Cloud-Hosting / PaaS specifically with CloudControl and Ruby on Rails Typical Challenges Forecast What is this .. PaaS / IaaS? SaaS CRM, E-Mail, Virtual Desktops, Communication, Games, All kind of Webservices, Specific tasks PaaS Specific Environments and Runtimes, Operating Systems, Database, Web Server IaaS Storage, Serves, Processing, Virtual Machines, Network. What is this .. PaaS / IaaS? PaaS Amazon AWS Elastic Beanstalk cloudControl EngineYard Heroku
IaaS Amazon AWS Google Cloud Engine Microsoft Azure (DigitalOcean) ... Retrospective (from a Rails perspective) At the beginning of Rails: complicated deploy compared for instance to PHP applications. No ready-made hosting packages Retrospective (from a Rails perspective) Many tools emerged from the ruby environment which were adapted in other technologies Capistrano for deployments Chef / Puppet for server provisioning Despite these Tools: Still a lot of special knowledge needed ca. 2009: Heroku significantly simplified deployment process git as a central tool ca. 2012: cloudControl supports ruby friendly and in Berlin :) Retrospective (from a Rails perspective)
cloudControl deployment process easy deploy via git + simple console command easy and fast setup of new deployments and environments zero-downtime deploy out of the box less worries about software- /security- updates How to deploy with cloudControl Prepare (only once for every app) $ cctrlapp APP_NAME create ruby $ git remote add cctrl REPO_URL How to deploy with cloudControl Push code/build image $ git push cctrl localbranch:stage How to deploy with cloudControl Deploy! $ cctrlapp APP_NAME/stage deploy How to deploy with cloudControl Run migrations or other setup tasks $ cctrlapp APP_NAME/stage run rake db:migrate How to deploy with cloudControl cloudControl supports multiple deploys of the same app out of the box in the previous example, our deploy was called stage http://stage.APP_NAME.cloudcontrol.com AddOns dependencies as a service databases, sending mails, message queues, caching, ssl, AddOns the addon provider will take care of aspects like fine tuning, security updates, configuration etc but you can also provide your dependencies by yourself Challenges No persistent filesystem No guarantee that file changes survive till the next request User-uploaded files need to be stored somewhere else No persistent IP-Address Can be a problem with whitelists QuotaQuardStatic as a solution Challenges Addons allow to outsource updates and security issues for dependencies too - but they can tempt to not think enough about the specific configuration needs of your app Charset, encoding, but also performance optimization, e.g. for databases should still not be ignored. Challenges Not all dependencies can be easily used. This can especially be challenging when moving into the cloud. Practical example pdftk Solution: Custom Buildpacks? Reading tip: 12-factor app http://12factor.net 12 aspects of a modern, cloud based app language and provider agnostic Reading tip: 12-factor app Examples Explicitly declare and isolate dependencies in Ruby, you do this via the Gemfile and bundle exec Store config in the environment your codebase / repository shouldnt contain any deployment specific configuration Execute the app as one or more stateless processes Forecast: cloudy Docker open source container technology to isolate OS resources from each other application/processes run on their own separate container but still using the same kernel of the host system! Docker => virtualization without the cost of classical virtual machines a docker container only contains the app and its dependencies/libraries (maybe only 20 MBs) while a Virtual Machine also includes a whole operating system (something like 3 GB or more) much faster start (a few seconds vs. minutes of a VM) Docker same setup for developers, Q/A people, staging, testing/CI and production easier setup for new developers joining a dockerized project Docker it makes your app (and its context/dependencies!) much more portable decreases the It works on my machine phenomenon Docker is a gamechanger in the context of building and running apps in the cloud! Forecast: cloudy What will cloudControl do next? they bought dotCloud the PaaS provider which released docker Questions / Feedback / Discussion