aboutsummaryrefslogtreecommitdiff
path: root/docs/image-building.rst
blob: c118fef99ceabde654abc36d5bfe4386c44a4395 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Image building
==============

The ``tools/build.py`` script in this repository is
responsible for building docker images. 

Guide
-----

In general, you will build images like this:

::

    $ tools/build.py

By default, the above command would build all images based on centos image.

If you want to change the base distro image, add ``-b``:

::

    $ tools/build.py -b ubuntu

There are following distros available for building images:

- fedora
- centos
- oraclelinux
- ubuntu

To push the image after building, add ``--push``:

::

    $ tools/build.py --push


If you want to build only keystone image, use the following command:

::

    $ tools/build.py keystone


If you want to build multiple images e.g. keystone and nova, use the following command:

::

    $ tools/build.py keystone nova


``tools/build.py`` use ``kollaglue`` as default namespace. If you
want to push images to your dockerhub, change the namespace like:

::

   $ tools/build.py -n yourusername --push


Build Openstack from Source
---------------------------

When building images, there are two methods of the Openstack install.
One is ``binary``. Another is ``source``.
The ``binary`` means that Openstack will be installed from apt/yum.
And the ``source`` means that Openstack will be installed from source code.
The default method of the Openstack install is ``binary``. 
You can change it to ``source`` using the following command:

::

    tools/build.py -t source

The locations of Opentack source code are written in ``build.ini``.
Now the source type support ``url`` and ``git``. The ``build.ini`` looks like:

::

    [glance-base]
    type = url
    location = http://tarballs.openstack.org/glance/glance-master.tar.gz

    [keystone]
    type = git
    location = https://github.com/openstack/keystone
    reference = stable/kilo