# Generate helm values to be passed with -f osm-values.yaml
sudo mkdir -p ${OSM_HELM_WORK_DIR}
- sudo bash -c "cat << EOF > ${OSM_HELM_WORK_DIR}/osm-values.yaml
+ if [ -n "${INSTALL_JUJU}" ]; then
+ sudo bash -c "cat << EOF > ${OSM_HELM_WORK_DIR}/osm-values.yaml
vca:
pubkey: \"${OSM_VCA_PUBKEY}\"
EOF"
+ fi
# Generate helm values to be passed with --set
OSM_HELM_OPTS=""
# OSM_HELM_OPTS="${OSM_HELM_OPTS} --set nbi.useOsmSecret=false"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.repositoryBase=${DOCKER_REGISTRY_URL}${DOCKER_USER}"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set mysql.dbHostPath=${OSM_NAMESPACE_VOL}"
- OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.host=${OSM_VCA_HOST}"
- OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.secret=${OSM_VCA_SECRET}"
- OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.cacert=${OSM_VCA_CACERT}"
+ if [ -n "${INSTALL_JUJU}" ]; then
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.enabled=true"
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.host=${OSM_VCA_HOST}"
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.secret=${OSM_VCA_SECRET}"
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.cacert=${OSM_VCA_CACERT}"
+ fi
[ -n "$OSM_VCA_APIPROXY" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set lcm.config.OSMLCM_VCA_APIPROXY=${OSM_VCA_APIPROXY}"
[ ! "$OSM_DOCKER_TAG" == "testing-daily" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.tag=${OSM_DOCKER_TAG}"
[ -n "${INSTALL_NGSA}" ] || OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.oldServiceAssurance=true"
[ -n "${NO_PROXY}" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.httpProxy.NO_PROXY=${NO_PROXY}"
fi
- echo "helm -n $OSM_NAMESPACE install $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm -f ${OSM_HELM_WORK_DIR}/osm-values.yaml ${OSM_HELM_OPTS}"
- helm -n $OSM_NAMESPACE install $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm -f ${OSM_HELM_WORK_DIR}/osm-values.yaml ${OSM_HELM_OPTS}
-
+ if [ -n "${INSTALL_JUJU}" ]; then
+ OSM_HELM_OPTS="-f ${OSM_HELM_WORK_DIR}/osm-values.yaml ${OSM_HELM_OPTS}"
+ fi
+ echo "helm install -n $OSM_NAMESPACE --create-namespace $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm ${OSM_HELM_OPTS}"
+ helm install -n $OSM_NAMESPACE --create-namespace $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm ${OSM_HELM_OPTS}
# Override existing values.yaml with the final values.yaml used to install OSM
helm -n $OSM_NAMESPACE get values $OSM_NAMESPACE | sudo tee -a ${OSM_HELM_WORK_DIR}/osm-values.yaml
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
check_osm_behind_proxy
check_packages "git wget curl tar snapd"
- sudo snap install jq || FATAL "Could not install jq (snap package). Make sure that snap works"
+ if [ -n "${INSTALL_JUJU}" ]; then
+ sudo snap install jq || FATAL "Could not install jq (snap package). Make sure that snap works"
+ fi
find_devops_folder
track start release $RELEASE none none docker_tag $OSM_DOCKER_TAG none none installation_type $OSM_INSTALLATION_TYPE none none os_info $os_info none none
# configure apt proxy
[ -n "$APT_PROXY_URL" ] && configure_apt_proxy $APT_PROXY_URL
- # if no host is passed in, we need to install lxd, unless explicilty asked not to
- if [ -z "$OSM_VCA_HOST" ] && [ -z "$INSTALL_NOLXD" ] && [ -z "$LXD_CLOUD_FILE" ]; then
+ # if lxd is requested, we will install it
+ if [ -n "$INSTALL_LXD" ]; then
LXD_INSTALL_OPTS="-D ${OSM_DEVOPS} -i ${OSM_DEFAULT_IF} ${DEBUG_INSTALL}"
[ -n "${OSM_BEHIND_PROXY}" ] && LXD_INSTALL_OPTS="${LXD_INSTALL_OPTS} -P"
$OSM_DEVOPS/installers/install_lxd.sh ${LXD_INSTALL_OPTS} || FATAL_TRACK lxd "install_lxd.sh failed"
FATAL_TRACK k8scluster "install_kubeadm_cluster.sh failed"
track k8scluster k8scluster_ok
- JUJU_OPTS="-D ${OSM_DEVOPS} -s ${OSM_NAMESPACE} -i ${OSM_DEFAULT_IP} ${DEBUG_INSTALL} ${INSTALL_NOJUJU} ${INSTALL_CACHELXDIMAGES}"
- [ -n "${OSM_VCA_HOST}" ] && JUJU_OPTS="$JUJU_OPTS -H ${OSM_VCA_HOST}"
- [ -n "${LXD_CLOUD_FILE}" ] && JUJU_OPTS="$JUJU_OPTS -l ${LXD_CLOUD_FILE}"
- [ -n "${LXD_CRED_FILE}" ] && JUJU_OPTS="$JUJU_OPTS -L ${LXD_CRED_FILE}"
- [ -n "${CONTROLLER_NAME}" ] && JUJU_OPTS="$JUJU_OPTS -K ${CONTROLLER_NAME}"
- [ -n "${OSM_BEHIND_PROXY}" ] && JUJU_OPTS="${JUJU_OPTS} -P"
- $OSM_DEVOPS/installers/install_juju.sh ${JUJU_OPTS} || FATAL_TRACK juju "install_juju.sh failed"
- set_vca_variables
+ if [ -n "${INSTALL_JUJU}" ]; then
+ JUJU_OPTS="-D ${OSM_DEVOPS} -s ${OSM_NAMESPACE} -i ${OSM_DEFAULT_IP} ${DEBUG_INSTALL} ${INSTALL_CACHELXDIMAGES}"
+ [ -n "${OSM_VCA_HOST}" ] && JUJU_OPTS="$JUJU_OPTS -H ${OSM_VCA_HOST}"
+ [ -n "${LXD_CLOUD_FILE}" ] && JUJU_OPTS="$JUJU_OPTS -l ${LXD_CLOUD_FILE}"
+ [ -n "${LXD_CRED_FILE}" ] && JUJU_OPTS="$JUJU_OPTS -L ${LXD_CRED_FILE}"
+ [ -n "${CONTROLLER_NAME}" ] && JUJU_OPTS="$JUJU_OPTS -K ${CONTROLLER_NAME}"
+ [ -n "${OSM_BEHIND_PROXY}" ] && JUJU_OPTS="${JUJU_OPTS} -P"
+ $OSM_DEVOPS/installers/install_juju.sh ${JUJU_OPTS} || FATAL_TRACK juju "install_juju.sh failed"
+ set_vca_variables
+ fi
track juju juju_ok
# Deploy OSM services
echo "DOCKER_USER=$DOCKER_USER"
echo "INSTALL_CACHELXDIMAGES=$INSTALL_CACHELXDIMAGES"
echo "INSTALL_FROM_SOURCE=$INSTALL_FROM_SOURCE"
+ echo "INSTALL_JUJU=$INSTALL_JUJU"
echo "INSTALL_K8S_MONITOR=$INSTALL_K8S_MONITOR"
echo "INSTALL_LIGHTWEIGHT=$INSTALL_LIGHTWEIGHT"
echo "INSTALL_LXD=$INSTALL_LXD"
echo "INSTALL_NGSA=$INSTALL_NGSA"
echo "INSTALL_NODOCKER=$INSTALL_NODOCKER"
- echo "INSTALL_NOJUJU=$INSTALL_NOJUJU"
- echo "INSTALL_NOLXD=$INSTALL_NOLXD"
echo "INSTALL_ONLY=$INSTALL_ONLY"
echo "INSTALL_PLA=$INSTALL_PLA"
echo "INSTALL_TO_OPENSTACK=$INSTALL_TO_OPENSTACK"
OPENSTACK_PYTHON_VENV="$HOME/.virtual-envs/osm"
INSTALL_ONLY=""
TO_REBUILD=""
-INSTALL_NOLXD=""
INSTALL_NODOCKER=""
-INSTALL_NOJUJU=""
+INSTALL_JUJU=""
INSTALL_NOHOSTCLIENT=""
INSTALL_CACHELXDIMAGES=""
OSM_DEVOPS=
[ "${OPTARG}" == "reconfigure" ] && RECONFIGURE="y" && continue
[ "${OPTARG}" == "test" ] && TEST_INSTALLER="y" && continue
[ "${OPTARG}" == "lxdinstall" ] && INSTALL_LXD="y" && continue
- [ "${OPTARG}" == "nolxd" ] && INSTALL_NOLXD="y" && continue
+ [ "${OPTARG}" == "lxd" ] && INSTALL_LXD="y" && continue
+ [ "${OPTARG}" == "nolxd" ] && INSTALL_LXD="" && continue
[ "${OPTARG}" == "nodocker" ] && INSTALL_NODOCKER="y" && continue
[ "${OPTARG}" == "showopts" ] && SHOWOPTS="y" && continue
[ "${OPTARG}" == "nohostports" ] && NO_HOST_PORTS="y" && continue
- [ "${OPTARG}" == "nojuju" ] && INSTALL_NOJUJU="--nojuju" && continue
+ [ "${OPTARG}" == "juju" ] && INSTALL_JUJU="y" && continue
+ [ "${OPTARG}" == "nojuju" ] && INSTALL_JUJU="" && continue
[ "${OPTARG}" == "nodockerbuild" ] && DOCKER_NOBUILD="y" && continue
[ "${OPTARG}" == "nohostclient" ] && INSTALL_NOHOSTCLIENT="y" && continue
[ "${OPTARG}" == "pullimages" ] && continue
[ "${OPTARG}" == "charmed" ] && CHARMED="y" && OSM_INSTALLATION_TYPE="Charmed" && continue
[ "${OPTARG}" == "bundle" ] && continue
[ "${OPTARG}" == "k8s" ] && continue
- [ "${OPTARG}" == "lxd" ] && continue
[ "${OPTARG}" == "lxd-cred" ] && continue
[ "${OPTARG}" == "microstack" ] && continue
[ "${OPTARG}" == "overlay" ] && continue