aboutsummaryrefslogtreecommitdiff
path: root/docker/ironic/ironic-api
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@redhat.com>2015-08-28 11:26:40 -0400
committerJeff Peeler <jpeeler@redhat.com>2015-09-28 16:10:43 -0400
commitf5a50a1d7d40fb39bbc503ab1079e89e4aafe3fe (patch)
treefd734b1ab909a3c9e06be5cce1eae160f2b5d692 /docker/ironic/ironic-api
parent40f9f0816f8f94b4d11012a39af21d50195f9a74 (diff)
downloadkolla-f5a50a1d7d40fb39bbc503ab1079e89e4aafe3fe.tar.gz
kolla-f5a50a1d7d40fb39bbc503ab1079e89e4aafe3fe.zip
Add Ansible support for Ironic
Configuration based off upstream documentation here: http://docs.openstack.org/developer/ironic/deploy/install-guide.html A few notes: -ironic-api is not configured to use mod_wsgi -several places it's noted that discoverd is going away and needs to be replaced with ironic-inspector - (sqlite connection should be changed too) -currently enabling ironic reconfigures nova compute (driver and scheduler) as well as changes neutron network settings -a nice enhancement would be to configure the web console Required post-deployment configuration: Create the flat network to launch the instances: neutron net-create --tenant-id $TENANT_ID sharednet1 --shared \ --provider:network_type flat --provider:physical_network physnet1 neutron subnet-create sharednet1 $NETWORK_CIDR --name $SUBNET_NAME \ --ip-version=4 --gateway=$GATEWAY_IP --allocation-pool \ start=$START_IP,end=$END_IP --enable-dhcp And then the above ID is used to set cleaning_network_uuid in the neutron section of ironic.conf. Change-Id: I572e7ff1f23c4e57a2c50817cafe9269fd9950dd Implements: blueprint ironic-container
Diffstat (limited to 'docker/ironic/ironic-api')
-rw-r--r--docker/ironic/ironic-api/Dockerfile.j27
-rwxr-xr-xdocker/ironic/ironic-api/start.sh13
2 files changed, 12 insertions, 8 deletions
diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2
index 112ff8b2d..016b3560b 100644
--- a/docker/ironic/ironic-api/Dockerfile.j2
+++ b/docker/ironic/ironic-api/Dockerfile.j2
@@ -4,15 +4,16 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
-RUN yum -y install \
- openstack-ironic-api \
+# Install delorean version even though version number is less
+# http://lists.openstack.org/pipermail/openstack-dev/2015-August/073100.html
+RUN VER_TO_GET=$(yum --showduplicates list openstack-ironic-api | awk '/delorean/ {print $2}') \
+ && yum -y install openstack-ironic-api-$VER_TO_GET \
&& yum clean all
{% endif %}
{% endif %}
COPY start.sh /
-COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
diff --git a/docker/ironic/ironic-api/start.sh b/docker/ironic/ironic-api/start.sh
index 9d449defb..60b3ea5a0 100755
--- a/docker/ironic/ironic-api/start.sh
+++ b/docker/ironic/ironic-api/start.sh
@@ -1,10 +1,13 @@
#!/bin/bash
set -o errexit
-CMD="/usr/bin/ironic-api"
-ARGS=""
-
source /opt/kolla/kolla-common.sh
-set_configs
-exec $CMD $ARGS
+# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
+# of the KOLLA_BOOTSTRAP variable being set, including empty.
+if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
+ su -s /bin/sh -c "ironic-dbsync upgrade" ironic
+ exit 0
+fi
+
+exec $CMD