tales from the paas ops frontlines

Upload: devolute

Post on 02-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    1/29

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    2/29

    Is there Sun behind the clouds?

    Andreas Woerle, Daniel SpaudeRails developer

    d:evolute

    @d_evolute

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    3/29

    What is this about?

    Developer perspective on Cloud-Hosting /

    PaaS

    specifically with CloudControl and Ruby on Rails

    Typical Challenges

    Forecast

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    4/29

    What is this .. PaaS / IaaS?

    SaaSCRM, E-Mail, Virtual Desktops, Communication,

    Games, All kind of Webservices, Specific tasks

    PaaSSpecific Environments and Runtimes,

    Operating Systems, Database, Web Server

    IaaSStorage, Serves, Processing,

    Virtual Machines, Network.

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    5/29

    What is this .. PaaS / IaaS?

    PaaS Amazon AWS Elastic Beanstalk

    cloudControl

    EngineYard Heroku

    IaaS

    Amazon AWS Google Cloud Engine

    Microsoft Azure

    (DigitalOcean)

    ...

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    6/29

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    7/29

    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

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    8/29

    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)

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    9/29

    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

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    10/29

    How to deploy with cloudControl

    Prepare (only once for every app)

    $ cctrlapp APP_NAME create ruby

    $ git remote add cctrl REPO_URL

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    11/29

    How to deploy with cloudControl

    Push code/build image

    $ git push cctrl localbranch:stage

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    12/29

    How to deploy with cloudControl

    Deploy!

    $ cctrlapp APP_NAME/stage deploy

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    13/29

    How to deploy with cloudControl

    Run migrations or other setup tasks

    $ cctrlapp APP_NAME/stage run rake

    db:migrate

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    14/29

    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

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    15/29

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    16/29

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    17/29

    AddOns

    dependencies as a service

    databases, sending mails, message queues,

    caching, ssl,

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    18/29

    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

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    19/29

    Challenges

    No persistent filesystem

    No guarantee that file changes survive till the next

    request

    User-uploaded files need to be stored somewhereelse

    No persistent IP-Address Can be a problem with whitelists QuotaQuardStatic as a solution

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    20/29

    Challenges

    Addonsallow 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 stillnot be ignored.

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    21/29

    Challenges

    Not all dependencies can be easily used.

    This can especially be challenging when

    moving into the cloud.

    Practical example pdftk Solution: Custom Buildpacks?

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    22/29

    Reading tip: 12-factor app

    http://12factor.net

    12 aspects of a modern,

    cloud based app

    language and provider

    agnostic

    http://12factor.net/
  • 8/10/2019 Tales from the PaaS Ops Frontlines

    23/29

    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

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    24/29

    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!

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    25/29

    Docker

    => virtualization without the cost of classicalvirtual machines

    a docker container only contains the app and itsdependencies/libraries (maybe only 20 MBs)

    while a Virtual Machine also includes a wholeoperating system (something like 3 GB or more)

    much faster start (a few seconds vs. minutes of a

    VM)

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    26/29

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    27/29

    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!

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    28/29

    Forecast: cloudy

    What will cloudControl do next?

    they bought dotCloud

    the PaaS providerwhich released docker

  • 8/10/2019 Tales from the PaaS Ops Frontlines

    29/29

    Questions / Feedback / Discussion