Skip to content

Commit d21706b

Browse files
committed
chore(docs): use Docker Toolbox, not boot2docker
Issue #4266 notes how boot2docker is now deprecated. This commit changes documentation and Makefile notices to recommend using Docker Toolbox and Docker Machine instead.
1 parent e2c0689 commit d21706b

4 files changed

Lines changed: 32 additions & 46 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ all: build run
1919
dev-registry: check-docker
2020
@docker inspect registry >/dev/null 2>&1 && docker start registry || docker run --restart="always" -d -p 5000:5000 --name registry registry:0.9.1
2121
@echo
22-
@echo "To use local boot2docker registry for Deis development:"
23-
@echo " export DEV_REGISTRY=`boot2docker ip 2>/dev/null`:5000"
22+
@echo "To use a local registry for Deis development:"
23+
@echo " export DEV_REGISTRY=`docker-machine ip $$(docker-machine active) 2>/dev/null`:5000"
2424

2525
dev-cluster: discovery-url
2626
vagrant up

controller/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ postgres:
5656
docker start postgres || docker run --restart="always" -d -p 5432:5432 --name postgres postgres:9.4.1
5757
docker exec postgres createdb -U postgres deis 2>/dev/null || true
5858
@echo "To use postgres for local development:"
59-
@echo " export PGHOST=`boot2docker ip 2>/dev/null || echo 127.0.0.1`"
59+
@echo " export PGHOST=`docker-machine ip $$(docker-machine active) 2>/dev/null || echo 127.0.0.1`"
6060
@echo " export PGPORT=5432"
6161
@echo " export PGUSER=postgres"
6262

docs/contributing/hacking.rst

Lines changed: 25 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Deis environment, this document covers a specific setup:
1212

1313
- Developing on **Mac OSX** or **Linux**
1414
- Managing virtualization with **Vagrant/Virtualbox**
15-
- Hosting a docker registry with **Boot2Docker** (Mac)
15+
- Hosting a docker registry with **docker-machine** (Mac)
1616

