aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-08-23 11:50:50 +0000
committerSam Yaple <sam@yaple.net>2015-08-24 13:34:40 +0000
commite4e4bf07ff8996ec7e47543782ab386df7f8a878 (patch)
treea6dbebdde8fef30c8c778c4ab14489a2a3b56637
parent44aa4af5f538df3a7656dbf2232e5ed882b7993b (diff)
downloadkolla-e4e4bf07ff8996ec7e47543782ab386df7f8a878.tar.gz
kolla-e4e4bf07ff8996ec7e47543782ab386df7f8a878.zip
Ironic From Source
This adds the source install for the ironic container as well as allowing Ubuntu to build it. Change-Id: Id57f9c1ec2efdbbee581be00f3eef71609b919d6 Partially-Implements: blueprint ironic-container Partially-Implements: blueprint install-from-ubuntu
-rw-r--r--build.ini5
-rw-r--r--docker_templates/ironic/ironic-base/Dockerfile.j221
2 files changed, 20 insertions, 6 deletions
diff --git a/build.ini b/build.ini
index 0330fc00e..777bd8827 100644
--- a/build.ini
+++ b/build.ini
@@ -33,6 +33,11 @@ type = url
location = http://tarballs.openstack.org/horizon/horizon-master.tar.gz
dest_filename = horizon.tar
+[ironic-base]
+type = url
+location = http://tarballs.openstack.org/ironic/ironic-master.tar.gz
+dest_filename = ironic.tar
+
[keystone]
type = url
location = http://tarballs.openstack.org/keystone/keystone-master.tar.gz
diff --git a/docker_templates/ironic/ironic-base/Dockerfile.j2 b/docker_templates/ironic/ironic-base/Dockerfile.j2
index 02e00f409..1e3361d47 100644
--- a/docker_templates/ironic/ironic-base/Dockerfile.j2
+++ b/docker_templates/ironic/ironic-base/Dockerfile.j2
@@ -8,10 +8,10 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
# api: policy
# conductor:MySQL-python
RUN yum -y install \
- python-oslo-log \
- python-oslo-concurrency \
- python-oslo-policy \
- MySQL-python \
+ python-oslo-log \
+ python-oslo-concurrency \
+ python-oslo-policy \
+ MySQL-python \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
@@ -22,7 +22,16 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
{% endif %}
{% elif install_type == 'source' %}
-RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
- && /bin/false
+ADD ironic.tar /
+RUN ln -s /ironic-* /ironic
+
+RUN cd /ironic \
+ && useradd --user-group ironic \
+ && pip install -r requirements.txt \
+ && pip install --install-option="--install-scripts=/usr/bin" /ironic \
+ && mkdir -p /etc/ironic /var/log/ironic /home/ironic \
+ && cp -r /ironic/etc/* /etc/ironic/ \
+ && chown -R ironic: /etc/ironic /var/log/ironic /home/ironic \
+ && rm -rf /root/.cache
{% endif %}