From 9e420ba27eac22847870553c15b92ff499eef3aa Mon Sep 17 00:00:00 2001 From: Ryan Hallisey Date: Mon, 6 Oct 2014 14:13:16 +0000 Subject: [PATCH] Initial setup for nova-controller Partial-blueprint: kube-nova-container Change-Id: Ib48e6318ae458bf03510725a220332d1920cbeae --- docker/nova-controller/nova-api/Dockerfile | 8 ++ docker/nova-controller/nova-api/build | 1 + docker/nova-controller/nova-api/start.sh | 41 ++++++++ .../nova-controller/nova-conductor/Dockerfile | 8 ++ docker/nova-controller/nova-conductor/build | 1 + .../nova-controller/nova-conductor/start.sh | 41 ++++++++ docker/nova-controller/nova-controller.json | 98 +++++++++++++++++++ .../nova-controller/Dockerfile | 8 ++ docker/nova-controller/nova-controller/build | 1 + .../nova-controller/nova-scheduler/Dockerfile | 8 ++ docker/nova-controller/nova-scheduler/build | 1 + .../nova-controller/nova-scheduler/start.sh | 41 ++++++++ 12 files changed, 257 insertions(+) create mode 100644 docker/nova-controller/nova-api/Dockerfile create mode 120000 docker/nova-controller/nova-api/build create mode 100644 docker/nova-controller/nova-api/start.sh create mode 100644 docker/nova-controller/nova-conductor/Dockerfile create mode 120000 docker/nova-controller/nova-conductor/build create mode 100644 docker/nova-controller/nova-conductor/start.sh create mode 100644 docker/nova-controller/nova-controller.json create mode 100644 docker/nova-controller/nova-controller/Dockerfile create mode 120000 docker/nova-controller/nova-controller/build create mode 100644 docker/nova-controller/nova-scheduler/Dockerfile create mode 120000 docker/nova-controller/nova-scheduler/build create mode 100644 docker/nova-controller/nova-scheduler/start.sh diff --git a/docker/nova-controller/nova-api/Dockerfile b/docker/nova-controller/nova-api/Dockerfile new file mode 100644 index 0000000000..d43db58405 --- /dev/null +++ b/docker/nova-controller/nova-api/Dockerfile @@ -0,0 +1,8 @@ +FROM kollaglue/fedora-rdo-nova-controller +MAINTAINER Ryan Hallisey + +RUN yum -y install \ + openstack-nova-api && yum clean all + +ADD ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/nova-controller/nova-api/build b/docker/nova-controller/nova-api/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/nova-controller/nova-api/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/nova-controller/nova-api/start.sh b/docker/nova-controller/nova-api/start.sh new file mode 100644 index 0000000000..ed2c11109c --- /dev/null +++ b/docker/nova-controller/nova-api/start.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +: ${NOVA_DB_USER:=nova} +: ${NOVA_DB_NAME:=nova} +: ${KEYSTONE_AUTH_PROTOCOL:=http} +: ${NOVA_KEYSTONE_USER:=admin} +: ${NOVA_ADMIN_PASSWORD:=kolla} +: ${ADMIN_TENANT_NAME:=admin} + +if ! [ "$KEYSTONE_ADMIN_TOKEN" ]; then + echo "*** Missing KEYSTONE_ADMIN_TOKEN" >&2 + exit 1 +fi + +if ! [ "$DB_ROOT_PASSWORD" ]; then + echo "*** Missing DB_ROOT_PASSWORD" >&2 + exit 1 +fi + +if ! [ "$NOVA_DB_PASSWORD" ]; then + NOVA_DB_PASSWORD=$(openssl rand -hex 15) + export NOVA_DB_PASSWORD +fi + +sh /opt/nova/config-nova.sh api + +mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \ + -p${DB_ROOT_PASSWORD} mysql < + +RUN yum -y install \ + openstack-nova-conductor && yum clean all + +ADD ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/nova-controller/nova-conductor/build b/docker/nova-controller/nova-conductor/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/nova-controller/nova-conductor/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/nova-controller/nova-conductor/start.sh b/docker/nova-controller/nova-conductor/start.sh new file mode 100644 index 0000000000..38775c3d82 --- /dev/null +++ b/docker/nova-controller/nova-conductor/start.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +: ${NOVA_DB_USER:=nova} +: ${NOVA_DB_NAME:=nova} +: ${KEYSTONE_AUTH_PROTOCOL:=http} +: ${NOVA_KEYSTONE_USER:=admin} +: ${NOVA_ADMIN_PASSWORD:=kolla} +: ${ADMIN_TENANT_NAME:=admin} + +if ! [ "$KEYSTONE_ADMIN_TOKEN" ]; then + echo "*** Missing KEYSTONE_ADMIN_TOKEN" >&2 + exit 1 +fi + +if ! [ "$DB_ROOT_PASSWORD" ]; then + echo "*** Missing DB_ROOT_PASSWORD" >&2 + exit 1 +fi + +if ! [ "$NOVA_DB_PASSWORD" ]; then + NOVA_DB_PASSWORD=$(openssl rand -hex 15) + export NOVA_DB_PASSWORD +fi + +sh /opt/nova/config-nova.sh conductor + +mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \ + -p${DB_ROOT_PASSWORD} mysql < + +RUN yum -y install openstack-nova-common \ + install python-keystoneclient \ + install python-nova \ + install python-oslo-messaging \ + install python-websockify && yum clean all diff --git a/docker/nova-controller/nova-controller/build b/docker/nova-controller/nova-controller/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/nova-controller/nova-controller/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/nova-controller/nova-scheduler/Dockerfile b/docker/nova-controller/nova-scheduler/Dockerfile new file mode 100644 index 0000000000..8b28875fc0 --- /dev/null +++ b/docker/nova-controller/nova-scheduler/Dockerfile @@ -0,0 +1,8 @@ +FROM kollaglue/fedora-rdo-nova-controller +MAINTAINER Ryan Hallisey + +RUN yum -y install \ + openstack-nova-scheduler && yum clean all + +ADD ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/nova-controller/nova-scheduler/build b/docker/nova-controller/nova-scheduler/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/nova-controller/nova-scheduler/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/nova-controller/nova-scheduler/start.sh b/docker/nova-controller/nova-scheduler/start.sh new file mode 100644 index 0000000000..8ca13b66ec --- /dev/null +++ b/docker/nova-controller/nova-scheduler/start.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +: ${NOVA_DB_USER:=nova} +: ${NOVA_DB_NAME:=nova} +: ${KEYSTONE_AUTH_PROTOCOL:=http} +: ${NOVA_KEYSTONE_USER:=admin} +: ${NOVA_ADMIN_PASSWORD:=kolla} +: ${ADMIN_TENANT_NAME:=admin} + +if ! [ "$KEYSTONE_ADMIN_TOKEN" ]; then + echo "*** Missing KEYSTONE_ADMIN_TOKEN" >&2 + exit 1 +fi + +if ! [ "$DB_ROOT_PASSWORD" ]; then + echo "*** Missing DB_ROOT_PASSWORD" >&2 + exit 1 +fi + +if ! [ "$NOVA_DB_PASSWORD" ]; then + NOVA_DB_PASSWORD=$(openssl rand -hex 15) + export NOVA_DB_PASSWORD +fi + +sh /opt/nova/config-nova.sh scheduler + +mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \ + -p${DB_ROOT_PASSWORD} mysql <