0
Twilio San Francisco, CA

2013-11-13

Dockerizing Stashboard

Daniel Mizyrycki
daniel@docker.com
What is Stashboard?
Stashboard is Twilio's open-source status dashboard for APIs
and software services, powered by Google ...
Dockerizing Stashboard application
Downloads

* Download Docker
wget -O docker http://get.docker.io/builds/Linux/x86_64/docker-late
* Download data and docke...
Data Dockerfile
# Smallest base image, just to launch a container
from busybox
maintainer
Daniel Mizyrycki <daniel@docker....
Stashboard Dockerfile
# Base docker image
FROM ubuntu:12.04
MAINTAINER Daniel Mizyrycki <daniel@docker.com>

RUN echo 'deb...
Launch Docker
sudo docker -d &

Building containers
cd data; docker build -t data -rm .
cd stashboard; docker build -t sta...
Create dockerized data container
docker run -name stashboard-data data true

Running stateful firefox with dockerized data...
Dockerizing stashboard - Docker meetup at Twilio
Upcoming SlideShare
Loading in...5
×

Dockerizing stashboard - Docker meetup at Twilio

6,037

Published on

Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,037
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
55
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Transcript of "Dockerizing stashboard - Docker meetup at Twilio"

  1. 1. Twilio San Francisco, CA 2013-11-13 Dockerizing Stashboard Daniel Mizyrycki daniel@docker.com
  2. 2. What is Stashboard? Stashboard is Twilio's open-source status dashboard for APIs and software services, powered by Google AppEngine What is Docker? Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application.
  3. 3. Dockerizing Stashboard application
  4. 4. Downloads * Download Docker wget -O docker http://get.docker.io/builds/Linux/x86_64/docker-late * Download data and docker-status Stashboard Dockerfiles wget http://raw.github.com/dotcloud/docker/master/ contrib/desktop-integration/data/Dockerfile wget http://raw.github.com/dotcloud/docker/master/ hack/infrastructure/docker-status/Dockerfile
  5. 5. Data Dockerfile # Smallest base image, just to launch a container from busybox maintainer Daniel Mizyrycki <daniel@docker.com> # Create a regular user run echo 'sysadmin:x:1000:1000::/data:/bin/sh' >> /etc/passwd run echo 'sysadmin:x:1000:' >> /etc/group # Create directory for that user run mkdir /data run chown sysadmin.sysadmin /data # Add content to /data. This will keep sysadmin ownership run touch /data/init_volume # Create /data volume VOLUME /data
  6. 6. Stashboard Dockerfile # Base docker image FROM ubuntu:12.04 MAINTAINER Daniel Mizyrycki <daniel@docker.com> RUN echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list RUN apt-get update RUN apt-get install -y less wget bzip2 unzip python-pip ca-certificates # Install stashboard and its dependencies RUN mkdir /application; cd /application; wget -q http://googleappengine.googlecode.com/files/google_appengine_1.8.7.zip; unzip -q /application/google_appengine_1.8.7.zip; rm google_appengine_1.8.7.zip RUN cd /application; wget -q -O - http://github.com/twilio/stashboard/tarball/master | tar -zx --transform 's/[^/]*/stashboard/' # create sysadmin account RUN useradd -m -d /data sysadmin # Define default server command CMD ["/bin/sh", "-c", "/application/google_appengine/dev_appserver.py --skip_sdk_update_check --host 0.0.0.0 --port 8080 --admin_host 0.0.0.0 --datastore_path=/data/docker-status.db /application/stashboard/stashboard/app.yaml"]
  7. 7. Launch Docker sudo docker -d & Building containers cd data; docker build -t data -rm . cd stashboard; docker build -t stashboard -rm .
  8. 8. Create dockerized data container docker run -name stashboard-data data true Running stateful firefox with dockerized data container docker run -u 1000 -volumes-from stashboard-data -p 8080:8080 -p 8000:8000 stashboard Submitting status from a service curl -d message="Registry tests succeeded" -d status=up http://localhost:8080/admin/api/v1/services/registry/events
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×