31 lines
1.2 KiB
Bash
Executable File
31 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
juju_status_json=$(juju status --format json)
|
|
|
|
# ldap
|
|
for i in `seq 1 3`; do
|
|
ldap_ip=$(echo $juju_status_json | jq -r .applications[\"ldap-domain${i}\"].units[][\"public-address\"])
|
|
juju config keystone-ldap-domain${i} ldap-server=ldap://${ldap_ip}
|
|
done
|
|
|
|
# landscape
|
|
landscape_ip=$(echo $juju_status_json | jq -r .applications[\"landscape-haproxy\"].units[][\"public-address\"])
|
|
|
|
juju run --all "echo ${landsape_ip} landscape.example.com | sudo tee -a /etc/hosts"
|
|
|
|
# fix ceilometer, so that it can get to keystone
|
|
juju run -a ceilometer "echo 10.0.1.216 keystone.example.com | sudo tee -a /etc/hosts"
|
|
juju run-action ceilometer/leader ceilometer-upgrade
|
|
|
|
# ensure openstack-service-checks can get to keystone
|
|
juju run -a openstack-service-checks "echo 10.0.1.216 keystone.example.com | sudo tee -a /etc/hosts"
|
|
juju run -a openstack-service-checks "echo 10.0.1.216 keystone-internal.example.com | sudo tee -a /etc/hosts"
|
|
|
|
# ensure ceph-osd can get to vault
|
|
juju run -a ceph-osd "echo 10.0.1.222 vault.example.com | sudo tee -a /etc/hosts"
|
|
juju run -a ceph-osd "echo 10.0.1.222 vault-internal.example.com | sudo tee -a /etc/hosts"
|
|
|
|
# Ensure heat domain, role and users have been set up
|
|
juju run-action --wait heat/leader domain-setup
|
|
|