Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intranet Spawner Application using Docker, Ansi...

Bryan te Beek
September 19, 2018

Intranet Spawner Application using Docker, Ansible and the DigitalOcean API

The presentations gives a brief overview on how we implemented a spawner application that let's one of our customers "Joe" spawn instances of his Intranet application for his customers in an easy way.

Every deployment does a rollout of the Intranet application to a domain that is provided inside the spawner application.

Bryan te Beek

September 19, 2018
Tweet

More Decks by Bryan te Beek

Other Decks in Technology

Transcript

  1. 1@bryantebeek The Challenge Build an application that lets Joe spawn

    an instance of his intranet application with minimal effort
  2. 1@bryantebeek The Challenge So what now? • We need to

    build an application for Joe to manage his instances • Every instance spawned will need • a url <domain>.intranet.io • a place to run • custom environment variables "I can do all of this for you, and more..." - mr. Kubernetes
  3. 1@bryantebeek The Solution The Spawner Application • Provisioning was originally

    done with Ansible • Integrating this in Laravel feels like reinventing the wheel
  4. 1@bryantebeek Spawning an instance + + Start droplet provisioning job

    in Jenkins Also create a DNS record for the application 1. Request a droplet 2. Poll; is droplet ready?
  5. 1@bryantebeek Spawning an instance Poll the instance on the provided

    domain to see if it's ready 1. Request a droplet 2. Poll; is droplet ready? 3. Provision droplet + DNS
  6. 1@bryantebeek Spawning an instance Email Joe that the application instance

    is ready 1. Request a droplet 2. Poll; is droplet ready? 3. Provision droplet + DNS 4. Poll; is application ready?
  7. 1@bryantebeek 1. Queue snapshot Remove the DNS record, again using

    the DigitalOcean API + Destroying an instance
  8. 1@bryantebeek 1. Queue snapshot 2. Remove DNS record Destroy the

    droplet using the in DigitalOcean API + Destroying an instance