X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Finstall_juju.sh;h=26de8ddfdec84d3709d02758a52b8e4374f5311e;hb=7735f6a86e290c0c15c4f41f5f81b5930b14cc73;hp=72c08ceedbfda983c8c6d4b4efe9614768ba4847;hpb=1f2e2e981dba00a2bd37182a74e622b3eb1acdc0;p=osm%2Fdevops.git diff --git a/installers/install_juju.sh b/installers/install_juju.sh index 72c08cee..26de8ddf 100755 --- a/installers/install_juju.sh +++ b/installers/install_juju.sh @@ -80,21 +80,14 @@ clouds: ssl-hostname-verification: false EOF openssl req -nodes -new -x509 -keyout /tmp/.osm/client.key -out /tmp/.osm/client.crt -days 365 -subj "/C=FR/ST=Nice/L=Nice/O=ETSI/OU=OSM/CN=osm.etsi.org" - local server_cert=`cat /var/snap/lxd/common/lxd/server.crt | sed 's/^/ /'` - local client_cert=`cat /tmp/.osm/client.crt | sed 's/^/ /'` - local client_key=`cat /tmp/.osm/client.key | sed 's/^/ /'` - cat << EOF > $LXD_CREDENTIALS credentials: $OSM_VCA_CLOUDNAME: lxd-cloud: auth-type: certificate - server-cert: | -$server_cert - client-cert: | -$client_cert - client-key: | -$client_key + server-cert: /var/snap/lxd/common/lxd/server.crt + client-cert: /tmp/.osm/client.crt + client-key: /tmp/.osm/client.key EOF lxc config trust add local: /tmp/.osm/client.crt juju add-cloud -c $OSM_STACK_NAME $OSM_VCA_CLOUDNAME $LXD_CLOUD --force @@ -104,18 +97,6 @@ EOF [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } -function juju_createcontroller() { - [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function - if ! juju show-controller $OSM_STACK_NAME &> /dev/null; then - # Controller not found, create the controller - sudo usermod -a -G lxd ${USER} - sg lxd -c "juju bootstrap -v --debug --bootstrap-series=xenial --agent-version=$JUJU_AGENT_VERSION $OSM_VCA_CLOUDNAME $OSM_STACK_NAME" - fi - [ $(juju controllers | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed" - juju controller-config features=[k8s-operators] - [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function -} - #Safe unattended install of iptables-persistent function check_install_iptables_persistent(){ [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function @@ -143,7 +124,7 @@ function juju_createproxy() { DEBUG_INSTALL="" INSTALL_CACHELXDIMAGES="" INSTALL_NOJUJU="" -JUJU_AGENT_VERSION=2.9.22 +JUJU_AGENT_VERSION=2.9.35 JUJU_VERSION=2.9 OSM_DEVOPS= OSM_STACK_NAME=osm @@ -221,7 +202,6 @@ if [ -z "$OSM_VCA_HOST" ]; then juju add-cloud $OSM_VCA_CLOUDNAME $LXD_CLOUD_FILE --force || juju update-cloud $OSM_VCA_CLOUDNAME --client -f $LXD_CLOUD_FILE juju add-credential $OSM_VCA_CLOUDNAME -f $LXD_CRED_FILE || juju update-credential $OSM_VCA_CLOUDNAME lxd-cloud-creds -f $LXD_CRED_FILE fi - juju_createcontroller juju_createproxy else OSM_VCA_CLOUDNAME="lxd-cloud"