Updates to work with latest setup-baremetal cmds.
TOCI updates to work with the latest triple-incubator scripts. Recently we changed setup-baremetal and register-nodes in the incubator so that the way it handles MACS works differently. Specifically we now only pass the MAC addresses we want register-nodes to actually use (previously that script contained some rather janky logic to decide which MACs to use on its own). This makes good sense for the devtest story and makes testing w/ VMs more sensible. When using TOCI w/ real bare metal (using a predined set of MAC addresses and power management commands) we make the following assumptions: 1) when setting up the seed VM we assign the first MAC in the list 2) when setting up the undercloud we skip the first MAC and assign all the others. ** This should work well and allow us to bring up a single undercloud node and possibly a multi-node overcloud as well. This patch also includes updates to pass in parameters to setup-baremetal instead of relying on environment variables for everything. Lastly, this change also gets rid of some TOCI logic to handle using real bare metal nodes (using power management commands etc). Now that we have support in incubator/register-nodes for power management we can just use that instead. Change-Id: I112c4a18c8e9d6e8ad5f152305ff018e79e97ecc
This commit is contained in:
parent
3ce557cb6a
commit
fa9a24e323
37
toci_test.sh
37
toci_test.sh
|
@ -35,21 +35,15 @@ wait_for 10 5 nova list
|
|||
user-config #Adds nova keypair
|
||||
|
||||
if [ -n "$TOCI_MACS" ]; then
|
||||
# call setup-baremetal with no macs so baremetal flavor is created
|
||||
MACS= setup-baremetal $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH seed
|
||||
MACS=( $TOCI_MACS )
|
||||
IPS=( $TOCI_PM_IPS )
|
||||
USERS=( $TOCI_PM_USERS )
|
||||
PASSWORDS=( $TOCI_PM_PASSWORDS )
|
||||
COUNT=0
|
||||
for MAC in "${MACS[@]}"; do
|
||||
nova baremetal-node-create --pm_address=${IPS[$COUNT]} --pm_user=${USERS[$COUNT]} --pm_password=${PASSWORDS[$COUNT]} ubuntu $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $MAC
|
||||
COUNT=$(( $COUNT + 1 ))
|
||||
done
|
||||
|
||||
# For the seed VM we use only the first MAC and power management setting
|
||||
setup-baremetal $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH "${TOCI_MACS%% *}" seed "${TOCI_PM_IPS%% *}" "${TOCI_PM_USER%% *}" "${TOCI_PM_PASSWORDS%% *}"
|
||||
|
||||
else
|
||||
create-nodes $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH 5
|
||||
export MACS=$($TOCI_WORKING_DIR/bm_poseur/bm_poseur get-macs)
|
||||
setup-baremetal $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH seed
|
||||
|
||||
export SEED_MACS=$(create-nodes $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH 1)
|
||||
setup-baremetal $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH "$SEED_MACS" seed
|
||||
|
||||
fi
|
||||
|
||||
setup-neutron 192.0.2.2 192.0.2.3 192.0.2.0/24 192.0.2.1 ctlplane
|
||||
|
@ -124,7 +118,20 @@ if [ "$TOCI_DO_OVERCLOUD" != "1" ] ; then
|
|||
fi
|
||||
|
||||
user-config
|
||||
setup-baremetal $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH undercloud
|
||||
|
||||
if [ -n "$TOCI_MACS" ]; then
|
||||
|
||||
# For the undercloud we pop off the first MAC and power management settings
|
||||
# since they have already been used by the seed VM
|
||||
setup-baremetal $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH "${TOCI_MACS#[^ ]* }" undercloud "${TOCI_PM_IPS#[^ ]* }" "${TOCI_PM_USERS#[^ ]* }" "${TOCI_PM_PASSWORDS#[^ ]* }"
|
||||
|
||||
else
|
||||
|
||||
export UNDERCLOUD_MACS=$(create-nodes $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH 2)
|
||||
setup-baremetal $TOCI_NODE_CPU $TOCI_NODE_MEM $TOCI_NODE_DISK $TOCI_DIB_ARCH "$UNDERCLOUD_MACS" undercloud
|
||||
|
||||
fi
|
||||
|
||||
setup-neutron 192.0.2.5 192.0.2.24 192.0.2.0/24 $UNDERCLOUD_IP ctlplane
|
||||
ssh_noprompt heat-admin@$UNDERCLOUD_IP "cat /opt/stack/boot-stack/virtual-power-key.pub" >> ~/.ssh/authorized_keys
|
||||
|
||||
|
|
Loading…
Reference in New Issue