2021-10-29 09:57:19 +01:00
|
|
|
#!/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}"
|
2021-12-03 20:52:11 +00:00
|
|
|
juju config landscape-client-bionic ssl-public-key="base64:${landscape_crt}"
|
2021-10-29 09:57:19 +01:00
|
|
|
|
|
|
|
# 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"
|
2021-12-03 20:52:11 +00:00
|
|
|
juju config landscape-client-bionic url="https://${landscape_ip}/message-system" ping-url="http://${landscape_ip}/ping"
|
2021-10-29 09:57:19 +01:00
|
|
|
|
|
|
|
# May need to restart all the landscape-clients
|
|
|
|
#juju run --application landscape-client 'sudo systemctl restart landscape-client.service'
|
|
|
|
|