SlideShare a Scribd company logo
1 of 25
Docker CoreOS
Solving a Real Pain in the PaaS
Ensemble
+
THE PROBLEM
I present to you...
Lot’s of Tools, Few Solutions
● No Master Blueprints or Distributions
● Docker is Not Enough
● Docker Hub is a Mess
● Fleet has Obvious Limitations
● Managing Systemd Units is Cumbersome
● Logging is a Real Pain
● Data Persistence is Necessary
● Kubernetes & Mesos are Overkill *
Chatty Micro Services
But You Run Fat Stacks...
Redis, Memcache, Varnish, MongoDB,
CouchDB, Storm, Jenkins, NodeJS, MySQL,
Postgres, Apache, Nginx, Tomcat, Mongrel,
Mongrel2, Sinatra, Riak, Graphite, Cassandra,
Hadoop, ActiveMQ, Solr, RabbitMQ,
Elastic Search, Logstash, Kibana,
HAProxy, Postfix, and Graphite
What Not To Do
☒ Manually Create Unit Files
☒ Blindly Use Docker Hub Images
☒ Run Data Volumes without a Backup Plan
☒ Manual Configuration or Conf Management
☒ Modify CoreOS Outside of Cloud Init
☒ Execute Multiple Processes per Container
☒ Expose Lots of Public Ports
Docker Madness
Ehh?? What am I looking at?68ce1cebbf07 741583d7dbd1 "/usr/sbin/apache2ct 10 days ago Up 10
days 80/tcp tp_web-2
3f26d14fe567 0eeeca18f709 "/bin/bash /sync.sh 10 days ago Up 10
days tp_web_backups
a77bcb74d75c 741583d7dbd1 "/usr/sbin/apache2ct 10 days ago Up 10
days 80/tcp tp_web-1
98f15fac74ca 0eeeca18f709 "/bin/bash /sync.sh 10 days ago Up 10
days tp_mysql_backups
8019d38dd49b cloudposse/library:btsync ""/bin/sh -c '/usr/ 10 days ago Up 10
days 44444/tcp tp_btsync
652e815800d7 cloudposse/library:mysql "/entrypoint.sh mysq 10 days ago Up 10
days 3306/tcp tp_mysql
21a18d390135 0eeeca18f709 "/bin/bash /sync.sh 10 days ago Up 10
days vps_akira_backups
751f682f9606 1c3ff222069c "/bin/sh -c 'bootstr 10 days ago Up 10
days 0.0.0.0:30000->22/tcp vps_osterman
3da29f6eda58 1c3ff222069c "/bin/sh -c 'bootstr 10 days ago Up 10
days 0.0.0.0:30002->22/tcp vps_akira
02c
Fleet-ing Commands
WTF Fleet is Not much better…
osterman_web@1.service 3ea56e45.../167.114.0.38 active
running
osterman_web@2.service 3ea56e45.../167.114.0.38 active
running
osterman_web_announce.service 3ea56e45.../167.114.0.38 active
exited
osterman_web_backups.service 3ea56e45.../167.114.0.38 inactive dead
registrator_skydns.service 3ea56e45.../167.114.0.38 active
running
tp_btsync.service 3ea56e45.../167.114.0.38 active
running
tp_mysql.service 3ea56e45.../167.114.0.38 active
running
tp_web@1.service 3ea56e45.../167.114.0.38 active
running
tp_web@2.service 3ea56e45.../167.114.0.38 active
running
vps_akira.service 3ea56e45.../167.114.0.38 active
running
vps_akira_backups.service 3ea56e45.../167.114.0.38 active
running
Sample Apache Systemd Unit File
[Unit]
Description=Apache Web Server
After=docker.service
Requires=docker.service
[Service]
User=core
EnvironmentFile=/etc/environment
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill ib_web-1
ExecStartPre=-/usr/bin/docker rm ib_web-1
ExecStartPre=/usr/bin/docker --debug=true pull 
registry.hub.docker.com/cloudposse/library:apache-php
(Continued)
ExecStart=/usr/bin/docker run --name ib_web-1 
--rm 
--dns=${COREOS_PRIVATE_IPV4} 
--dns-search=ib.cloudposse.local 
--volume /media/sdb/ib_web:/var/www/html 
-e "DB_USER=wordpress" 
-e "DB_PASS=XXXXXXXX" 
-e "DB_HOST=web.mysql.ib.cloudposse.local" 
-e "DB_NAME=wordpress" 
-e "SERVICE_NAME=ib/web" 
-e "SERVICE_ID=1" 
registry.hub.docker.com/cloudposse/library:apache-php
ExecStop=-/usr/bin/docker kill ib_web-1
ExecStop=-/usr/bin/docker rm ib_web-1
The Missing Pieces
♟Fleet Orchestration
♟Systemd Unit Templates
♟Basic Building Blocks
♟Naming Conventions
♟Introspection
♟Overlay Networking
Low and behold!
THE OPPORTUNITY
What if I told you….
There was a way you could quickly spin up
docker containers for everything, running
coreos in the cloud or bare metal, with
multiple environments or stages, using
simple commands on your laptop
it would just work? =)
Well….
YOU CAN
Entertain...
THE POSSIBILITY
The Blue Print
● Ensemble Services Distribution
✓ 60+ Essential Services (e.g nginx, varnish, mysql)
✓ HTTP Router with Vulcand
✓ RFC1918 Overlay Network
✓ Service Composition, Orchestration
✓ Library Unit Templates, Images
✓ DNS Based Service Discovery & Registration
✓ Logging to PaperTrail, DataDogHQ, LogEntries
✓ Remote VPN Access
✓ Backups & BitTorrent Data Replication
Ensemble Command Line
Usage: bin/ensemble options [action] [service] [unit]
Some of the Supported actions:
build Compile the m4 templates for each service
commit Execute "git commit" modified units for each service
push Execute "git push" to master committed units for each service
kickstart Shortcut for stop+destroy+start specified units
restart Shortcut for stop+start specified units
view Display the current unit definition
template Display the template definition
status Display status of all units in cluster
stats Display realtime performance metrics of specified units in cluster
journal Stream stdout logs for specified unit from each server in the cluster
shell Attach to the container and execute a shell (/bin/bash)
Actions can be combined using +
Command Line Examples
# Build all configurations for all services
ensemble --config deployment.yml build
# Build and deploy only the “ib” service
ensemble --config deployment.yml build+kickstart ib
# Give me the operating status of the “ib” service
ensemble --config deployment.yml status ib
# Open up a shell inside the web container
ensemble --config deployment.yml shell ib web@1
# Display real-time memory and network utilization of the “ib” service
ensemble --config deployment.yml stats ib
# Commit changed configurations and push them to master
ensemble --config deployment.yml commit+push ib
Tons of Ready Made Templates
datadog.service.m4, logentries.service.m4, logspout.service.m4,
boundary_agent.service.m4, newrelic_sysmond.service.m4,
nodejs.service.m4, apache.service.m4, openvpn.service.m4,
docker_registry.service.m4 duplicity.service.m4,
haproxy_with_discover.service.m4, os_swap.service.m4
jenkins_master.service.m4, jenkins_swarm.service.m4,
kiwiirc.service.m4, memcache.service.m4, skydns.service.m4
mysqldump.service.m4, mysql_galera.service.m4, generic.timer.m4,
mysql_galera_cluster.service.m4, mysql_galera_garbd.service.m4,
mysql_galera_lb.service.m4, mysql_server.service.m4,
btsync.service.m4, postfix.service.m4, redis.service.m4,
registrator.service.m4, vps.service.m4, vulcand.service.m4,
os_mount.service.m4
Ensemble Configuration (YAML)
fleet_tunnel: "cluster.cloudposse.local" # Cluster to administer
fleet_ssh_timeout: 20 # How long to wait before giving up
template_path: "~/Dev/ensemble/units" # Where to find the templates
template_engine: "m4" # How to rewrite the templates
target_path: "~/Dev/cluster-configs/units" # Where to send the rendered units
globals: # Global variables can be used anywhere in the YAML
config
cluster_name: "cluster-1" # Sample definition
container_storage: "@(mount_dir)/sdb" # Where we’ll store persistent data (it will be backed
up!)
mount_dir: "/media" # Mount point on CoreOS for persistent storage
services: # Services are composed of a collection of units
- include: "services/core.yml" # CoreOS extensions deployed via units
- include: "services/jenkins.yml" # Jenkins CI with Jenkins Swarm
- include: "services/osterman.yml" # My own website and virtuals
- include: "services/tp.yml" # TP Deployment
- include: "services/isc_staging.yml" # Staging environment for ISC
- include: "services/isc_prod.yml" # Production environemnt for ISC
Pretty Service Configurations
# Osterman Associates
name: "osterman" # The name of this service
globals: # Local service globals # Set/Override New Globals
mysql_user: "wordpress"
mysql_pass: "XXXXXXXXXX"
mysql_host: "mysql.@(service).@(local_domain)"
mysql_port: 3306
mysql_database: "wordpress"
mysql_root_pass: "XXXXXXXXXXXXXX"
mysql_backups_volume: "@(container_storage)/@(service)_mysqldump:/backups"
mysql_volume: "@(container_storage)/@(service)_mysql:/var/lib/mysql"
web_volume: "@(container_storage)/@(service)_web:/var/www/hosts"
Minimal Unit Configurations
# Database instance for wordpress
- name: "mysql" # Name of this unit
template: "mysql_server.service.m4"
type: "service"
define:
"DOCKER_VOLUME": "@(mysql_volume)"
"DOCKER_IMAGE": "@(docker_registry)/cloudposse/library:mysql"
"MYSQL_USER": "@(mysql_user)"
"MYSQL_PASS": "@(mysql_pass)"
"MYSQL_HOST": "@(mysql_host)"
"MYSQL_DATABASE": "@(mysql_database)"
Clustering Made Easy
# Apache web service for wordpress multisite
- name: "web@%i"
template: "apache.service.m4"
type: "service"
instances: 5
# Define all the virtual hosts referencing another definition
- name: "vhost@www.osterman.com"
from: "vhost@%i"
- name: "vhost@osterman.com"
from: "vhost@%i"
Screencast
● Overview
● Sample Configurations (YAML, m4)
● Demonstration of COOL Commands
● Data Dog, Paper Trail, Boundary
BAM! That’s all I got...
Ask Erik Osterman
erik@cloudposse.com
(415) 535-8615

