15. Installing the undercloud

openstack undercloud install

16. Prepare the undercloud for deploying the overcloud

16.1. Prepare Your Environment

  • Source in the undercloud credentials.
source /home/stack/stackrc
  • Upload images to glance.
openstack overcloud image upload
  • Register nodes with Ironic.
openstack baremetal import --json instackenv.json
openstack baremetal configure boot
  • Introspect hardware attributes of nodes.
openstack baremetal introspection bulk start

16.2. Flavor Details

  • Create flavor oooq_<name> for each flavor in the ansible flavors variable.
  • Remove flavor before attempting to create.
nova flavor-delete oooq_control > /dev/null 2>&1 || true
  • We subtract 1 from the total disk size here to resolve problems encountered in CI in which the available disk space on the virtual nodes was slightly less than what we requested.
openstack flavor create --id auto \
    --ram 8192 \
    --disk $(( 50 - 1)) \
    --vcpus 1 \
    oooq_control
openstack flavor set \
    --property "cpu_arch"="x86_64" \
    --property "capabilities:boot_option"="local" \
    --property "capabilities:profile"="control" oooq_control
  • Remove flavor before attempting to create.
nova flavor-delete oooq_ceph > /dev/null 2>&1 || true
  • We subtract 1 from the total disk size here to resolve problems encountered in CI in which the available disk space on the virtual nodes was slightly less than what we requested.
openstack flavor create --id auto \
    --ram 8192 \
    --disk $(( 50 - 1)) \
    --vcpus 1 \
    oooq_ceph
openstack flavor set \
    --property "cpu_arch"="x86_64" \
    --property "capabilities:boot_option"="local" \
    --property "capabilities:profile"="ceph" oooq_ceph
  • Remove flavor before attempting to create.
nova flavor-delete oooq_compute > /dev/null 2>&1 || true
  • We subtract 1 from the total disk size here to resolve problems encountered in CI in which the available disk space on the virtual nodes was slightly less than what we requested.
openstack flavor create --id auto \
    --ram 8192 \
    --disk $(( 50 - 1)) \
    --vcpus 1 \
    oooq_compute
openstack flavor set \
    --property "cpu_arch"="x86_64" \
    --property "capabilities:boot_option"="local" \
    --property "capabilities:profile"="compute" oooq_compute

16.3. Setup Networking

  • Enable NAT for “external” network.
RULE="-s 10.0.0.1/24 ! -d 10.0.0.1/24 -j MASQUERADE"

if ! sudo iptables -t nat -C BOOTSTACK_MASQ $RULE; then
    sudo iptables -t nat -A BOOTSTACK_MASQ $RULE
    sudo sh -c 'iptables-save > /etc/sysconfig/iptables'
fi


sudo bash -c 'cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-vlan109
DEVICE=vlan109
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSIntPort
BOOTPROTO=static
IPADDR=10.12.149.124
NETMASK=255.255.255.192
OVS_BRIDGE=br-ctlplane
OVS_OPTIONS="tag=109"
EOF'

sudo ifup ifcfg-vlan109