@@ -17,65 +17,82 @@ get started with datatracker development.
1717Steps
1818=====
1919
20- 1. Set up Docker on your preferred platform. ` Official installers `_
20+ 1. Set up Docker on your preferred platform. Official installers
2121 exist for many Linux flavours, OS X, Windows and Cloud services.
2222
2323 Docker containers require the services of an underlying Linux API,
2424 which means that on OS X and Windows, these have to be provided
2525 by a virtual machine which runs a minimal Linux image. The virtual
26- machine used is VirtualBox _, and the official installer provides an
27- image named Docker Machine.
26+ machine used is commonly VirtualBox, although at least one
27+ unofficial VM image and controller (boot2docker _) also supports
28+ Parallels, XenServer and VMWare.
2829
29- Another option is boot2docker _, which is deprecated as of end 2015,
30- but has worked well for me, something I unfortunately cannot say for
31- the Docker Machine as of November 2015. It seems to me as if boot2docker
32- has been deprecated before the Docker Machine was quite ready for
33- prime time.
30+ The primary installers available is the unofficial boot2docker _ and
31+ the official `Docker Engine `_. I've tried both, and at this time,
32+ November 2015, boot2docker has worked much better for me than
33+ Docker Engine. YMMV.
3434
35- 2. Check out your datatracker branch in a suitable directory. We'll
36- assume ``~/src/dt/ `` here, and assume you are ``coder ``::
35+ Boot2docker can self-upgrade and provides up-to-date docker server
36+ and clients. Run update after you install::
37+
38+ ~ $ boot2docker upgrade
39+
40+ 2. Check out your datatracker branch as usual, in a suitable directory.
41+ We'll assume ``~/src/dt/ `` here, and assume you are ``'coder' ``::
3742
3843 ~/src/dt/ $ svn co https://svn.tools.ietf.org/svn/tools/ietfdb/personal/coder/6.8.2.dev0
3944
40- 3. In the checked out working copy, you'll find a ``data/ `` directory
45+ 3. In the checked- out working copy, you'll find a ``data/ `` directory
4146 at the top level. Fetch down a pre-built copy of the datatracker
42- database, place it in this directory and unpack it::
47+ database, place it in this directory, unpack it, and fix permissions ::
4348
4449 ~/src/dt/6.8.2.dev0/data/ $ wget https://www.ietf.org/lib/dt/sprint/ietf_utf8.bin.tar.bz2 .
4550 ~/src/dt/6.8.2.dev0/data/ $ tar xjf ietf_utf8.bin.tar.bz2
51+ ~/src/dt/6.8.2.dev0/data/ $ chmod -R go+rwX mysql
4652
47- 4. In the checked out working copy, you'll also find a ``docker/ ``
53+ 4. In the checked- out working copy, you'll also find a ``docker/ ``
4854 directory at the top level. It contains a Dockerfile which can
49- be used to build a docker image, but we will be using a prebuilt
50- image::
55+ be used to build a docker image, but that doesn't concern us at
56+ the moment. We will be using a wrapper script, ``'run' ``, to
57+ run a pre-built docker image fetched from the docker hub::
5158
5259 ~/src/dt/6.8.2.dev0/docker/ $ ./run
5360
5461 This will pull down the latest docker datatracker image, start it
5562 up with appropriate settings, map the internal ``/var/lib/mysql/ ``
56- directory to the ``data/mysql/ `` directory we placed the database
57- in, set up a python virtualenv for you, install some dependencies,
58- and drop you in a bash shell.
63+ directory to the external ``data/mysql/ `` directory where we placed
64+ the database, set up a python virtualenv for you, install some
65+ dependencies, and drop you in a bash shell where you can run the
66+ datatracker.
67+
68+ 5. Make sure that all requirements are installed::
69+
70+ (virtual) $ cd ~/src/dt/6.8.2.dev0
71+ (virtual) $ pip install -r requirements.txt
5972
60- 5 . You are now free to run the tests ** in the virtual environment ** ::
73+ 6 . You are now ready to run the tests::
6174
62- (datatracker ) $ ietf/manage.py test --settings=settings_sqlitetest
75+ (virtual ) $ ietf/manage.py test --settings=settings_sqlitetest
6376
6477 and then start the dev server::
6578
66- (datatracker ) $ ietf/manage.py runserver 0.0.0.0:8000
79+ (virtual ) $ ietf/manage.py runserver 0.0.0.0:8000
6780
68- Note the IP address ``0.0.0.0`` used to make the dev server bind to all
69- addresses. The internal port 8000 has been mapped to port 8000 externally,
70- too, by the ``run`` command. In order to find the IP address of the
71- VirtualBox, run ``$ boot2docker ip`` or equivalent::
81+ Note the IP address ``0.0.0.0`` used to make the dev server bind
82+ to all addresses. The internal port 8000 has been mapped to port
83+ 8000 externally, too. In order to find the IP address of the
84+ VirtualBox, run ``'$ boot2docker ip'`` or equivalent *outside* the
85+ virtual environment::
7286
7387 ~/src/dt/6.8.2.dev0/ $ boot2docker ip
7488 192.168.59.103
75-
76- ~/src/dt/6.8.2.dev0/ $ open -a Safari http://192.168.59.103:8000/
89+
90+ ~/src/dt/6.8.2.dev0/ $ open http://192.168.59.103:8000/
91+
7792
7893.. _Docker : https://www.docker.com/
79- .. _`Official installers ` : https://docs.docker.com/engine/installation/
94+ .. _`Docker Engine ` : https://docs.docker.com/engine/installation/
8095.. _boot2docker : http://boot2docker.io/
8196.. _VirtualBox : https://www.virtualbox.org/
97+
98+
0 commit comments