Skip to content

Commit 9f23e4c

Browse files
committed
DOC-047: More container documentation.
1 parent f2674a5 commit 9f23e4c

File tree

1 file changed

+38
-18
lines changed

1 file changed

+38
-18
lines changed

docs/developer-notes.rst

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ http://docs.ansible.com/ansible/.
1111

1212
.. _dev-build-process:
1313

14+
Build and Run
15+
-------------
16+
1417
The Build and Run Processes for Virtual Machines
15-
------------------------------------------------
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1619

1720
This graph shows the operations involved in the build and run processes for
1821
:term:`virtual machine`\s.
@@ -38,29 +41,45 @@ break down the build process:
3841
administrators to atlas.hashicorp.com, where they become available to all
3942
Vagrant users.
4043

44+
The Build and Run Processes for Containers
45+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46+
47+
In the same way, this graph shows the operations involved in the build and run
48+
processes for :term:`container`\s.
49+
50+
.. image:: images/container_graph.png
51+
52+
Again the process of creating and running a container as a user is as simple as
53+
following the instructions in :ref:`getting-started-user`. The build process is
54+
also similar; a container template (:term:`image`) is downloaded, a container
55+
is created and provisioned, and the container is packaged as an image for
56+
download by all Docker users. The key difference is that Docker pushes the
57+
image to https://hub.docker.com/ as opposed to Vagrant.
58+
59+
Details
60+
~~~~~~~
61+
4162
The build (make) process in step 3 in :ref:`getting-started-poweruser` allowed
4263
us to create a virtual environment. The Makefile in the software repository can
4364
build multiple targets. Each target runs Ansible on the ``master.yml``
44-
playbook, which in turn runs the ``create_vm`` role in the roles
45-
directory. This creates a virtual machine and provisions it with the playbook
46-
passed as a command-line argument in ``Makefile``, which lives in the jobs
47-
directory. It will also do some post-provisioning tasks using the hookbook,
48-
again passed as a command-line argument. The fundamental difference between the
49-
playbook and the hookbook is that the playbook is run on the guest virtual
50-
machine by :term:`Vagrant`, and the hookbook is run on the host
51-
machine. Different Makefile targets may place different build artefacts in the
52-
artefacts directory.
65+
playbook, which in turn runs the ``create_vm`` or ``create_container`` role in
66+
the roles directory. This creates a virtual machine or container and provisions
67+
it with the playbook passed as a command-line argument in ``Makefile``, which
68+
lives in the jobs directory. It will also do some post-provisioning tasks using
69+
the hookbook, again passed as a command-line argument. The fundamental
70+
difference between the playbook and the hookbook is that the playbook is run on
71+
the guest virtual machine by :term:`Vagrant`, and the hookbook is run on the
72+
host machine. Different Makefile targets may place different build artefacts in
73+
the artefacts directory.
5374

5475
Roles add or configure software, playbooks describe the roles that must be
5576
enacted to provision the machine, hookbooks describe what to do with that
5677
machine (like creating a :term:`box file`), and jobs are Makefile targets that
57-
produce certain machines.
58-
59-
To add a new environment, one needs to add a job that follows the pattern of
60-
existing jobs.
78+
produce certain machines. To add a new environment, one needs to add a job that
79+
follows the pattern of existing jobs.
6180

6281
Where Things Are
63-
----------------
82+
~~~~~~~~~~~~~~~~
6483

6584
In order to add jobs, one should edit ``Makefile``. In order to do that, one
6685
would need to know where things are, hence the purpose of this section. The
@@ -249,9 +268,10 @@ Summary and Final Words
249268
To summarise, :term:`virtual environment`\s are created from an empty Ubuntu
250269
virtual machine after being provisioned and packaged. This build process allows
251270
the user to create a Virtual Micromagnetics :term:`virtual machine` using
252-
Vagrant and VirtualBox. We have also presented how a new environment can be
253-
created, how the software of that environment can be controlled, and how the
254-
virtual machines can be parameterised.
271+
Vagrant and VirtualBox. A similar approach is used to create :term:`image`\s
272+
for :term:`Docker` :term:`containers`\. We have also presented how a new
273+
environment can be created, how the software of that environment can be
274+
controlled, and how the virtual machines can be parameterised.
255275

256276
Thank you for using Virtual Micromagnetics! If you create roles for your
257277
favourite software, consider sharing them with the community. You can create a

0 commit comments

Comments
 (0)