More Related Content

What's hot

Docker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingDocker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingOpen Source Consulting
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStackPuppet
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyPuppet
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network TroubleshootingOpen Source Consulting
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for DummiesŁukasz Proszek
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackke4qqq
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using dockerLarry Cai
 
MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & clusterelliando dias
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOpenStack Foundation
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班Philip Zheng
 
MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerGiuseppe Maxia
 
Open stack day 2014 havana from grizzly
Open stack day 2014 havana from grizzlyOpen stack day 2014 havana from grizzly
Open stack day 2014 havana from grizzlyChoe Cheng-Dae
 
Performance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case StudyPerformance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case Studyshane_gibson
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecMartin Etmajer
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installerGiuseppe Maxia
 
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto GarcíaOpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto GarcíaOpenNebula Project
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyMoby Project
 

What's hot (20)

Docker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingDocker on openstack by OpenSource Consulting
Docker on openstack by OpenSource Consulting
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for Dummies
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using docker
 
MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & cluster
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployer
 
Open stack day 2014 havana from grizzly
Open stack day 2014 havana from grizzlyOpen stack day 2014 havana from grizzly
Open stack day 2014 havana from grizzly
 
Deep Dive on Amazon EC2
Deep Dive on Amazon EC2Deep Dive on Amazon EC2
Deep Dive on Amazon EC2
 
