Add instack-vm element

This allows the instack vm to be built using diskimage-builder
instead of virt-builder.
This commit is contained in:
Ben Nemec 2014-09-10 11:44:14 -04:00
parent 1d6720ee8b
commit 518d0d7dff
5 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,9 @@
Build an instack vm image
This element allows building an instack vm image using diskimage-builder. To build
the image simply include this element and the appropriate distro element.
For example:
disk-image-create -a amd64 -o instack \
--image-size 30 \
fedora instack-vm

View File

@ -0,0 +1,2 @@
stackuser
vm

View File

@ -0,0 +1,12 @@
#!/bin/bash
set -eu
set -o pipefail
file_list="/home/stack/.ssh/id_rsa_virt_power
/home/stack/.ssh/id_rsa_virt_power.pub
/tmp/deploy-virt-overcloudrc
/tmp/instack.answers"
for f in $file_list; do
cp "$f" "$TMP_HOOKS_PATH"
done

View File

@ -0,0 +1,14 @@
#!/bin/bash
set -eu
set -o pipefail
install-packages net-tools yum-utils git
mkdir -p /home/stack/.ssh
cp /tmp/in_target.d/id_rsa_virt_power /home/stack/.ssh/id_rsa_virt_power
cp /tmp/in_target.d/id_rsa_virt_power.pub /home/stack/.ssh/id_rsa_virt_power.pub
cp /tmp/in_target.d/deploy-virt-overcloudrc /home/stack/deploy-overcloudrc
cp /tmp/in_target.d/instack.answers /home/stack/instack.answers
chown -R stack:stack /home/stack

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -eu
set -o pipefail
yum erase -y cloud-init