sg docker -c "docker pull mysql:5" || FATAL "cannot get mysql docker image"
fi
- echo "Pulling OSM docker images"
- for module in MON POL NBI KEYSTONE RO LCM NG-UI PLA osmclient Airflow; do
+ list_of_modules="MON NBI KEYSTONE RO LCM NG-UI osmclient"
+ if [ -n "$INSTALL_NGSA" ]; then
+ list_of_modules="${list_of_modules} Airflow Webhook"
+ else
+ list_of_modules="${list_of_modules} POL"
+ fi
+ if [ -n "$INSTALL_PLA" ]; then
+ list_of_modules="${list_of_modules} PLA"
+ fi
+ echo "Pulling OSM docker images for the following modules: ${list_of_modules}"
+ for module in ${list_of_modules}; do
module_lower=${module,,}
- if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then
- continue
- fi
module_tag="${OSM_DOCKER_TAG}"
if [ -n "${MODULE_DOCKER_TAG}" ] && echo $TO_REBUILD | grep -q $module ; then
module_tag="${MODULE_DOCKER_TAG}"
kubectl create secret generic ro-db-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/ro-db.env
kubectl create secret generic ro-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/ro.env
kubectl create secret generic keystone-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/keystone.env
- kubectl create secret generic pol-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/pol.env
if [ -n "${INSTALL_NGSA}" ]; then
kubectl create secret generic ngsa-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/ngsa.env
kubectl create secret generic webhook-translator-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/webhook-translator.env
+ else
+ kubectl create secret generic pol-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/pol.env
fi
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
#deploys osm pods and services
function deploy_osm_services() {
[ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
+ echo "The following manifests under $OSM_K8S_WORK_DIR will be deployed:"
+ ls $OSM_K8S_WORK_DIR
kubectl apply -n $OSM_NAMESPACE -f $OSM_K8S_WORK_DIR
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
for module in $services; do
if [ "$module" == "pla" ]; then
if [ -n "$INSTALL_PLA" ]; then
- echo "Updating K8s manifest file from opensourcemano\/pla:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/pla:${TAG}"
+ echo "Updating K8s manifest file for ${module} from opensourcemano\/pla:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/pla:${TAG}"
sudo sed -i "s#opensourcemano/pla:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/pla:${TAG}#g" ${OSM_DOCKER_WORK_DIR}/osm_pla/pla.yaml
fi
else
elif [ "$module" == "ng-mon" ]; then
image="mon"
fi
- echo "Updating K8s manifest file from opensourcemano\/${image}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${image}:${TAG}"
+ echo "Updating K8s manifest file for ${module} from opensourcemano\/${image}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${image}:${TAG}"
sudo sed -i "s#opensourcemano/${image}:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/${image}:${TAG}#g" ${OSM_K8S_WORK_DIR}/${module}.yaml
fi
done
}
function update_manifest_files() {
+ [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
osm_services="nbi lcm ro pol mon ng-mon ng-ui keystone pla prometheus ng-prometheus"
list_of_services=""
for module in $osm_services; do