Performance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case StudyPerformance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case Study
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installer
 
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto GarcíaOpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and Moby
 

Similar to An Ensemble Core with Docker - Solving a Real Pain in the PaaS

To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…Sergey Dzyuban
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...Amazon Web Services
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...Amazon Web Services
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdRichard Lister
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetesTed Jung
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architectureOpenStack Korea Community
 
Moving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventuresMoving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventuresFrits Van Der Holst
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit어형 이
 
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...WebCamp
 
Bdc from bare metal to k8s
Bdc   from bare metal to k8sBdc   from bare metal to k8s
Bdc from bare metal to k8sChris Adkin
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesJeffrey Holden
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting startedMunish Mehta
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
 
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupMetal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupLaure Vergeron
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesAmazon Web Services
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle ManagementDoKC
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle ManagementDoKC
 

Similar to An Ensemble Core with Docker - Solving a Real Pain in the PaaS (20)

To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
 
Moving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventuresMoving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventures
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit
 
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
 
Bdc from bare metal to k8s
Bdc   from bare metal to k8sBdc   from bare metal to k8s
Bdc from bare metal to k8s
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on Kubernetes
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupMetal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
 

More from Erik Osterman

Unlimited Staging Environments on Kubernetes
Unlimited Staging Environments on KubernetesUnlimited Staging Environments on Kubernetes
Unlimited Staging Environments on KubernetesErik Osterman
 
