3 COMPUTE_USER=${COMPUTE_USER:-heat-admin}
4 ssh_opts_cpu="$ssh_opts -i instack_key"
6 function get_installer_ip {
7 is_set INSTALLER_IP && return
8 INSTALLER_IP=$(get_first_vnic_ip instack)
11 function installer_get_ssh_keys {
12 sudo scp $ssh_opts "root@$INSTALLER_IP:/home/stack/.ssh/id_rsa" instack_key
13 sudo chown $(whoami):$(whoami) instack_key
17 function get_controller_ips {
18 is_set CONTROLLER_IPS && return
20 CONTROLLER_IPS=$(sudo ssh $ssh_opts $INSTALLER_IP \
22 nova list | grep ' overcloud-controller-[0-9] ' | \
23 sed -e 's/^.*ctlplane=//' -e 's/ *|\$//'")
24 die_if_not_set $LINENO CONTROLLER_IPS "No controller IPs"
27 function setup_installer {
29 installer_get_ssh_keys
32 # NOTE: while executing command as doctor user,
33 # 'OS_PROJECT_ID' env parameter make openstack clients confused.
37 function get_compute_ip_from_hostname {
40 compute_host_in_undercloud=${compute_host%%.*}
41 COMPUTE_IP=$(sudo ssh $ssh_opts $INSTALLER_IP \
43 nova show $compute_host_in_undercloud | \
44 awk '/ ctlplane network /{print \$5}'")
45 die_if_not_set $LINENO COMPUTE_IP "Could get IP address of $compute_host."
48 function cleanup_installer {