Update answers files, deployrc files and instack-deploy-overcloud for SSH power

driver changes.
This commit is contained in:
James Slagle 2014-07-31 11:52:16 -04:00
parent c97bc21e41
commit 07d7d51bc2
4 changed files with 25 additions and 37 deletions

View File

@ -13,3 +13,20 @@ export MACS=""
export COMPUTESCALE=1
export BLOCKSTORAGESCALE=1
export SWIFTSTORAGESCALE=1
### VIRTUAL_POWER_USER ###
# The user to use to connect to VIRTUAL_POWER_HOST.
# This is a user on your virsh host.
export VIRTUAL_POWER_USER=stack
### VIRTUAL_POWER_HOST ###
# The virsh host to use for Overcloud instances.
export VIRTUAL_POWER_HOST=192.168.122.1
### SSH_KEY ###
# The ssh key to use to ssh to the virsh host. This should be a path to an ssh
# private key. The public key portion must be added to the
# ~/.ssh/authorized_keys file for the virtual power user on the virt host. If
# instack-virt-setup was used, this key already exists and has already been
# copied to the virt host.
export SSH_KEY=/home/stack/.ssh/id_rsa_virt_power

View File

@ -12,13 +12,6 @@ LOCAL_IP=172.17.0.1
# LOCAL_INTERFACE will be assigned the address from LOCAL_IP
LOCAL_INTERFACE=em2
### POWER_DRIVER ###
# OpenStack Nova Baremetal power driver to use for powering on/off Overcloud
# instances. Use IPMI for baremetal. For virsh based virtualization, you can
# use:
# POWER_DRIVER=nova.virt.baremetal.virtual_power_driver.VirtualPowerManager
POWER_DRIVER=nova.virt.baremetal.ipmi.IPMI
### MASQUERADE_NETWORK ###
# Network that will be masqueraded for external access if required.
MASQUERADE_NETWORK=172.17.0.0/16

View File

@ -12,24 +12,6 @@ LOCAL_IP=192.0.2.1
# LOCAL_INTERFACE will be assigned the address from LOCAL_IP
LOCAL_INTERFACE=eth1
### POWER_DRIVER ###
# OpenStack Nova Baremetal power driver to use for powering on/off Overcloud
# instances. Use IPMI for baremetal. For virsh based virtualization, you can
# use:
# POWER_DRIVER=nova.virt.baremetal.ipmi.IPMI
POWER_DRIVER=nova.virt.baremetal.virtual_power_driver.VirtualPowerManager
### VIRTUAL_POWER_USER ###
# When POWER_DRIVER is set to the VirtualPowerManager, the user to use to
# connect to VIRTUAL_POWER_HOST. Unused if POWER_DRIVER is IPMI. This is
# a user on your virsh host.
VIRTUAL_POWER_USER=stack
### VIRTUAL_POWER_HOST ###
# When POWER_DRIVER is set to the VirtualPowerManager, the virsh host to use
# for Overcloud instances. Unused if POWER_DRIVER is IPMI.
VIRTUAL_POWER_HOST=192.168.122.1
### SSH_KEY ###
# When POWER_DRIVER is set to the VirtualPowerManager, the ssh key to use to
# ssh to the virsh host. Unused if POWER_DRIVER is IPMI.

View File

@ -15,23 +15,15 @@ MEM=${MEM:-2048}
DISK=${DISK:-30}
ARCH=${ARCH:-amd64}
MACS=${MACS:-"52:54:00:b5:bd:f0 52:54:00:f2:be:f0"}
SSH_PM_USER=${SSH_PM_USER:-$USER}
SSH_PM_HOST=${SSH_PM_HOST:-"192.168.122.1"}
VIRTUAL_POWER_USER=${VIRTUAL_POWER_USER:-$USER}
VIRTUAL_POWER_HOST=${VIRTUAL_POWER_HOST:-"192.168.122.1"}
SSH_KEY=
PM_IPS=( ${PM_IPS:-} )
PM_USERS=( ${PM_USERS:-} )
PM_PASSWORDS=( ${PM_PASSWORDS:-} )
export USE_IRONIC=1
export ROOT_DISK=${ROOT_DISK:-10}
SSH_KEY=${SSH_KEY:-""}
if [ -z "$SSH_KEY" ]; then
echo \$SSH_KEY must be set.
exit 1
fi
SSH_PM_KEY=$(cat $SSH_KEY)
JSONFILE=nodes.json
rm -f $JSONFILE
echo '{}' > $JSONFILE
@ -42,7 +34,11 @@ for mac in $MACS; do
if [ -n "${PM_IPS:-}" -a -n "${PM_USERS:-}" -a -n "${PM_PASSWORDS:-}" ]; then
JSON=$(jq ".nodes=(.nodes + [{mac:[\"$mac\"], cpu:\"$CPU\", memory:\"$MEM\", disk:\"$DISK\", arch:\"$ARCH\", pm_user:\"$PM_USERS[$count]\", pm_addr:\"$PM_IPS[$count]\", pm_password:\"$PM_PASSWORDS[$count]\", pm_type:\"ipmi\"}])" <<< $JSON)
else
JSON=$(jq ".nodes=(.nodes + [{mac:[\"$mac\"], cpu:\"$CPU\", memory:\"$MEM\", disk:\"$DISK\", arch:\"$ARCH\", pm_user:\"$SSH_PM_USER\", pm_addr:\"$SSH_PM_HOST\", pm_password:\"$SSH_PM_KEY\", pm_type:\"pxe_ssh\"}])" <<< $JSON)
if [ ! -f "$SSH_KEY" ]; then
echo \$SSH_KEY must be the full file path to the virtual power key
exit 1
fi
JSON=$(jq ".nodes=(.nodes + [{mac:[\"$mac\"], cpu:\"$CPU\", memory:\"$MEM\", disk:\"$DISK\", arch:\"$ARCH\", pm_user:\"$VIRTUAL_POWER_USER\", pm_addr:\"$VIRTUAL_POWER_HOST\", pm_password:\"$(cat $SSH_KEY)\", pm_type:\"pxe_ssh\"}])" <<< $JSON)
fi
count=$((count + 1))
done