923bfe5e06
The references to Heat command are deprecated from Mitaka release and we should now be using the OpenStack CLI instead. Change-Id: Ib05e65b81c25ec695c59b9d443df69814728f67a Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
51 lines
1.1 KiB
Django/Jinja
51 lines
1.1 KiB
Django/Jinja
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
### --start_docs
|
|
## Post overcloud deployment steps
|
|
## ===============================
|
|
|
|
## * Prepare Your Environment.
|
|
## ::
|
|
|
|
HOSTFILE=/etc/hosts
|
|
|
|
## * Source in the undercloud credentials.
|
|
## ::
|
|
|
|
. {{ working_dir }}/stackrc
|
|
|
|
## * Remove any old overcloud host entries from `/etc/hosts`.
|
|
## ::
|
|
|
|
sudo sed -i '/^## BEGIN OVERCLOUD HOSTS/,/^## END OVERCLOUD HOSTS/ d' $HOSTFILE
|
|
|
|
## * Add overcloud hosts to `/etc/hosts`.
|
|
## ::
|
|
|
|
cat <<EOF | sudo tee -a $HOSTFILE
|
|
## BEGIN OVERCLOUD HOSTS #nodocs
|
|
$(openstack stack output show overcloud HostsEntry -f value -c output_value)
|
|
|
|
{% if enable_pacemaker|bool and release == 'mitaka' %}
|
|
$(openstack stack output show overcloud PublicVip \
|
|
-f value -c output_value) overcloud-public-vip
|
|
{% endif %}
|
|
## END OVERCLOUD HOSTS #nodocs
|
|
EOF
|
|
|
|
## * Source in the overcloud credentials.
|
|
## ::
|
|
|
|
. {{ working_dir }}/overcloudrc
|
|
|
|
## * Create the `heat_stack_owner` role if it doesn't already exist.
|
|
## ::
|
|
|
|
if ! openstack role show heat_stack_owner > /dev/null 2>&1; then
|
|
openstack role create heat_stack_owner
|
|
openstack role add --project admin --user admin heat_stack_owner
|
|
fi
|
|
### --stop_docs
|