Rock Solid WordPress
Rock Solid WordPressRock Solid WordPress
Rock Solid WordPressErik Osterman
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsErik Osterman
 
Managing Secrets in Production
Managing Secrets in ProductionManaging Secrets in Production
Managing Secrets in ProductionErik Osterman
 
Docker Demystified for SB JUG
Docker Demystified for SB JUGDocker Demystified for SB JUG
Docker Demystified for SB JUGErik Osterman
 
Docker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatDocker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatErik Osterman
 
Speeding up Page Load Times by Using the Starling Queue Server
Speeding up Page Load Times by Using the Starling Queue ServerSpeeding up Page Load Times by Using the Starling Queue Server
Speeding up Page Load Times by Using the Starling Queue ServerErik Osterman
 
Speeding up Page Load Times by Using Starling
Speeding up Page Load Times by Using StarlingSpeeding up Page Load Times by Using Starling
Speeding up Page Load Times by Using StarlingErik Osterman
 
RightScale User Conference: Why RightScale?
RightScale User Conference: Why RightScale?RightScale User Conference: Why RightScale?
RightScale User Conference: Why RightScale?Erik Osterman
 

More from Erik Osterman (9)

Unlimited Staging Environments on Kubernetes
Unlimited Staging Environments on KubernetesUnlimited Staging Environments on Kubernetes
Unlimited Staging Environments on Kubernetes
 
Rock Solid WordPress
Rock Solid WordPressRock Solid WordPress
Rock Solid WordPress
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Managing Secrets in Production
Managing Secrets in ProductionManaging Secrets in Production
Managing Secrets in Production
 
Docker Demystified for SB JUG
Docker Demystified for SB JUGDocker Demystified for SB JUG
Docker Demystified for SB JUG
 
Docker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatDocker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the Fat
 
Speeding up Page Load Times by Using the Starling Queue Server
Speeding up Page Load Times by Using the Starling Queue ServerSpeeding up Page Load Times by Using the Starling Queue Server
Speeding up Page Load Times by Using the Starling Queue Server
 
Speeding up Page Load Times by Using Starling
Speeding up Page Load Times by Using StarlingSpeeding up Page Load Times by Using Starling
Speeding up Page Load Times by Using Starling
 
RightScale User Conference: Why RightScale?
RightScale User Conference: Why RightScale?RightScale User Conference: Why RightScale?
RightScale User Conference: Why RightScale?
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

