Merge "Drop USE_IRONIC from tripleo-incubator"
This commit is contained in:
commit
4e2c7447e7
@ -29,14 +29,9 @@ export IMAGE_NAME=seed
|
||||
export DIB_IMAGE_SIZE=30
|
||||
BUILD_ONLY=
|
||||
CREATE_IMAGE=yes
|
||||
ALWAYS_ELEMENTS="vm cloud-init-nocloud local-config boot-stack seed-stack-config"
|
||||
ALWAYS_ELEMENTS="vm cloud-init-nocloud local-config boot-stack seed-stack-config nova-ironic"
|
||||
DIB_COMMON_ELEMENTS=${DIB_COMMON_ELEMENTS:-''}
|
||||
SEED_DIB_EXTRA_ARGS=${SEED_DIB_EXTRA_ARGS:-'rabbitmq-server'}
|
||||
if [ $USE_IRONIC -eq 0 ]; then
|
||||
SEED_DIB_EXTRA_ARGS="$SEED_DIB_EXTRA_ARGS nova-baremetal"
|
||||
else
|
||||
SEED_DIB_EXTRA_ARGS="$SEED_DIB_EXTRA_ARGS nova-ironic"
|
||||
fi
|
||||
|
||||
if [ "${USE_MARIADB:-}" = 1 ] ; then
|
||||
SEED_DIB_EXTRA_ARGS="$SEED_DIB_EXTRA_ARGS mariadb-rpm"
|
||||
|
@ -82,55 +82,26 @@ cd $TRIPLEO_ROOT/tripleo-image-elements/elements/seed-stack-config
|
||||
## #. Ironic and Nova-Baremetal require different metadata to operate.
|
||||
## ::
|
||||
|
||||
if [ $USE_IRONIC -eq 0 ]; then
|
||||
# Unsets .ironic as it's unused.
|
||||
# TODO replace "ironic": {} with del(.ironic) when jq 1.3 is widely available.
|
||||
# Sets:
|
||||
# - bm node arch
|
||||
# - bm power manager
|
||||
# - ssh power host
|
||||
# - ssh power key
|
||||
# - ssh power user
|
||||
jq -s '
|
||||
.[1] as $config
|
||||
| .[0]
|
||||
| .nova.baremetal as $bm
|
||||
| . + {
|
||||
"ironic": {},
|
||||
"nova": (.nova + {
|
||||
"baremetal": ($bm + {
|
||||
"arch": $config.arch,
|
||||
"power_manager": $config.power_manager,
|
||||
"virtual_power": ($bm.virtual_power + {
|
||||
"user": $config["ssh-user"],
|
||||
"ssh_host": $config["host-ip"],
|
||||
"ssh_key": $config["ssh-key"]
|
||||
})
|
||||
})
|
||||
})
|
||||
}' config.json $TE_DATAFILE > tmp_local.json
|
||||
else
|
||||
# Unsets .nova.baremetal as it's unused.
|
||||
# TODO replace "baremetal": {} with del(.baremetal) when jq 1.3 is widely available.
|
||||
# Sets:
|
||||
# - ironic.virtual_power_ssh_key.
|
||||
# - nova.compute_driver to ironic.nova.virt.ironic.driver.IronicDriver.
|
||||
# - nova.compute_manager to avoid race conditions on ironic startup.
|
||||
jq -s '
|
||||
.[1] as $config
|
||||
| .[0]
|
||||
| . + {
|
||||
"ironic": (.ironic + {
|
||||
"virtual_power_ssh_key": $config["ssh-key"],
|
||||
}),
|
||||
"nova": (.nova + {
|
||||
"baremetal": {},
|
||||
"compute_driver": "nova.virt.ironic.driver.IronicDriver",
|
||||
"compute_manager": "ironic.nova.compute.manager.ClusteredComputeManager",
|
||||
"scheduler_host_manager": "nova.scheduler.ironic_host_manager.IronicHostManager",
|
||||
})
|
||||
}' config.json $TE_DATAFILE > tmp_local.json
|
||||
fi
|
||||
jq -s '
|
||||
.[1] as $config
|
||||
| .[0]
|
||||
| . + {
|
||||
"ironic": (.ironic + {
|
||||
"virtual_power_ssh_key": $config["ssh-key"],
|
||||
}),
|
||||
"nova": (.nova + {
|
||||
"baremetal": {},
|
||||
"compute_driver": "nova.virt.ironic.driver.IronicDriver",
|
||||
"compute_manager": "ironic.nova.compute.manager.ClusteredComputeManager",
|
||||
"scheduler_host_manager": "nova.scheduler.ironic_host_manager.IronicHostManager",
|
||||
})
|
||||
}' config.json $TE_DATAFILE > tmp_local.json
|
||||
|
||||
# Add Keystone certs/key into the environment file
|
||||
generate-keystone-pki --heatenv tmp_local.json -s
|
||||
@ -288,15 +259,6 @@ set -u #nodocs
|
||||
|
||||
source $TRIPLEO_ROOT/tripleo-incubator/seedrc
|
||||
|
||||
## #. If Ironic is in use, we need to setup a user for it.
|
||||
## ::
|
||||
|
||||
if [ $USE_IRONIC -eq 0 ]; then
|
||||
IRONIC_OPT=
|
||||
else
|
||||
IRONIC_OPT="--ironic-password unset"
|
||||
fi
|
||||
|
||||
## #. Perform setup of your seed cloud.
|
||||
## ::
|
||||
|
||||
@ -313,7 +275,7 @@ wait_for -w 20 --delay 1 -- ping -c 1 $BM_NETWORK_SEED_IP
|
||||
ssh-keyscan -t rsa $BM_NETWORK_SEED_IP | tee -a ~/.ssh/known_hosts | grep -q "^$BM_NETWORK_SEED_IP ssh-rsa "
|
||||
|
||||
init-keystone -o $BM_NETWORK_SEED_IP -t unset -e admin@example.com -p unset --no-pki-setup
|
||||
setup-endpoints $BM_NETWORK_SEED_IP --glance-password unset --heat-password unset --neutron-password unset --nova-password unset $IRONIC_OPT
|
||||
setup-endpoints $BM_NETWORK_SEED_IP --glance-password unset --heat-password unset --neutron-password unset --nova-password unset --ironic-password unset
|
||||
openstack role create heat_stack_user
|
||||
# Creating these roles to be used by tenants using swift
|
||||
openstack role create swiftoperator
|
||||
|
@ -69,23 +69,13 @@ fi
|
||||
## devtest_undercloud
|
||||
## ==================
|
||||
|
||||
## #. Specify whether to use the nova-baremetal or nova-ironic drivers
|
||||
## for provisioning within the undercloud.
|
||||
## ::
|
||||
|
||||
if [ "$USE_IRONIC" -eq 0 ] ; then
|
||||
UNDERCLOUD_DIB_EXTRA_ARGS="$UNDERCLOUD_DIB_EXTRA_ARGS nova-baremetal"
|
||||
else
|
||||
UNDERCLOUD_DIB_EXTRA_ARGS="$UNDERCLOUD_DIB_EXTRA_ARGS nova-ironic"
|
||||
fi
|
||||
|
||||
## #. Add extra elements for Undercloud UI
|
||||
## ::
|
||||
|
||||
if [ "$USE_UNDERCLOUD_UI" -ne 0 ] ; then
|
||||
UNDERCLOUD_DIB_EXTRA_ARGS="$UNDERCLOUD_DIB_EXTRA_ARGS ceilometer-collector \
|
||||
ceilometer-api ceilometer-agent-central ceilometer-agent-notification \
|
||||
ceilometer-undercloud-config horizon"
|
||||
ceilometer-undercloud-config horizon nova-ironic"
|
||||
fi
|
||||
|
||||
## #. Specifiy a client-side timeout in minutes for creating or updating the
|
||||
@ -226,34 +216,22 @@ fi
|
||||
## and different options.
|
||||
## ::
|
||||
|
||||
if [ "$USE_IRONIC" -eq 0 ] ; then
|
||||
if [ -n "$VLAN_ID" ]; then
|
||||
echo "VLANs not supported with Nova-BM" >&2
|
||||
exit 1
|
||||
fi
|
||||
HEAT_UNDERCLOUD_TEMPLATE="undercloud-vm.yaml"
|
||||
ENV_JSON=$(jq .parameters.PowerSSHHost=\"${POWER_HOST}\" <<< $ENV_JSON)
|
||||
ENV_JSON=$(jq .parameters.PowerManager=\"${POWER_MANAGER}\" <<< $ENV_JSON)
|
||||
ENV_JSON=$(jq .parameters.PowerUserName=\"${POWER_USER}\" <<< $ENV_JSON)
|
||||
REGISTER_SERVICE_OPTS=""
|
||||
if [ -n "$VLAN_ID" ]; then
|
||||
HEAT_UNDERCLOUD_TEMPLATE="undercloud-vm-ironic-vlan.yaml"
|
||||
ENV_JSON=$(jq .parameters.NeutronPublicInterfaceTag=\"${VLAN_ID}\" <<< $ENV_JSON)
|
||||
# This should be in the heat template, but see
|
||||
# https://bugs.launchpad.net/heat/+bug/1336656
|
||||
# note that this will break if there are more than one subnet, as if
|
||||
# more reason to fix the bug is needed :).
|
||||
PUBLIC_SUBNET_ID=$(neutron net-show public | awk '/subnets/ { print $4 }')
|
||||
VLAN_GW=$(neutron subnet-show $PUBLIC_SUBNET_ID | awk '/gateway_ip/ { print $4}')
|
||||
BM_VLAN_CIDR=$(neutron subnet-show $PUBLIC_SUBNET_ID | awk '/cidr/ { print $4}')
|
||||
ENV_JSON=$(jq .parameters.NeutronPublicInterfaceDefaultRoute=\"${VLAN_GW}\" <<< $ENV_JSON)
|
||||
else
|
||||
if [ -n "$VLAN_ID" ]; then
|
||||
HEAT_UNDERCLOUD_TEMPLATE="undercloud-vm-ironic-vlan.yaml"
|
||||
ENV_JSON=$(jq .parameters.NeutronPublicInterfaceTag=\"${VLAN_ID}\" <<< $ENV_JSON)
|
||||
# This should be in the heat template, but see
|
||||
# https://bugs.launchpad.net/heat/+bug/1336656
|
||||
# note that this will break if there are more than one subnet, as if
|
||||
# more reason to fix the bug is needed :).
|
||||
PUBLIC_SUBNET_ID=$(neutron net-show public | awk '/subnets/ { print $4 }')
|
||||
VLAN_GW=$(neutron subnet-show $PUBLIC_SUBNET_ID | awk '/gateway_ip/ { print $4}')
|
||||
BM_VLAN_CIDR=$(neutron subnet-show $PUBLIC_SUBNET_ID | awk '/cidr/ { print $4}')
|
||||
ENV_JSON=$(jq .parameters.NeutronPublicInterfaceDefaultRoute=\"${VLAN_GW}\" <<< $ENV_JSON)
|
||||
else
|
||||
HEAT_UNDERCLOUD_TEMPLATE="undercloud-vm-ironic.yaml"
|
||||
fi
|
||||
ENV_JSON=$(jq .parameters.IronicPassword=\"${UNDERCLOUD_IRONIC_PASSWORD}\" <<< $ENV_JSON)
|
||||
REGISTER_SERVICE_OPTS="--ironic-password $UNDERCLOUD_IRONIC_PASSWORD"
|
||||
HEAT_UNDERCLOUD_TEMPLATE="undercloud-vm-ironic.yaml"
|
||||
fi
|
||||
ENV_JSON=$(jq .parameters.IronicPassword=\"${UNDERCLOUD_IRONIC_PASSWORD}\" <<< $ENV_JSON)
|
||||
REGISTER_SERVICE_OPTS="--ironic-password $UNDERCLOUD_IRONIC_PASSWORD"
|
||||
|
||||
STACKNAME_UNDERCLOUD=${STACKNAME_UNDERCLOUD:-'undercloud'}
|
||||
|
||||
|
@ -71,18 +71,6 @@ fi
|
||||
|
||||
export USE_UNDERCLOUD_UI=${USE_UNDERCLOUD_UI:-1}
|
||||
|
||||
## #. Ironic is used as the default baremetal deployment layer. To use the
|
||||
## deprecated Nova-Baremetal deployment layer set USE_IRONIC=0.
|
||||
## Note however that as Nova-Baremetal is deprecated in Nova and TripleO
|
||||
## support for it will be removed once it is removed from Nova.
|
||||
## ::
|
||||
|
||||
export USE_IRONIC=${USE_IRONIC:-1}
|
||||
|
||||
if [ 0 -eq "$USE_IRONIC" ]; then
|
||||
echo "Nova-baremetal is deprecated, please migrate to Ironic ASAP." >&2
|
||||
fi
|
||||
|
||||
## #. Set a list of image elements that should be included in all image builds.
|
||||
## Note that stackuser is only for debugging support - it is not suitable for
|
||||
## a production network. This is also the place to include elements such as
|
||||
@ -101,19 +89,12 @@ export DIB_COMMON_ELEMENTS=${DIB_COMMON_ELEMENTS:-"stackuser common-venv use-eph
|
||||
## #. Choose the deploy image element to be used. `deploy-kexec` will relieve you of
|
||||
## the need to wait for long hardware POST times, however it has known stability
|
||||
## issues (please see https://bugs.launchpad.net/diskimage-builder/+bug/1240933).
|
||||
## If stability is preferred over speed, use the `deploy-baremetal` image
|
||||
## element (default) or `deploy-ironic` if using ironic.
|
||||
## If stability is preferred over speed, use the `deploy-ironic` image
|
||||
## element.
|
||||
## ::
|
||||
|
||||
if [ $USE_IRONIC -eq 0 ]; then
|
||||
# nova baremetal
|
||||
export DEPLOY_IMAGE_ELEMENT=${DEPLOY_IMAGE_ELEMENT:-deploy-baremetal}
|
||||
export DEPLOY_NAME=deploy-ramdisk
|
||||
else
|
||||
# Ironic
|
||||
export DEPLOY_IMAGE_ELEMENT=${DEPLOY_IMAGE_ELEMENT:-deploy-ironic}
|
||||
export DEPLOY_NAME=deploy-ramdisk-ironic
|
||||
fi
|
||||
export DEPLOY_IMAGE_ELEMENT=${DEPLOY_IMAGE_ELEMENT:-deploy-ironic}
|
||||
export DEPLOY_NAME=deploy-ramdisk-ironic
|
||||
|
||||
## #. A messaging backend is required for the seed, undercloud, and overcloud
|
||||
## control node. It is not required for overcloud computes. The backend is
|
||||
|
@ -69,14 +69,8 @@ if [ -z "$JSON_PATH" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $USE_IRONIC -eq 0 ]; then
|
||||
deploy_base=deploy-ramdisk
|
||||
else
|
||||
deploy_base=deploy-ramdisk-ironic
|
||||
fi
|
||||
|
||||
deploy_kernel=$TRIPLEO_ROOT/$deploy_base.kernel
|
||||
deploy_ramdisk=$TRIPLEO_ROOT/$deploy_base.initramfs
|
||||
deploy_kernel=$TRIPLEO_ROOT/deploy-ramdisk-ironic.kernel
|
||||
deploy_ramdisk=$TRIPLEO_ROOT/deploy-ramdisk-ironic.initramfs
|
||||
if ! nova image-show bm-deploy-kernel > /dev/null ; then
|
||||
deploy_kernel_id=$(glance image-create --name bm-deploy-kernel --visibility public \
|
||||
--disk-format aki --container-format aki < "$deploy_kernel" | awk ' / id / {print $4}')
|
||||
|
@ -99,7 +99,6 @@ SEED_DIB_EXTRA_ARGS
|
||||
TE_DATAFILE
|
||||
TRIPLEO_ROOT
|
||||
UNDERCLOUD_DIB_EXTRA_ARGS
|
||||
USE_IRONIC
|
||||
USE_UNDERCLOUD_UI"
|
||||
|
||||
for env_var in $ENV_VARS; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user