Merge "Initial libvirt and nova-compute structure"
This commit is contained in:
commit
30ad5df95e
docker
@ -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 .
|
||||
|
2
docker/nova-compute/build
Executable file
2
docker/nova-compute/build
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker build --tag kollaglue/fedora-rdo-nova-compute .
|
7
docker/nova-compute/nova-base/Dockerfile
Normal file
7
docker/nova-compute/nova-base/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM fedora-rdo-base
|
||||
MAINTAINER Steven Dake <sdake@redhat.com>
|
||||
|
||||
RUN yum -y install \
|
||||
openstack-utils \
|
||||
openstack-nova-common \
|
||||
mariadb && yum clean all
|
2
docker/nova-compute/nova-base/build
Executable file
2
docker/nova-compute/nova-base/build
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker build --tag kollaglue/fedora-rdo-nova-base .
|
2
docker/nova-compute/nova-base/push
Executable file
2
docker/nova-compute/nova-base/push
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker push kollaglue/fedora-rdo-nova-base .
|
56
docker/nova-compute/nova-compute.json
Normal file
56
docker/nova-compute/nova-compute.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
22
docker/nova-compute/nova-compute/Dockerfile
Normal file
22
docker/nova-compute/nova-compute/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM kollaglue/fedora-rdo-nova-base
|
||||
MAINTAINER Steven Dake <sdake@redhat.com>
|
||||
|
||||
# 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"]
|
2
docker/nova-compute/nova-compute/build
Executable file
2
docker/nova-compute/nova-compute/build
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker build --tag kollaglue/fedora-rdo-nova-compute .
|
2
docker/nova-compute/nova-compute/push
Executable file
2
docker/nova-compute/nova-compute/push
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker push kollaglue/fedora-rdo-nova-compute .
|
40
docker/nova-compute/nova-compute/start.sh
Normal file
40
docker/nova-compute/nova-compute/start.sh
Normal file
@ -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 <<EOF
|
||||
CREATE DATABASE IF NOT EXISTS ${NOVA_DB_NAME};
|
||||
GRANT ALL PRIVILEGES ON nova* TO
|
||||
'${NOVA_DB_USER}'@'%' IDENTIFIED BY '${NOVA_DB_PASSWORD}'
|
||||
EOF
|
||||
|
||||
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
|
||||
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONEMASTER_35357_PORT_35357_TCP_ADDR}:35357/v2.0"
|
||||
|
||||
/usr/bin/keystone user-create --name ${NOVA_KEYSTONE_USER} --pass ${NOVA_ADMIN_PASSWORD}
|
||||
/usr/bin/keystone role-create --name ${NOVA_KEYSTONE_USER}
|
||||
/usr/bin/keystone user-role-add --user ${NOVA_KEYSTONE_USER} --role admin --tenant ${ADMIN_TENANT_NAME}
|
||||
|
||||
exec /usr/bin/nova-compute
|
8
docker/nova-compute/nova-libvirt/Dockerfile
Normal file
8
docker/nova-compute/nova-libvirt/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM kollaglue/fedora-rdo-base
|
||||
MAINTAINER Steven Dake <sdake@redhat.com>
|
||||
|
||||
RUN yum -y install libvirt \
|
||||
libvirt-daemon-kvm && yum clean all
|
||||
|
||||
ADD ./start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
2
docker/nova-compute/nova-libvirt/build
Executable file
2
docker/nova-compute/nova-libvirt/build
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker build --tag kollaglue/fedora-rdo-nova-libvirt .
|
2
docker/nova-compute/nova-libvirt/push
Executable file
2
docker/nova-compute/nova-libvirt/push
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker push kollaglue/fedora-rdo-nova-libvirt .
|
2
docker/nova-compute/nova-libvirt/start.sh
Normal file
2
docker/nova-compute/nova-libvirt/start.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
# placeholder for libvirt startup script
|
2
docker/nova-compute/push
Executable file
2
docker/nova-compute/push
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker push kollaglue/fedora-rdo-nova-compute .
|
Loading…
x
Reference in New Issue
Block a user