-
- # POL
- if [ ! -f $OSM_DOCKER_WORK_DIR/pol.env ]; then
- echo "OSMPOL_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/pol" | sudo tee -a $OSM_DOCKER_WORK_DIR/pol.env
- fi
-
- echo "Finished generation of docker env files"
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-#creates secrets from env files which will be used by containers
-function kube_secrets(){
- [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- kubectl create ns $OSM_STACK_NAME
- kubectl create secret generic lcm-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/lcm.env
- kubectl create secret generic mon-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/mon.env
- kubectl create secret generic nbi-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/nbi.env
- kubectl create secret generic ro-db-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/ro-db.env
- kubectl create secret generic ro-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/ro.env
- kubectl create secret generic keystone-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/keystone.env
- kubectl create secret generic pol-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/pol.env
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-#deploys osm pods and services
-function deploy_osm_services() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- kubectl apply -n $OSM_STACK_NAME -f $OSM_K8S_WORK_DIR
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-#deploy charmed services
-function deploy_charmed_services() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- juju add-model $OSM_STACK_NAME $OSM_VCA_K8S_CLOUDNAME
- juju deploy ch:mongodb-k8s -m $OSM_STACK_NAME
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-function deploy_osm_pla_service() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- # corresponding to namespace_vol
- sudo sed -i "s#path: /var/lib/osm#path: $OSM_NAMESPACE_VOL#g" $OSM_DOCKER_WORK_DIR/osm_pla/pla.yaml
- # corresponding to deploy_osm_services
- kubectl apply -n $OSM_STACK_NAME -f $OSM_DOCKER_WORK_DIR/osm_pla