1717
We try to make it simple to hack on Deis. However, there are necessarily several moving
1818
pieces and some setup required. We welcome any suggestions for automating or simplifying
@@ -39,7 +39,7 @@ At a glance, you will need:
3939
- VirtualBox latest
4040
- Vagrant 1.5 or later
4141
- On Mac, you will also want
42-
- Boot2Docker
42+
- Docker Machine (http://docs.docker.com/machine/install-machine/)
4343

4444
In most cases, you should simply install according to the instructions. There
4545
are a few special cases, though. We cover these below.
@@ -72,49 +72,40 @@ It is also straightforward to build Go from source:
7272
Once you can compile to ``linux/amd64``, you should be able to compile Deis'
7373
components as normal.
7474

75-
Configuring Boot2Docker (Mac)
76-
`````````````````````````````
75+
Configuring Docker Machine (Mac)
76+
````````````````````````````````
7777

7878
Deis needs a Docker registry running independently of the Deis cluster. On
79-
OS X, you will need to run this docker registry inside of Boot2Docker (http://boot2docker.io).
79+
OS X, you will need Docker Machine (http://docs.docker.com/machine/install-machine/)
80+
to run the registry inside of a VirtualBox image.
8081

81-
Install Boot2Docker according to the normal installation instructions. When you
82-
run ``init``, we highly recommend allocating a large disk, since the Docker
83-
registry that will live there is fairly large.
84-
85-
.. code-block:: console
86-
87-
$ boot2docker init --disksize=100000
88-
89-
That will create virtual disk that can eventually take up a full 100,000MB of
90-
disk space. Then start up Boot2Docker.
91-
92-
Once you have run ``boot2docker up``, you should be able to connect to it. You
93-
need to make a minor editor to the boot2docker config:
94-
95-
.. code-block:: console
82+
.. note::
9683

97-
$ boot2docker ip
98-
192.168.59.103
99-
$ boot2docker ssh sudo vi /var/lib/boot2docker/profile
84+
Previously, Deis used boot2docker to run the registry. However, Docker has
85+
deprecated boot2docker in favor of Docker Machine.
10086

101-
Inside of the profile, you need to add one line, making sure to set the IP
102-
address to whatever ``boot2docker ip`` printed.
87+
Install Docker Machine according to the normal installation instructions. Then
88+
create a new image for hosting your Deis Docker registry:
10389

10490
.. code-block:: console
10591
106-
EXTRA_ARGS="--insecure-registry 192.168.59.103:5000"
92+
$ docker-machine create --driver virtualbox --virtualbox-disk-size=100000 \
93+
--engine-insecure-registry=192.168.0.0/16 deis-registry
10794
108-
Once that line has been added, you can either restart boot2docker's docker
109-
server, or you can restart boot2docker. We recommend the latter.
95+
This will create a new virtual machine named `deis-registry` that will take
96+
up as much as 100,000 MB of disk space. Registries tend to be large, so
97+
allocating a big disk is a good idea.
11098

111-
.. code-block:: console
99+
.. note::
112100

113-
$ boot2docker halt
114-
$ boot2docker up
101+
Because the registry that we create will not have a valid SSL certificate,
102+
we run the local registry as an insecure (HTTP, not HTTPS) registry. Each
103+
time Docker Machine reboots, the registry will get a new IP address
104+
somewhere in the 192.168.0.0/16 range. We must declare that explicitly when
105+
configuring Docker Machine.
115106

116-
At this point, Boot2Docker can now serve as a registry for Deis' Docker images.
117-
Later on we will return to this.
107+
At this point, our `deis-registry` VM can now serve as a registry for Deis'
108+
Docker images. Later we will return to this.
118109

119110
Fork the Deis Repository
120111
------------------------
@@ -303,7 +294,7 @@ Configure a Docker Registry
303294
The development workflow requires Docker Registry set at the ``DEV_REGISTRY``
304295
environment variable. If you're developing locally you can use the ``dev-registry``
305296
target to spin up a quick, disposable registry inside a Docker container.
306-
The target ``dev-registry`` prints the registry's address and port when using ``boot2docker``;
297+
The target ``dev-registry`` prints the registry's address and port when using ``docker-machine``;
307298
otherwise, use your host's IP address as returned by ``ifconfig`` with port 5000 for ``DEV_REGISTRY``.
308299

309300
.. code-block:: console
@@ -315,11 +306,6 @@ otherwise, use your host's IP address as returned by ``ifconfig`` with port 5000
315306
316307
It is important that you export the ``DEV_REGISTRY`` variable as instructed.
317308

318-
.. note::
319-
320-
If you are using Boot2Docker, make sure you set the ``EXTRA_ARGS`` as
321-
explained in the prerequisites. Otherwise your registry will not work.
322-
323309
If you are developing elsewhere, you must set up a registry yourself.
324310
Make sure it meets the following requirements:
325311

docs/contributing/testing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ binary artifacts--just as a real-world provisioning of Deis pulls images from
4646
the Docker Hub.
4747

4848
If you don't have a Docker registry already accessible for your testing or for
49-
continuous deployment, start one locally:
49+
continuous deployment, start one locally.
5050

5151
.. code-block:: console
5252
5353
$ make dev-registry
5454
registry
5555
56-
To use local boot2docker registry for Deis development:
56+
To use local registry for Deis development:
5757
export DEV_REGISTRY=192.168.59.103:5000
5858
5959
.. important::
@@ -149,7 +149,7 @@ The file ``tests/bin/test-setup.sh`` is the best reference to environment
149149
variables that can affect the tests' behavior. Here are some important ones:
150150

151151
- ``HOST_IPADDR`` - address on which Docker containers can communicate for the
152-
functional tests, probably the host's IP or the one assigned to boot2docker_.
152+
functional tests, probably the host's IP or the one assigned to `Docker Machine`_.
153153
- ``DEIS_TEST_APP`` - name of the `Deis example app`_ to use, which is cloned
154154
from GitHub (default: ``example-go``)
155155
- ``DEIS_TEST_AUTH_KEY`` - SSH key used to register with the Deis controller
@@ -164,7 +164,7 @@ variables that can affect the tests' behavior. Here are some important ones:
164164
.. _`functional tests`: http://en.wikipedia.org/wiki/Functional_testing
165165
.. _`integration tests`: http://en.wikipedia.org/wiki/Integration_testing
166166
.. _`continuous integration`: http://en.wikipedia.org/wiki/Continuous_integration
167-
.. _boot2docker: http://boot2docker.io/
167+
.. _`Docker Machine`: http://docs.docker.com/machine/install-machine/
168168
.. _`source code`: https://github.com/deis/deis
169169
.. _`Docker registry`: https://github.com/docker/docker-registry
170170
.. _`Deis example app`: https://github.com/deis?query=example-

0 commit comments

Comments
 (0)