An Ensemble Core with Docker - Solving a Real Pain in the PaaS

  • 1. Docker CoreOS Solving a Real Pain in the PaaS Ensemble +
  • 3. Lot’s of Tools, Few Solutions ● No Master Blueprints or Distributions ● Docker is Not Enough ● Docker Hub is a Mess ● Fleet has Obvious Limitations ● Managing Systemd Units is Cumbersome ● Logging is a Real Pain ● Data Persistence is Necessary ● Kubernetes & Mesos are Overkill *
  • 5. But You Run Fat Stacks... Redis, Memcache, Varnish, MongoDB, CouchDB, Storm, Jenkins, NodeJS, MySQL, Postgres, Apache, Nginx, Tomcat, Mongrel, Mongrel2, Sinatra, Riak, Graphite, Cassandra, Hadoop, ActiveMQ, Solr, RabbitMQ, Elastic Search, Logstash, Kibana, HAProxy, Postfix, and Graphite
  • 6. What Not To Do ☒ Manually Create Unit Files ☒ Blindly Use Docker Hub Images ☒ Run Data Volumes without a Backup Plan ☒ Manual Configuration or Conf Management ☒ Modify CoreOS Outside of Cloud Init ☒ Execute Multiple Processes per Container ☒ Expose Lots of Public Ports
  • 7. Docker Madness Ehh?? What am I looking at?68ce1cebbf07 741583d7dbd1 "/usr/sbin/apache2ct 10 days ago Up 10 days 80/tcp tp_web-2 3f26d14fe567 0eeeca18f709 "/bin/bash /sync.sh 10 days ago Up 10 days tp_web_backups a77bcb74d75c 741583d7dbd1 "/usr/sbin/apache2ct 10 days ago Up 10 days 80/tcp tp_web-1 98f15fac74ca 0eeeca18f709 "/bin/bash /sync.sh 10 days ago Up 10 days tp_mysql_backups 8019d38dd49b cloudposse/library:btsync ""/bin/sh -c '/usr/ 10 days ago Up 10 days 44444/tcp tp_btsync 652e815800d7 cloudposse/library:mysql "/entrypoint.sh mysq 10 days ago Up 10 days 3306/tcp tp_mysql 21a18d390135 0eeeca18f709 "/bin/bash /sync.sh 10 days ago Up 10 days vps_akira_backups 751f682f9606 1c3ff222069c "/bin/sh -c 'bootstr 10 days ago Up 10 days 0.0.0.0:30000->22/tcp vps_osterman 3da29f6eda58 1c3ff222069c "/bin/sh -c 'bootstr 10 days ago Up 10 days 0.0.0.0:30002->22/tcp vps_akira 02c
  • 8. Fleet-ing Commands WTF Fleet is Not much better… osterman_web@1.service 3ea56e45.../167.114.0.38 active running osterman_web@2.service 3ea56e45.../167.114.0.38 active running osterman_web_announce.service 3ea56e45.../167.114.0.38 active exited osterman_web_backups.service 3ea56e45.../167.114.0.38 inactive dead registrator_skydns.service 3ea56e45.../167.114.0.38 active running tp_btsync.service 3ea56e45.../167.114.0.38 active running tp_mysql.service 3ea56e45.../167.114.0.38 active running tp_web@1.service 3ea56e45.../167.114.0.38 active running tp_web@2.service 3ea56e45.../167.114.0.38 active running vps_akira.service 3ea56e45.../167.114.0.38 active running vps_akira_backups.service 3ea56e45.../167.114.0.38 active running
  • 9. Sample Apache Systemd Unit File [Unit] Description=Apache Web Server After=docker.service Requires=docker.service [Service] User=core EnvironmentFile=/etc/environment TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill ib_web-1 ExecStartPre=-/usr/bin/docker rm ib_web-1 ExecStartPre=/usr/bin/docker --debug=true pull registry.hub.docker.com/cloudposse/library:apache-php
  • 10. (Continued) ExecStart=/usr/bin/docker run --name ib_web-1 --rm --dns=${COREOS_PRIVATE_IPV4} --dns-search=ib.cloudposse.local --volume /media/sdb/ib_web:/var/www/html -e "DB_USER=wordpress" -e "DB_PASS=XXXXXXXX" -e "DB_HOST=web.mysql.ib.cloudposse.local" -e "DB_NAME=wordpress" -e "SERVICE_NAME=ib/web" -e "SERVICE_ID=1" registry.hub.docker.com/cloudposse/library:apache-php ExecStop=-/usr/bin/docker kill ib_web-1 ExecStop=-/usr/bin/docker rm ib_web-1
  • 11. The Missing Pieces ♟Fleet Orchestration ♟Systemd Unit Templates ♟Basic Building Blocks ♟Naming Conventions ♟Introspection ♟Overlay Networking
  • 12. Low and behold! THE OPPORTUNITY
  • 13. What if I told you…. There was a way you could quickly spin up docker containers for everything, running coreos in the cloud or bare metal, with multiple environments or stages, using simple commands on your laptop it would just work? =)
  • 16. The Blue Print ● Ensemble Services Distribution ✓ 60+ Essential Services (e.g nginx, varnish, mysql) ✓ HTTP Router with Vulcand ✓ RFC1918 Overlay Network ✓ Service Composition, Orchestration ✓ Library Unit Templates, Images ✓ DNS Based Service Discovery & Registration ✓ Logging to PaperTrail, DataDogHQ, LogEntries ✓ Remote VPN Access ✓ Backups & BitTorrent Data Replication
  • 17. Ensemble Command Line Usage: bin/ensemble options [action] [service] [unit] Some of the Supported actions: build Compile the m4 templates for each service commit Execute "git commit" modified units for each service push Execute "git push" to master committed units for each service kickstart Shortcut for stop+destroy+start specified units restart Shortcut for stop+start specified units view Display the current unit definition template Display the template definition status Display status of all units in cluster stats Display realtime performance metrics of specified units in cluster journal Stream stdout logs for specified unit from each server in the cluster shell Attach to the container and execute a shell (/bin/bash) Actions can be combined using +
  • 18. Command Line Examples # Build all configurations for all services ensemble --config deployment.yml build # Build and deploy only the “ib” service ensemble --config deployment.yml build+kickstart ib # Give me the operating status of the “ib” service ensemble --config deployment.yml status ib # Open up a shell inside the web container ensemble --config deployment.yml shell ib web@1 # Display real-time memory and network utilization of the “ib” service ensemble --config deployment.yml stats ib # Commit changed configurations and push them to master ensemble --config deployment.yml commit+push ib
  • 19. Tons of Ready Made Templates datadog.service.m4, logentries.service.m4, logspout.service.m4, boundary_agent.service.m4, newrelic_sysmond.service.m4, nodejs.service.m4, apache.service.m4, openvpn.service.m4, docker_registry.service.m4 duplicity.service.m4, haproxy_with_discover.service.m4, os_swap.service.m4 jenkins_master.service.m4, jenkins_swarm.service.m4, kiwiirc.service.m4, memcache.service.m4, skydns.service.m4 mysqldump.service.m4, mysql_galera.service.m4, generic.timer.m4, mysql_galera_cluster.service.m4, mysql_galera_garbd.service.m4, mysql_galera_lb.service.m4, mysql_server.service.m4, btsync.service.m4, postfix.service.m4, redis.service.m4, registrator.service.m4, vps.service.m4, vulcand.service.m4, os_mount.service.m4
  • 20. Ensemble Configuration (YAML) fleet_tunnel: "cluster.cloudposse.local" # Cluster to administer fleet_ssh_timeout: 20 # How long to wait before giving up template_path: "~/Dev/ensemble/units" # Where to find the templates template_engine: "m4" # How to rewrite the templates target_path: "~/Dev/cluster-configs/units" # Where to send the rendered units globals: # Global variables can be used anywhere in the YAML config cluster_name: "cluster-1" # Sample definition container_storage: "@(mount_dir)/sdb" # Where we’ll store persistent data (it will be backed up!) mount_dir: "/media" # Mount point on CoreOS for persistent storage services: # Services are composed of a collection of units - include: "services/core.yml" # CoreOS extensions deployed via units - include: "services/jenkins.yml" # Jenkins CI with Jenkins Swarm - include: "services/osterman.yml" # My own website and virtuals - include: "services/tp.yml" # TP Deployment - include: "services/isc_staging.yml" # Staging environment for ISC - include: "services/isc_prod.yml" # Production environemnt for ISC
  • 21. Pretty Service Configurations # Osterman Associates name: "osterman" # The name of this service globals: # Local service globals # Set/Override New Globals mysql_user: "wordpress" mysql_pass: "XXXXXXXXXX" mysql_host: "mysql.@(service).@(local_domain)" mysql_port: 3306 mysql_database: "wordpress" mysql_root_pass: "XXXXXXXXXXXXXX" mysql_backups_volume: "@(container_storage)/@(service)_mysqldump:/backups" mysql_volume: "@(container_storage)/@(service)_mysql:/var/lib/mysql" web_volume: "@(container_storage)/@(service)_web:/var/www/hosts"
  • 22. Minimal Unit Configurations # Database instance for wordpress - name: "mysql" # Name of this unit template: "mysql_server.service.m4" type: "service" define: "DOCKER_VOLUME": "@(mysql_volume)" "DOCKER_IMAGE": "@(docker_registry)/cloudposse/library:mysql" "MYSQL_USER": "@(mysql_user)" "MYSQL_PASS": "@(mysql_pass)" "MYSQL_HOST": "@(mysql_host)" "MYSQL_DATABASE": "@(mysql_database)"
  • 23. Clustering Made Easy # Apache web service for wordpress multisite - name: "web@%i" template: "apache.service.m4" type: "service" instances: 5 # Define all the virtual hosts referencing another definition - name: "vhost@www.osterman.com" from: "vhost@%i" - name: "vhost@osterman.com" from: "vhost@%i"
  • 24. Screencast ● Overview ● Sample Configurations (YAML, m4) ● Demonstration of COOL Commands ● Data Dog, Paper Trail, Boundary
  • 25. BAM! That’s all I got... Ask Erik Osterman erik@cloudposse.com (415) 535-8615

