X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharmed_install.sh;h=85569a31aabfa67d8ab4fed059d838fd11a5f40d;hb=c8660adc8a84965b2d9b2569275c88a2749f318f;hp=16d6d731d7383201a9fd04485d98ae39d8a8a9b1;hpb=ef349d9224f93fcc3eeb7a26f71c6a128ffbf96a;p=osm%2Fdevops.git diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index 16d6d731..85569a31 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -303,18 +303,16 @@ function check_osm_deployed() { function create_overlay() { sudo snap install jq - sudo apt install python3-pip -y - python3 -m pip install yq - PATH=$PATH:$HOME/.local/bin # make yq command available + sudo snap install yq local HOME=/home/$USER - local vca_user=$(cat $HOME/.local/share/juju/accounts.yaml | yq --arg CONTROLLER_NAME $CONTROLLER_NAME '.controllers[$CONTROLLER_NAME].user') - local vca_password=$(cat $HOME/.local/share/juju/accounts.yaml | yq --arg CONTROLLER_NAME $CONTROLLER_NAME '.controllers[$CONTROLLER_NAME].password') - local vca_host=$(cat $HOME/.local/share/juju/controllers.yaml | yq --arg CONTROLLER_NAME $CONTROLLER_NAME '.controllers[$CONTROLLER_NAME]["api-endpoints"][0]' --raw-output | cut -d ":" -f 1) - local vca_port=$(cat $HOME/.local/share/juju/controllers.yaml | yq --arg CONTROLLER_NAME $CONTROLLER_NAME '.controllers[$CONTROLLER_NAME]["api-endpoints"][0]' --raw-output | cut -d ":" -f 2) + local vca_user=$(cat $HOME/.local/share/juju/accounts.yaml | yq r - controllers.$CONTROLLER_NAME.user) + local vca_password=$(cat $HOME/.local/share/juju/accounts.yaml | yq r - controllers.$CONTROLLER_NAME.password) + local vca_host=$(cat $HOME/.local/share/juju/controllers.yaml | yq r - controllers.$CONTROLLER_NAME.api-endpoints[0] | cut -d ":" -f 1) + local vca_port=$(cat $HOME/.local/share/juju/controllers.yaml | yq r - controllers.$CONTROLLER_NAME.api-endpoints[0] | cut -d ":" -f 2) local vca_pubkey=\"$(cat $HOME/.local/share/juju/ssh/juju_id_rsa.pub)\" local vca_cloud="lxd-cloud" # Get the VCA Certificate - local vca_cacert=$(cat $HOME/.local/share/juju/controllers.yaml | yq --arg CONTROLLER_NAME $CONTROLLER_NAME '.controllers[$CONTROLLER_NAME]["ca-cert"]' --raw-output | base64 | tr -d \\n) + local vca_cacert=$(cat $HOME/.local/share/juju/controllers.yaml | yq r - controllers.$CONTROLLER_NAME.ca-cert | base64 | tr -d \\n) # Calculate the default route of this machine local DEFAULT_IF=`ip route list match 0.0.0.0 | awk '{print $5}'`