cpe-deployments/scripts/arif-scripts/update_landscape_certs_self.sh
Arif Ali 57ab46abff Update configs
* Add mysql-router relations
* Add telegraf grafana dashboard relation
* update neutron-agent config
* Add extra juju config for landscape-client-bionic
2021-12-03 20:52:11 +00:00

16 lines
924 B
Bash
Executable File

#!/bin/bash
# This is when landscape-haproxy the cert is SELFSIGNED. This will ensure that landscape will work
landscape_crt=$(juju run --application landscape-haproxy 'sudo openssl x509 -in /var/lib/haproxy/default.pem' | base64)
juju config landscape-client ssl-public-key="base64:${landscape_crt}"
juju config landscape-client-bionic ssl-public-key="base64:${landscape_crt}"
# And yes, this needs to use the IP address, otherwise the the registration will fail
landscape_ip=$(juju run --application landscape-haproxy 'unit-get private-address')
juju config landscape-client url="https://${landscape_ip}/message-system" ping-url="http://${landscape_ip}/ping"
juju config landscape-client-bionic url="https://${landscape_ip}/message-system" ping-url="http://${landscape_ip}/ping"
# May need to restart all the landscape-clients
#juju run --application landscape-client 'sudo systemctl restart landscape-client.service'