Skip to content

Commit

Permalink
Make the docker tutorial work with newer Docker, and add a warning ab…
Browse files Browse the repository at this point in the history
…out not using it for deployment.
  • Loading branch information
Benoît Allard committed Nov 4, 2014
1 parent 9d4eb7b commit ef8896a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions master/contrib/Dockerfile
Expand Up @@ -31,7 +31,7 @@
# docker build -t buildbot - < Dockerfile
#
# # Run buildbot
# CONTAINER_ID=$(docker run -d buildbot)
# CONTAINER_ID=$(docker run -d -p 8010:8010 -p 22 buildbot)
#
# # Test buildbot master is listening
# wget -qO- localhost:8010
Expand All @@ -51,7 +51,7 @@
# # make your buildbot playground useful for your own projects.
#
# # Log into container (username: admin password: admin)
# ssh -p $(docker port $CONTAINER_ID 22) admin@localhost
# ssh -p $(docker port $CONTAINER_ID 22 | cut -d: -f 2) admin@localhost
#
# Base docker image
from ubuntu:12.04
Expand Down
17 changes: 11 additions & 6 deletions master/docs/tutorial/docker.rst
Expand Up @@ -4,12 +4,17 @@
First Buildbot run with Docker
==============================

.. warning::
The instruction in this document are based on an *old* Dockerfile, not complying with the state-of-the-art best practices (all components in one container, access via ssh, ...).
This is not the recommended way to deploy a buildbot farm.
However, it offers an easy way to get a first-hand experience.

Docker_ is a tool that makes building and deploying custom environments a breeze.
It uses lightweight linux containers (LXC) and performs quickly, making it a great instrument for the testing community.
The next section includes a Docker pre-flight check.
If it takes more that 3 minutes to get the 'Success' message for you, try the Buildbot pip-based :ref:`first run <getting-code-label>` instead.

.. _Docker: http://www.docker.io
.. _Docker: https://www.docker.com

Current Docker dependencies
---------------------------
Expand All @@ -27,7 +32,7 @@ Installation

.. code-block:: bash
sudo docker run -i busybox /bin/echo Success
sudo docker run -i busybox /bin/echo Success
Building and running Buildbot
-----------------------------
Expand All @@ -38,10 +43,10 @@ Building and running Buildbot
wget https://raw.github.com/buildbot/buildbot/master/master/contrib/Dockerfile
# Build the Buildbot container (it will take a few minutes to download packages)
sudo docker build -t buildbot - < Dockerfile
docker build -t buildbot - < Dockerfile
# Run buildbot
CONTAINER_ID=$(sudo docker run -d -p 127.0.0.1:8010:8010 buildbot)
CONTAINER_ID=$(docker run -d -p 8010:8010 -p 22 buildbot)
You should now be able to go to http://localhost:8010 and see a web page similar to:
Expand All @@ -59,11 +64,11 @@ Playing with your Buildbot container
------------------------------------

If you've come this far, you have a Buildbot environment that you can freely experiment with.
You can access your container using ssh (username: admin, password: admin):
You can access your container using ssh, the password is ``admin``:

.. code-block:: bash
ssh -p $(sudo docker port $CONTAINER_ID 22) admin@localhost
ssh -p $(docker port $CONTAINER_ID 22 | cut -d: -f 2) admin@localhost
You've got a taste now, but you're probably curious for more.
Expand Down

0 comments on commit ef8896a

Please sign in to comment.