aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-09-03 10:32:42 +0000
committerSam Yaple <sam@yaple.net>2015-09-03 10:37:45 +0000
commit9d3f3f28e24388316f01eb5683e73ea1f25e3d91 (patch)
treea1e89cac5376a10b614c01fe73c9f315c1e28361 /docker
parent1cbfbcc48d7c0b206f3bb33a359cbaecc8464a44 (diff)
downloadkolla-9d3f3f28e24388316f01eb5683e73ea1f25e3d91.tar.gz
kolla-9d3f3f28e24388316f01eb5683e73ea1f25e3d91.zip
Create openstack-base container
This creates and moves the dependencies for Ubuntu into a common openstack-base container. This commit shows dramatically smaller sizes for all non-openstack containers. The Openstack container remain the same size. Change-Id: I2f46420d4b9edcfddda374caddcce906fc708f6c Partially-Implements: blueprint openstack-common-container
Diffstat (limited to 'docker')
-rw-r--r--[-rwxr-xr-x]docker/base/Dockerfile.j240
-rw-r--r--docker/ceilometer/ceilometer-base/Dockerfile.j22
-rw-r--r--docker/cinder/cinder-base/Dockerfile.j22
-rw-r--r--docker/designate/designate-base/Dockerfile.j22
-rw-r--r--docker/glance/glance-base/Dockerfile.j22
-rw-r--r--docker/gnocchi/gnocchi-base/Dockerfile.j22
-rw-r--r--[-rwxr-xr-x]docker/haproxy/Dockerfile.j20
-rw-r--r--docker/heat/heat-base/Dockerfile.j22
-rw-r--r--docker/horizon/Dockerfile.j22
-rw-r--r--docker/ironic/ironic-base/Dockerfile.j22
-rw-r--r--docker/keystone/Dockerfile.j22
-rw-r--r--docker/kolla-ansible/Dockerfile.j22
-rw-r--r--docker/magnum/magnum-base/Dockerfile.j22
-rw-r--r--docker/murano/murano-base/Dockerfile.j22
-rw-r--r--docker/neutron/neutron-base/Dockerfile.j22
-rw-r--r--docker/nova/nova-base/Dockerfile.j22
-rw-r--r--docker/openstack-base/Dockerfile.j245
-rw-r--r--docker/swift/swift-base/Dockerfile.j22
-rw-r--r--docker/zaqar/Dockerfile.j22
19 files changed, 62 insertions, 55 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index a19733304..be54e9bee 100755..100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -188,51 +188,13 @@ RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get dist-upgrade -y \
- && apt-get install -y --no-install-recommends \
- curl \
- ca-certificates \
- build-essential \
- python-dev \
- libssl-dev \
- libmariadbclient-dev \
- libxslt1-dev \
- libffi-dev \
- libyaml-dev \
- pkg-config \
+ && apt-get install -y --no-install-recommends python \
&& apt-get clean \
&& sed -i "s|'purelib': '\$base/local/lib/python\$py_version_short/dist-packages',|'purelib': '\$base/lib/python\$py_version_short/dist-packages',|;s|'platlib': '\$platbase/local/lib/python\$py_version_short/dist-packages',|'platlib': '\$platbase/lib/python\$py_version_short/dist-packages',|;s|'headers': '\$base/local/include/python\$py_version_short/\$dist_name',|'headers': '\$base/include/python\$py_version_short/\$dist_name',|;s|'scripts': '\$base/local/bin',|'scripts': '\$base/bin',|;s|'data' : '\$base/local',|'data' : '\$base',|" /usr/lib/python2.7/distutils/command/install.py \
&& rm -rf /usr/lib/python2.7/site-packages \
&& ln -s dist-packages /usr/lib/python2.7/site-packages
-# Endif for base_distro ubuntu,debian
-{% endif %}
-
-{% if install_type == 'source' %}
-
-RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
- && python get-pip.py \
- && rm get-pip.py \
- && pip --no-cache-dir install \
- python-barbicanclient \
- python-ceilometerclient \
- python-congressclient \
- python-designateclient \
- python-heatclient \
- python-ironicclient \
- python-magnumclient \
- python-manilaclient \
- python-mistralclient \
- python-muranoclient \
- python-saharaclient \
- python-swiftclient \
- python-troveclient \
- python-tuskarclient \
- python-zaqarclient \
- python-openstackclient \
- MySQL-python \
- numpy
-# Endif for install_type source
{% endif %}
COPY kolla-common.sh /opt/kolla/
diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2
index 230a19ab4..376385169 100644
--- a/docker/ceilometer/ceilometer-base/Dockerfile.j2
+++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2
index 855c0c667..72879e883 100644
--- a/docker/cinder/cinder-base/Dockerfile.j2
+++ b/docker/cinder/cinder-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2
index 8f6afa925..f4894f037 100644
--- a/docker/designate/designate-base/Dockerfile.j2
+++ b/docker/designate/designate-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2
index 4fe27a4a8..80b61ec16 100644
--- a/docker/glance/glance-base/Dockerfile.j2
+++ b/docker/glance/glance-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2
index 764bd7e86..e2de1b579 100644
--- a/docker/gnocchi/gnocchi-base/Dockerfile.j2
+++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/haproxy/Dockerfile.j2 b/docker/haproxy/Dockerfile.j2
index 2858f436a..2858f436a 100755..100644
--- a/docker/haproxy/Dockerfile.j2
+++ b/docker/haproxy/Dockerfile.j2
diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2
index 7f210a503..4accc807e 100644
--- a/docker/heat/heat-base/Dockerfile.j2
+++ b/docker/heat/heat-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2
index 8bf6babdd..753562407 100644
--- a/docker/horizon/Dockerfile.j2
+++ b/docker/horizon/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2
index 4de31d2b7..b49d41b57 100644
--- a/docker/ironic/ironic-base/Dockerfile.j2
+++ b/docker/ironic/ironic-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/keystone/Dockerfile.j2 b/docker/keystone/Dockerfile.j2
index e71d7dfb9..9bb316a1a 100644
--- a/docker/keystone/Dockerfile.j2
+++ b/docker/keystone/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/kolla-ansible/Dockerfile.j2 b/docker/kolla-ansible/Dockerfile.j2
index 9b84c761e..e0450ffc8 100644
--- a/docker/kolla-ansible/Dockerfile.j2
+++ b/docker/kolla-ansible/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2
index d83fa86a8..078d7027b 100644
--- a/docker/magnum/magnum-base/Dockerfile.j2
+++ b/docker/magnum/magnum-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2
index 5dc28caca..59bdc1cb7 100644
--- a/docker/murano/murano-base/Dockerfile.j2
+++ b/docker/murano/murano-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2
index 79d4ab4ea..c4dcde7ff 100644
--- a/docker/neutron/neutron-base/Dockerfile.j2
+++ b/docker/neutron/neutron-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2
index ad43bb9c4..0010cbaed 100644
--- a/docker/nova/nova-base/Dockerfile.j2
+++ b/docker/nova/nova-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2
new file mode 100644
index 000000000..1e33530f7
--- /dev/null
+++ b/docker/openstack-base/Dockerfile.j2
@@ -0,0 +1,45 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'source' %}
+ {% if base_distro in ['ubuntu', 'debian'] %}
+
+RUN apt-get install -y --no-install-recommends \
+ curl \
+ ca-certificates \
+ build-essential \
+ python-dev \
+ libssl-dev \
+ libmariadbclient-dev \
+ libxslt1-dev \
+ libffi-dev \
+ libyaml-dev \
+ pkg-config \
+ && apt-get clean
+
+ {% endif %}
+
+RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
+ && python get-pip.py \
+ && rm get-pip.py \
+ && pip --no-cache-dir install \
+ python-barbicanclient \
+ python-ceilometerclient \
+ python-congressclient \
+ python-designateclient \
+ python-heatclient \
+ python-ironicclient \
+ python-magnumclient \
+ python-manilaclient \
+ python-mistralclient \
+ python-muranoclient \
+ python-saharaclient \
+ python-swiftclient \
+ python-troveclient \
+ python-tuskarclient \
+ python-zaqarclient \
+ python-openstackclient \
+ MySQL-python \
+ numpy
+
+{% endif %}
diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2
index 7a20e2864..142f411b8 100644
--- a/docker/swift/swift-base/Dockerfile.j2
+++ b/docker/swift/swift-base/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
diff --git a/docker/zaqar/Dockerfile.j2 b/docker/zaqar/Dockerfile.j2
index 4e3a0bc52..f05ea350a 100644
--- a/docker/zaqar/Dockerfile.j2
+++ b/docker/zaqar/Dockerfile.j2
@@ -1,4 +1,4 @@
-FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}