Add instack-vm element
This allows the instack vm to be built using diskimage-builder instead of virt-builder.
This commit is contained in:
parent
1d6720ee8b
commit
518d0d7dff
9
elements/instack-vm/README.md
Normal file
9
elements/instack-vm/README.md
Normal 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
|
2
elements/instack-vm/element-deps
Normal file
2
elements/instack-vm/element-deps
Normal file
@ -0,0 +1,2 @@
|
||||
stackuser
|
||||
vm
|
12
elements/instack-vm/extra-data.d/50-add-instack-files
Executable file
12
elements/instack-vm/extra-data.d/50-add-instack-files
Executable 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
|
14
elements/instack-vm/install.d/51-instack-files
Executable file
14
elements/instack-vm/install.d/51-instack-files
Executable 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
|
6
elements/instack-vm/post-install.d/90-remove-cloud-init
Executable file
6
elements/instack-vm/post-install.d/90-remove-cloud-init
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
yum erase -y cloud-init
|
Loading…
Reference in New Issue
Block a user