diff --git a/docker/build b/docker/build index eea68befee..34b8e6cc87 100755 --- a/docker/build +++ b/docker/build @@ -1,7 +1,7 @@ #!/bin/bash # If the directories were numbered, a simple find could be used to build ;-) -CONTAINERS=(fedora-rdo-base cinder glance/glance-base glance/glance-api glance/glance-registry heat/heat-base heat/heat-api heat/heat-engine keystone mariadb rabbitmq swift/swift-base swift/swift-account swift/swift-container swift/swift-object swift/swift-proxy-server) +CONTAINERS=(fedora-rdo-base cinder glance/glance-base glance/glance-api glance/glance-registry heat/heat-base heat/heat-api heat/heat-engine keystone mariadb rabbitmq swift/swift-base swift/swift-account swift/swift-container swift/swift-object swift/swift-proxy-server nova-compute/nova-base nova-compute/nova-compute nova-compute/nova-libvirt) for IMAGE in ${CONTAINERS[@]}; do pushd . diff --git a/docker/nova-compute/build b/docker/nova-compute/build new file mode 100755 index 0000000000..2c0ff1588e --- /dev/null +++ b/docker/nova-compute/build @@ -0,0 +1,2 @@ +#!/bin/bash +docker build --tag kollaglue/fedora-rdo-nova-compute . diff --git a/docker/nova-compute/nova-base/Dockerfile b/docker/nova-compute/nova-base/Dockerfile new file mode 100644 index 0000000000..79675f772c --- /dev/null +++ b/docker/nova-compute/nova-base/Dockerfile @@ -0,0 +1,7 @@ +FROM fedora-rdo-base +MAINTAINER Steven Dake + +RUN yum -y install \ + openstack-utils \ + openstack-nova-common \ + mariadb && yum clean all diff --git a/docker/nova-compute/nova-base/build b/docker/nova-compute/nova-base/build new file mode 100755 index 0000000000..266c59185d --- /dev/null +++ b/docker/nova-compute/nova-base/build @@ -0,0 +1,2 @@ +#!/bin/bash +docker build --tag kollaglue/fedora-rdo-nova-base . diff --git a/docker/nova-compute/nova-base/push b/docker/nova-compute/nova-base/push new file mode 100755 index 0000000000..ea92f760cb --- /dev/null +++ b/docker/nova-compute/nova-base/push @@ -0,0 +1,2 @@ +#!/bin/bash +docker push kollaglue/fedora-rdo-nova-base . diff --git a/docker/nova-compute/nova-compute.json b/docker/nova-compute/nova-compute.json new file mode 100644 index 0000000000..062a65d852 --- /dev/null +++ b/docker/nova-compute/nova-compute.json @@ -0,0 +1,56 @@ +{ + "id": "nova", + "desiredState": { + "manifest": { + "version": "v1beta1", + "id": "nova-1", + "containers": [ + { + "name": "nova-compute", + "image": "fedora-rdo-nova-compute", + "ports": [ + {"containerPort": 9292} + ], + "env": [ + { + "name": "DB_ROOT_PASSWORD", + "value": "password" + }, + { + "name": "HEAT_DB_PASSWORD", + "value": "novadbpassword" + }, + { + "name": "KEYSTONE_ADMIN_TOKEN", + "value": "ADMINTOKEN" + } + ] + }, + { + "name": "nova-libvirt", + "image": "fedora-rdo-nova-libvirt", + "ports": [ + {"containerPort": 9292} + ], + "env": [ + { + "name": "DB_ROOT_PASSWORD", + "value": "password" + }, + { + "name": "HEAT_DB_PASSWORD", + "value": "novadbpassword" + }, + { + "name": "KEYSTONE_ADMIN_TOKEN", + "value": "ADMINTOKEN" + } + ] + } + ] + } + }, + "labels": { + "name": "nova-compute" + } +} diff --git a/docker/nova-compute/nova-compute/Dockerfile b/docker/nova-compute/nova-compute/Dockerfile new file mode 100644 index 0000000000..3f14566b4e --- /dev/null +++ b/docker/nova-compute/nova-compute/Dockerfile @@ -0,0 +1,22 @@ +FROM kollaglue/fedora-rdo-nova-base +MAINTAINER Steven Dake + +# broken out by operation - we don't need libvirt and +# 200 deps for libguestfs (?) +RUN yum -y install curl +RUN yum -y install iscsi-initiator-utils +RUN yum -y install iptables +RUN yum -y install iptables-ipv6 +RUN yum -y install ipmitool +RUN yum -y install libvirt-python +RUN yum -y install python-libguestfs +RUN yum -y install openssh-clients +RUN yum -y install rsync +RUN yum -y install lvm2 +RUN yum -y install python-cinderclient +RUN yum -y install genisoimage +RUN yum -y install bridge-utils +RUN yum -y install openstack-nova-compute + +ADD ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/nova-compute/nova-compute/build b/docker/nova-compute/nova-compute/build new file mode 100755 index 0000000000..2c0ff1588e --- /dev/null +++ b/docker/nova-compute/nova-compute/build @@ -0,0 +1,2 @@ +#!/bin/bash +docker build --tag kollaglue/fedora-rdo-nova-compute . diff --git a/docker/nova-compute/nova-compute/push b/docker/nova-compute/nova-compute/push new file mode 100755 index 0000000000..5fe18cb3b8 --- /dev/null +++ b/docker/nova-compute/nova-compute/push @@ -0,0 +1,2 @@ +#!/bin/bash +docker push kollaglue/fedora-rdo-nova-compute . diff --git a/docker/nova-compute/nova-compute/start.sh b/docker/nova-compute/nova-compute/start.sh new file mode 100644 index 0000000000..58b4a3f18f --- /dev/null +++ b/docker/nova-compute/nova-compute/start.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +: ${NOVA_DB_USER:=nova} +: ${NOVA_DB_NAME:=nova} +: ${KEYSTONE_AUTH_PROTOCOL:=http} +: ${NOVA_KEYSTONE_USER:=nova} +: ${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 compute + +mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \ + -p${DB_ROOT_PASSWORD} mysql < + +RUN yum -y install libvirt \ + libvirt-daemon-kvm && yum clean all + +ADD ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/nova-compute/nova-libvirt/build b/docker/nova-compute/nova-libvirt/build new file mode 100755 index 0000000000..ec01bd27dc --- /dev/null +++ b/docker/nova-compute/nova-libvirt/build @@ -0,0 +1,2 @@ +#!/bin/bash +docker build --tag kollaglue/fedora-rdo-nova-libvirt . diff --git a/docker/nova-compute/nova-libvirt/push b/docker/nova-compute/nova-libvirt/push new file mode 100755 index 0000000000..604e44afdb --- /dev/null +++ b/docker/nova-compute/nova-libvirt/push @@ -0,0 +1,2 @@ +#!/bin/bash +docker push kollaglue/fedora-rdo-nova-libvirt . diff --git a/docker/nova-compute/nova-libvirt/start.sh b/docker/nova-compute/nova-libvirt/start.sh new file mode 100644 index 0000000000..0fe90e1a41 --- /dev/null +++ b/docker/nova-compute/nova-libvirt/start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +# placeholder for libvirt startup script diff --git a/docker/nova-compute/push b/docker/nova-compute/push new file mode 100755 index 0000000000..5fe18cb3b8 --- /dev/null +++ b/docker/nova-compute/push @@ -0,0 +1,2 @@ +#!/bin/bash +docker push kollaglue/fedora-rdo-nova-compute .