--lxd) LXD_CLOUD="$2" ;;
--lxd-cred) LXD_CREDENTIALS="$2" ;;
--microstack) MICROSTACK=y ;;
- --ha) BUNDLE="osm-ha" ;;
+ --ha) BUNDLE="cs:osm-ha-39" ;;
--tag) TAG="$2" ;;
esac
shift
export KUBECONFIG=${KUBECFG}
KUBEGRP=$(id -g -n)
fi
+ sleep 10
sudo snap install juju --classic --channel=2.8/stable
}
cat $KUBECFG | juju add-k8s $K8S_CLOUD_NAME $ADD_K8S_OPTS
[ -v BOOTSTRAP_NEEDED ] && juju bootstrap $K8S_CLOUD_NAME $CONTROLLER_NAME \
--config controller-service-type=loadbalancer \
- --agent-version=2.8.1
+ --agent-version=2.8.3
else
sg ${KUBEGRP} -c "echo ${DEFAULT_IP}-${DEFAULT_IP} | microk8s.enable metallb"
sg ${KUBEGRP} -c "microk8s.enable storage dns"
if [ -v BUNDLE ]; then
juju deploy $BUNDLE --overlay ~/.osm/vca-overlay.yaml $images_overlay
else
- juju deploy osm --overlay ~/.osm/vca-overlay.yaml $images_overlay
+ juju deploy cs:osm-49 --overlay ~/.osm/vca-overlay.yaml $images_overlay
fi
echo "Waiting for deployment to finish..."
function check_osm_deployed() {
TIME_TO_WAIT=600
start_time="$(date -u +%s)"
- total_service_count=14
+ total_service_count=15
+ previous_count=0
while true
do
service_count=$(juju status | grep kubernetes | grep active | wc -l)
if [ $service_count -eq $total_service_count ]; then
break
fi
+ if [ $service_count -ne $previous_count ]; then
+ previous_count=$service_count
+ start_time="$(date -u +%s)"
+ fi
now="$(date -u +%s)"
if [[ $(( now - start_time )) -gt $TIME_TO_WAIT ]];then
echo "Timed out waiting for OSM services to become ready"
install_microstack
fi
+OSM_HOSTNAME=$(juju config nbi-k8s juju-external-hostname):443
+
echo "Your installation is now complete, follow these steps for configuring the osmclient:"
echo
echo "1. Create the OSM_HOSTNAME environment variable with the NBI IP"
echo
-echo "export OSM_HOSTNAME=nbi.$API_SERVER.xip.io:443"
+echo "export OSM_HOSTNAME=$OSM_HOSTNAME"
echo
echo "2. Add the previous command to your .bashrc for other Shell sessions"
echo
-echo "echo \"export OSM_HOSTNAME=nbi.$API_SERVER.xip.io:443\" >> ~/.bashrc"
+echo "echo \"export OSM_HOSTNAME=$OSM_HOSTNAME\" >> ~/.bashrc"
echo
echo "DONE"
if ! juju show-controller $OSM_STACK_NAME &> /dev/null; then
# Not found created, create the controller
sudo usermod -a -G lxd ${USER}
- sg lxd -c "juju bootstrap --bootstrap-series=xenial --agent-version=2.8.1 $OSM_VCA_CLOUDNAME $OSM_STACK_NAME"
+ sg lxd -c "juju bootstrap --bootstrap-series=xenial --agent-version=2.8.3 $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]