summaryrefslogtreecommitdiffstats
path: root/lib/virtual-setup-functions.sh
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2017-03-30 23:03:43 -0400
committerDan Radez <dradez@redhat.com>2017-05-09 15:09:42 -0400
commitac3a86983e4c049a3115c7bd77eeacaeb19d0ca3 (patch)
treeed0c27aa4853848b0e47e3ce3de25dfb23bfc8df /lib/virtual-setup-functions.sh
parentef3dc1ce0323fa0881e416cd4b9028fb4250b719 (diff)
Updating Apex to OpenStack Ocata
- power management updated to virtualbmc, pxe_ssh is deprecated - removing custom tacker build - removing custom congress build - disabling yum update in undercloud on the cli instead of in a patch - Undercloud is direct kernel booted now, there are no kernel and initrd in the disk image from upstream - remove OpenDaylight previous to Carbon JIRA: APEX-433 JIRA: APEX-432 JIRA: APEX-431 Change-Id: I6963f16e65eacade5607a3082b58b6150331406c Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'lib/virtual-setup-functions.sh')
-rwxr-xr-xlib/virtual-setup-functions.sh52
1 files changed, 32 insertions, 20 deletions
diff --git a/lib/virtual-setup-functions.sh b/lib/virtual-setup-functions.sh
index c74a374b..ac7b507b 100755
--- a/lib/virtual-setup-functions.sh
+++ b/lib/virtual-setup-functions.sh
@@ -74,23 +74,26 @@ EOF
node${i}:
mac_address: "$mac"
ipmi_ip: 192.168.122.1
- ipmi_user: root
- ipmi_pass: "INSERT_STACK_USER_PRIV_KEY"
- pm_type: "pxe_ssh"
- cpus: $vcpus
+ ipmi_user: admin
+ ipmi_pass: "password"
+ pm_type: "pxe_ipmitool"
+ pm_port: "623$i"
+ cpu: $vcpus
memory: $ramsize
disk: 41
arch: "x86_64"
capabilities: "$capability"
EOF
+ vbmc add baremetal$i --port 623$i
+ if service firewalld status > /dev/null; then
+ firewall-cmd --permanent --zone=public --add-port=623$i/udp
+ fi
+ # TODO: add iptables check and commands too
+ vbmc start baremetal$i
done
-
- #Overwrite the tripleo-inclubator domain.xml with our own, keeping a backup.
- if [ ! -f /usr/share/tripleo/templates/domain.xml.bak ]; then
- /usr/bin/mv -f /usr/share/tripleo/templates/domain.xml /usr/share/tripleo/templates/domain.xml.bak
+ if service firewalld status > /dev/null; then
+ firewall-cmd --reload
fi
-
- /usr/bin/cp -f $LIB/installer/domain.xml /usr/share/tripleo/templates/domain.xml
}
##Create virtual nodes in virsh
@@ -101,7 +104,7 @@ EOF
## vcpus - Number of VCPUs to use (defaults to 4)
## ramsize - Size of RAM for VM in MB (defaults to 8192)
function define_vm () {
- local vcpus ramsize
+ local vcpus ramsize volume_path direct_boot kernel_args
if [ -z "$5" ]; then
vcpus=4
@@ -129,14 +132,23 @@ function define_vm () {
exit 1
fi
+ # undercloud need to be direct booted.
+ # the upstream image no longer includes the kernel and initrd
+ if [ "$1" == 'undercloud' ]; then
+ direct_boot='--direct-boot overcloud-full'
+ kernel_args='--kernel-arg console=ttyS0 --kernel-arg root=/dev/sda'
+ fi
+
# create the VM
- /usr/libexec/openstack-tripleo/configure-vm --name $1 \
- --bootdev $2 \
- --image "$volume_path" \
- --diskbus sata \
- --arch x86_64 \
- --cpus $vcpus \
- --memory $ramsize \
- --libvirt-nic-driver virtio \
- --baremetal-interface $4
+ $LIB/configure-vm --name $1 \
+ --bootdev $2 \
+ --image "$volume_path" \
+ --diskbus sata \
+ --arch $(uname -i) \
+ --cpus $vcpus \
+ --memory $ramsize \
+ --libvirt-nic-driver virtio \
+ $direct_boot \
+ $kernel_args \
+ --baremetal-interface $4
}