exit 1
}
- instack_env_output="
+ instackenv_output="
{
\"nodes\" : [
\"pm_addr\": \"$(eval echo \${${node}ipmi_ip})\",
\"capabilities\": \"$(eval echo \${${node}capabilities})\"
"
- instack_env_output+=${node_output}
+ instackenv_output+=${node_output}
if [ $node_count -lt $node_total ]; then
- instack_env_output+=" },"
+ instackenv_output+=" },"
else
- instack_env_output+=" }"
+ instackenv_output+=" }"
fi
done
- instack_env_output+='
+ instackenv_output+='
]
}
'
#Copy instackenv.json to undercloud for baremetal
- echo -e "{blue}Parsed instackenv JSON:\n${instack_env_output}${reset}"
+ echo -e "{blue}Parsed instackenv JSON:\n${instackenv_output}${reset}"
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
cat > instackenv.json << EOF
-$instack_env_output
+$instackenv_output
EOF
EOI
if [[ "$net_isolation_enabled" == "FALSE" ]]; then
virsh_enabled_networks="admin_network"
enabled_network_list="admin_network"
- # For baremetal we only need to create/attach instack to admin and public
+ # For baremetal we only need to create/attach Undercloud to admin and public
elif [ "$virtual" == "FALSE" ]; then
virsh_enabled_networks="admin_network public_network"
else
##verify vm exists, an has a dhcp lease assigned to it
##params: none
-function setup_instack_vm {
- if ! virsh list --all | grep instack > /dev/null; then
+function setup_undercloud_vm {
+ if ! virsh list --all | grep undercloud > /dev/null; then
undercloud_nets="default admin_network"
if [[ $enabled_network_list =~ "public_network" ]]; then
undercloud_nets+=" public_network"
fi
- define_vm instack hd 30 "$undercloud_nets"
+ define_vm undercloud hd 30 "$undercloud_nets"
### this doesn't work for some reason I was getting hangup events so using cp instead
#virsh vol-upload --pool default --vol undercloud.qcow2 --file $CONFIG/stack/undercloud.qcow2
#error: internal error: received hangup / error event on socket
#error: Reconnected to the hypervisor
- local instack_dst=/var/lib/libvirt/images/instack.qcow2
- cp -f $RESOURCES/undercloud.qcow2 $instack_dst
-
- # resize instack machine
- echo "Checking if instack needs to be resized..."
- instack_size=$(LIBGUESTFS_BACKEND=direct virt-filesystems --long -h --all -a $instack_dst |grep device | grep -Eo "[0-9\.]+G" | sed -n 's/\([0-9][0-9]*\).*/\1/p')
- if [ "$instack_size" -lt 30 ]; then
- qemu-img resize /var/lib/libvirt/images/instack.qcow2 +25G
- LIBGUESTFS_BACKEND=direct virt-resize --expand /dev/sda1 $RESOURCES/undercloud.qcow2 $instack_dst
- LIBGUESTFS_BACKEND=direct virt-customize -a $instack_dst --run-command 'xfs_growfs -d /dev/sda1 || true'
- new_size=$(LIBGUESTFS_BACKEND=direct virt-filesystems --long -h --all -a $instack_dst |grep filesystem | grep -Eo "[0-9\.]+G" | sed -n 's/\([0-9][0-9]*\).*/\1/p')
+ local undercloud_dst=/var/lib/libvirt/images/undercloud.qcow2
+ cp -f $RESOURCES/undercloud.qcow2 $undercloud_dst
+
+ # resize Undercloud machine
+ echo "Checking if Undercloud needs to be resized..."
+ undercloud_size=$(LIBGUESTFS_BACKEND=direct virt-filesystems --long -h --all -a $undercloud_dst |grep device | grep -Eo "[0-9\.]+G" | sed -n 's/\([0-9][0-9]*\).*/\1/p')
+ if [ "$undercloud_size" -lt 30 ]; then
+ qemu-img resize /var/lib/libvirt/images/undercloud.qcow2 +25G
+ LIBGUESTFS_BACKEND=direct virt-resize --expand /dev/sda1 $RESOURCES/undercloud.qcow2 $undercloud_dst
+ LIBGUESTFS_BACKEND=direct virt-customize -a $undercloud_dst --run-command 'xfs_growfs -d /dev/sda1 || true'
+ new_size=$(LIBGUESTFS_BACKEND=direct virt-filesystems --long -h --all -a $undercloud_dst |grep filesystem | grep -Eo "[0-9\.]+G" | sed -n 's/\([0-9][0-9]*\).*/\1/p')
if [ "$new_size" -lt 30 ]; then
- echo "Error resizing instack machine, disk size is ${new_size}"
+ echo "Error resizing Undercloud machine, disk size is ${new_size}"
exit 1
else
- echo "instack successfully resized"
+ echo "Undercloud successfully resized"
fi
else
- echo "skipped instack resize, upstream is large enough"
+ echo "Skipped Undercloud resize, upstream is large enough"
fi
else
- echo "Found Instack VM, using existing VM"
+ echo "Found Undercloud VM, using existing VM"
fi
# if the VM is not running update the authkeys and start it
- if ! virsh list | grep instack > /dev/null; then
- echo "Injecting ssh key to instack VM"
- LIBGUESTFS_BACKEND=direct virt-customize -a $instack_dst --run-command "mkdir -p /root/.ssh/" \
+ if ! virsh list | grep undercloud > /dev/null; then
+ echo "Injecting ssh key to Undercloud VM"
+ LIBGUESTFS_BACKEND=direct virt-customize -a $undercloud_dst --run-command "mkdir -p /root/.ssh/" \
--upload ~/.ssh/id_rsa.pub:/root/.ssh/authorized_keys \
--run-command "chmod 600 /root/.ssh/authorized_keys && restorecon /root/.ssh/authorized_keys" \
--run-command "cp /root/.ssh/authorized_keys /home/stack/.ssh/" \
--run-command "chown stack:stack /home/stack/.ssh/authorized_keys && chmod 600 /home/stack/.ssh/authorized_keys"
- virsh start instack
+ virsh start undercloud
fi
- sleep 10 # let instack get started up
+ sleep 10 # let undercloud get started up
- # get the instack VM IP
+ # get the undercloud VM IP
CNT=10
- echo -n "${blue}Waiting for instack's dhcp address${reset}"
- instack_mac=$(virsh domiflist instack | grep default | awk '{ print $5 }')
- while ! $(arp -e | grep ${instack_mac} > /dev/null) && [ $CNT -gt 0 ]; do
+ echo -n "${blue}Waiting for Undercloud's dhcp address${reset}"
+ undercloud_mac=$(virsh domiflist undercloud | grep default | awk '{ print $5 }')
+ while ! $(arp -e | grep ${undercloud_mac} > /dev/null) && [ $CNT -gt 0 ]; do
echo -n "."
sleep 10
CNT=$((CNT-1))
done
- UNDERCLOUD=$(arp -e | grep ${instack_mac} | awk {'print $1'})
+ UNDERCLOUD=$(arp -e | grep ${undercloud_mac} | awk {'print $1'})
if [ -z "$UNDERCLOUD" ]; then
- echo "\n\nCan't get IP for Instack. Can Not Continue."
+ echo "\n\nCan't get IP for Undercloud. Can Not Continue."
exit 1
else
- echo -e "${blue}\rInstack VM has IP $UNDERCLOUD${reset}"
+ echo -e "${blue}\rUndercloud VM has IP $UNDERCLOUD${reset}"
fi
CNT=10
- echo -en "${blue}\rValidating instack VM connectivity${reset}"
+ echo -en "${blue}\rValidating Undercloud VM connectivity${reset}"
while ! ping -c 1 $UNDERCLOUD > /dev/null && [ $CNT -gt 0 ]; do
echo -n "."
sleep 3
CNT=$((CNT-1))
done
if [ "$CNT" -eq 0 ]; then
- echo "Failed to contact Instack. Can Not Continue"
+ echo "Failed to contact Undercloud. Can Not Continue"
exit 1
fi
CNT=10
CNT=$((CNT-1))
done
if [ "$CNT" -eq 0 ]; then
- echo "Failed to connect to Instack. Can Not Continue"
+ echo "Failed to connect to Undercloud. Can Not Continue"
exit 1
fi
##Create virtual nodes in virsh
##params: name - String: libvirt name for VM
## bootdev - String: boot device for the VM
-## disksize - Number: size of the disk in Gig
+## disksize - Number: size of the disk in GB
## ovs_bridges: - List: list of ovs bridges
function define_vm () {
# Create the libvirt storage volume
sed -i 's#^.*Compute::Net::SoftwareConfig:.*$# OS::TripleO::Compute::Net::SoftwareConfig: nics/compute'${nic_ext}'.yaml#' $1
}
-##Copy over the glance images and instack json file
+##Copy over the glance images and instackenv json file
##params: none
function configure_undercloud {
echo
- echo "Copying configuration files to instack"
+ echo "Copying configuration files to Undercloud"
if [[ "$net_isolation_enabled" == "TRUE" ]]; then
configure_network_environment $CONFIG/network-environment.yaml
echo -e "${blue}Network Environment set for Deployment: ${reset}"
fi
scp ${SSH_OPTIONS[@]} -r $CONFIG/nics/ "stack@$UNDERCLOUD":
- # ensure stack user on instack machine has an ssh key
+ # ensure stack user on Undercloud machine has an ssh key
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "if [ ! -e ~/.ssh/id_rsa.pub ]; then ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa; fi"
if [ "$virtual" == "TRUE" ]; then
- # copy the instack vm's stack user's pub key to
- # root's auth keys so that instack can control
+ # copy the Undercloud VM's stack user's pub key to
+ # root's auth keys so that Undercloud can control
# vm power on the hypervisor
ssh ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "cat /home/stack/.ssh/id_rsa.pub" >> /root/.ssh/authorized_keys
DEPLOY_OPTIONS+=" --libvirt-type qemu"
INSTACKENV=$CONFIG/instackenv-virt.json
- # upload instackenv file to Instack for virtual deployment
+ # upload instackenv file to Undercloud for virtual deployment
scp ${SSH_OPTIONS[@]} $INSTACKENV "stack@$UNDERCLOUD":instackenv.json
fi
# configure undercloud on Undercloud VM
echo "Running undercloud configuration."
- echo "Logging undercloud configuration to instack:/home/stack/apex-undercloud-install.log"
+ echo "Logging undercloud configuration to undercloud:/home/stack/apex-undercloud-install.log"
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" << EOI
if [[ "$net_isolation_enabled" == "TRUE" ]]; then
sed -i 's/#local_ip/local_ip/' undercloud.conf
exit 1
fi
- echo "Copying overcloud image to instack"
+ echo "Copying overcloud image to Undercloud"
scp ${SSH_OPTIONS[@]} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 "stack@$UNDERCLOUD":overcloud-full.qcow2
# make sure ceph is installed
fi
done
- # for virtual, we NAT public network through instack
+ # for virtual, we NAT public network through Undercloud
if [ "$virtual" == "TRUE" ]; then
if ! configure_undercloud_nat ${public_network_cidr}; then
echo -e "${red}ERROR: Unable to NAT undercloud with external net: ${public_network_cidr}${reset}"
exit 1
else
- echo -e "${blue}INFO: Undercloud (instack VM) has been setup to NAT Overcloud public network${reset}"
+ echo -e "${blue}INFO: Undercloud VM has been setup to NAT Overcloud public network${reset}"
fi
fi
if [ -n "$DEPLOY_SETTINGS_FILE" ]; then
parse_deploy_settings
fi
- setup_instack_vm
+ setup_undercloud_vm
if [ "$virtual" == "TRUE" ]; then
setup_virtual_baremetal
elif [ -n "$INVENTORY_FILE" ]; then
configured with an IP gateway on its admin or public interface and configured with a
working DNS server. The Jumphost should also have routable access to the lights out network.
-``opnfv-deploy`` is then executed in order to deploy the Instack VM. ``opnfv-deploy`` uses
+``opnfv-deploy`` is then executed in order to deploy the Undercloud VM. ``opnfv-deploy`` uses
three configuration files in order to know how to install and provision the OPNFV target system.
The information gathered under section `Execution Requirements (Bare Metal Only)`_ is put
into the YAML file (``/etc/opnfv-apex/inventory.yaml``) configuration file. Deployment
options are put into the YAML file (``/etc/opnfv-apex/deploy_settings.yaml``). Networking
definitions gathered under section `Network Requirements`_ are put into the YAML file
-(``/etc/opnfv-apex/network_settings.yaml``). ``opnfv-deploy`` will boot the Instack VM
+(``/etc/opnfv-apex/network_settings.yaml``). ``opnfv-deploy`` will boot the Undercloud VM
and load the target deployment configuration into the provisioning toolchain. This includes
MAC address, IPMI, Networking Environment and OPNFV deployment options.
-Once configuration is loaded and Instack is configured it will then reboot the nodes via IPMI.
+Once configuration is loaded and Undercloud is configured it will then reboot the nodes via IPMI.
The nodes should already be set to PXE boot first off the admin interface. The nodes will
-first PXE off of the Instack PXE server and go through a discovery/introspection process.
+first PXE off of the Undercloud PXE server and go through a discovery/introspection process.
Introspection boots off of custom introspection PXE images. These images are designed to look
at the properties of the hardware that is booting off of them and report the properties of
-it back to the Instack node.
+it back to the Undercloud node.
-After introspection Instack will execute a Heat Stack Deployment to being node provisioning
-and configuration. The nodes will reboot and PXE again off the Instack PXE server to
-provision each node using the Glance disk images provided by Instack. These disk images
+After introspection Undercloud will execute a Heat Stack Deployment to being node provisioning
+and configuration. The nodes will reboot and PXE again off the Undercloud PXE server to
+provision each node using the Glance disk images provided by Undercloud These disk images
include all the necessary packages and configuration for an OPNFV deployment to execute.
Once the node's disk images have been written to disk the nodes will boot off the newly written
disks and execute cloud-init which will execute the final node configuration. This
================================================
The VM nodes deployment operates almost the same way as the bare metal deployment with a
-few differences. ``opnfv-deploy`` still deploys an Instack VM. In addition to the Instack VM
+few differences. ``opnfv-deploy`` still deploys an Undercloud VM. In addition to the Undercloud VM
a collection of VMs (3 control nodes + 2 compute for an HA deployment or 1 control node and
1 compute node for a Non-HA Deployment) will be defined for the target OPNFV deployment.
The part of the toolchain that executes IPMI power instructions calls into libvirt instead of
3. Edit the following values for each node:
- - ``mac_address``: MAC of the interface that will PXE boot from Instack
+ - ``mac_address``: MAC of the interface that will PXE boot from Undercloud
- ``ipmi_ip``: IPMI IP Address
- ``ipmi_user``: IPMI username
- ``ipmi_password``: IPMI password