Editor's Notes

  1. My objective objective is to convince you that running Docker on CoreOS is a real possibility, but it requires some extra tooling First I will cover about 20 slides to go over the problem and some details I assume that you’ve played with docker a little bit and know what CoreOS provides. I will cover what I have built and how it solves the problems The solution is simple, does not require any extra services to run and is built on top of existing tools
  2. The problem is that all these tools have sprung up and it’s not clear how to use them together. We’re in the early days of the wild-wild-west as it relates to docker. What we’re really doing is observing a transformation in how services are shipped. Before there were distributions like Redhat or Ubuntu, there were no good ways to make software work together. Just like there used to be no good way to make software work together on the same OS, now there is no good way to make services work together on the same cloud.
  3. By overkill, I mean overkill for smaller deployments and add a level of complexity not necessary.
  4. Services need to be aware of each other. Even a simple blog has multiple moving pieces. They need a way to do service discovery. Many ways of doing it. Dynamic DNS is one easy way.
  5. If only things were that easy. LAMP is dead. Long live the LAMP stack. Open Source has exploded & that’s a good thing. But now we gotta find out how to get this new fangled stack to run that defies abbreviation. Today we have to worry about getting all these components to play nicely with each other.
  6. Exposing ports is evil. They are a scarce commodity. There should only be 2 ports exposed - 80 and 443. I hate it when I see a charming image only to disappoint me by bundling supervisor and voiding the one-process-per-container model. This masks any underlying problems Prevents systemd from using the rules that it’s been configured to work with
  7. No good way to see what is running. Lots of commands but not stitched together. Docker shows you all the services that are running. This is unmanageable when you have hundreds or thousands of services. Docker won’t ensure your services are always running It’s hard to visualize how services are composed and related to each other. There needs to be a way to look just at how one group of services is performing You can link containers together, but right now that doesn’t work across hosts.
  8. It helps us schedule services ala systemd, but there a lot of gotchas You can’t easily tell if you forgot to start a service You can’t see if a service has been orphaned Order matters - You have to remember the order in which to start services or you reach a dead lock. Try doing that with hundreds of services. You can’t easily restart services when making changes to unit files without running a half dozen commands. You can’t easily tell at a glance what is failed vs dead You cannot drop to shell inside of a container to inspect what’s going on Does not handle journaling of global services
  9. Units require a lot of configuration Everything highlighted might need to change between different stages or environments. Leaves a lot of room for error. There’s a lot of redundancy Unit files are easily resuable for different images. It doesn’t make sense to hardcode the docker image. Docker names need to be unique.
  10. These are the missing pieces needed to tie everything together. Fleet only does scheduling. Scheduling is handled by systemd. Something needs to handle orchestration and the composition of microservices Docker as it stands today, is only really good at running containers not managing relationships between containers..
  11. Can’t there be a way to stitch all the tools available today to get a working containerized environment without going overkill with Apache Mesos and Kubernetes?
  12. ...all this without sacrificing good architecture & design. All this without having to invest all the time and effort to get the pieces to play together. That would be pretty cool, right? Keep it simple, stupid.
  13. Here are just some of the things I want to call out that it supports. Convention over configuration by design; seek to decrease the number of decisions that you need to make, gaining simplicity, but not necessarily losing flexibility due to it’s empirical design.
  14. I am now going to go over what can be done. I’m might brush over it a little bit quickly because I want to get to the demo. Everything in green are awesome extensions that implement original functionality. Where applicable, they are cluster-aware.
  15. Templates define imperative configurations.
  16. DNS Search also supported. So it could just say “mysql” and it will search the local domain
  17. Order matters! Just define the units in the order they need to be instantiated and it will respected
  18. Just specify how many of them you want to create.
  19. ping vpn.central.cloudposse.local ensemble --config ~/Dev/cluster-configs/deployment.yml build ensemble --config ~/Dev/cluster-configs/deployment.yml build ib ensemble --config ~/Dev/cluster-configs/deployment.yml build ib web_mysql ensemble --config ~/Dev/cluster-configs/deployment.yml status ib ensemble --config ~/Dev/cluster-configs/deployment.yml stats ib