• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Dockerizing stashboard - Docker meetup at Twilio
 

Dockerizing stashboard - Docker meetup at Twilio

on

  • 4,344 views

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 ...

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.

Statistics

Views

Total Views
4,344
Views on SlideShare
2,923
Embed Views
1,421

Actions

Likes
2
Downloads
40
Comments
0

3 Embeds 1,421

http://blog.docker.io 1374
http://blog.docker.com 40
http://plus.url.google.com 7

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Dockerizing stashboard - Docker meetup at Twilio Dockerizing stashboard - Docker meetup at Twilio Presentation Transcript

    • 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 AppEngine What is Docker? Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application.
    • Dockerizing Stashboard application
    • 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
    • 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
    • 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"]
    • Launch Docker sudo docker -d & Building containers cd data; docker build -t data -rm . cd stashboard; docker build -t stashboard -rm .
    • 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