summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1df2651)
Updates the juju version and also pins the charmed bundle
versions.
Increases the install timeout by checking for 10 minutes
where no services progress at all, vs 10 minutes total
time.
Fixes bug 1229
Change-Id: I95db91162ad646a2d04b351558ae5f8b64ea579c
Signed-off-by: beierlm <mark.beierl@canonical.com>
--lxd) LXD_CLOUD="$2" ;;
--lxd-cred) LXD_CREDENTIALS="$2" ;;
--microstack) MICROSTACK=y ;;
--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
--tag) TAG="$2" ;;
esac
shift
export KUBECONFIG=${KUBECFG}
KUBEGRP=$(id -g -n)
fi
export KUBECONFIG=${KUBECFG}
KUBEGRP=$(id -g -n)
fi
sudo snap install juju --classic --channel=2.8/stable
}
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 \
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 \
else
sg ${KUBEGRP} -c "echo ${DEFAULT_IP}-${DEFAULT_IP} | microk8s.enable metallb"
sg ${KUBEGRP} -c "microk8s.enable storage dns"
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
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..."
fi
echo "Waiting for deployment to finish..."
function check_osm_deployed() {
TIME_TO_WAIT=600
start_time="$(date -u +%s)"
function check_osm_deployed() {
TIME_TO_WAIT=600
start_time="$(date -u +%s)"
+ total_service_count=15
+ previous_count=0
while true
do
service_count=$(juju status | grep kubernetes | grep active | wc -l)
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 -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"
now="$(date -u +%s)"
if [[ $(( now - start_time )) -gt $TIME_TO_WAIT ]];then
echo "Timed out waiting for OSM services to become ready"
+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 "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 "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"
if ! juju show-controller $OSM_STACK_NAME &> /dev/null; then
# Not found created, create the controller
sudo usermod -a -G lxd ${USER}
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]
fi
[ $(juju controllers | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed"
juju controller-config features=[k8s-operators]