# set -eux
+JUJU_AGENT_VERSION=2.8.6
K8S_CLOUD_NAME="k8s-cloud"
KUBECTL="microk8s.kubectl"
IMAGES_OVERLAY_FILE=~/.osm/images-overlay.yaml
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=$JUJU_AGENT_VERSION
else
sg ${KUBEGRP} -c "echo ${DEFAULT_IP}-${DEFAULT_IP} | microk8s.enable metallb"
sg ${KUBEGRP} -c "microk8s.enable ingress"
[ ! -v BOOTSTRAP_NEEDED ] && sg ${KUBEGRP} -c "microk8s.config" | juju add-k8s $K8S_CLOUD_NAME $ADD_K8S_OPTS
[ -v BOOTSTRAP_NEEDED ] && sg ${KUBEGRP} -c \
- "juju bootstrap microk8s $CONTROLLER_NAME --config controller-service-type=loadbalancer --agent-version=2.8.1" \
+ "juju bootstrap microk8s $CONTROLLER_NAME --config controller-service-type=loadbalancer --agent-version=$JUJU_AGENT_VERSION" \
&& K8S_CLOUD_NAME=microk8s
fi
value: mongo
- name: OSMPLA_MESSAGE_HOST
value: kafka
+ - name: OSMPLA_DATABASE_URI
+ value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
volumeMounts:
- name: osm-packages
mountPath: /app/storage
env:
- name: OSMLCM_RO_HOST
value: ro
- - name: OSMLCM_DATABASE_HOST
- value: mongodb-k8s
+ - name: OSMLCM_DATABASE_URI
+ value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
- name: OSMLCM_MESSAGE_HOST
value: kafka
envFrom:
- secretRef:
- name: lcm-secret
+ name: lcm-secret
volumeMounts:
- name: osm-packages
mountPath: /app/storage
volumes:
- name: osm-packages
hostPath:
- path: /var/lib/osm/osm_osm_packages/_data
+ path: /var/lib/osm/osm_osm_packages/_data
- name: prometheus-config
hostPath:
path: /var/lib/osm/prometheus
value: kafka
- name: OSMMON_MESSAGE_PORT
value: "9092"
+ - name: OSMMON_DATABASE_URI
+ value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
envFrom:
- secretRef:
name: mon-secret
- containerPort: 9999
protocol: TCP
env:
- - name: OSMNBI_DATABASE_HOST
- value: mongodb-k8s
- - name: OSMNBI_MESSAGE_HOST
- value: kafka
+ - name: OSMNBI_DATABASE_URI
+ value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
+ - name: OSMNBI_MESSAGE_HOST
+ value: kafka
envFrom:
- secretRef:
- name: nbi-secret
+ name: nbi-secret
volumeMounts:
- - name: osm-packages
- mountPath: /app/storage
+ - name: osm-packages
+ mountPath: /app/storage
volumes:
- - name: osm-packages
- hostPath:
+ - name: osm-packages
+ hostPath:
path: /var/lib/osm/osm_osm_packages/_data
value: kafka
- name: OSMPOL_MESSAGE_PORT
value: "9092"
+ - name: OSMPOL_DATABASE_URI
+ value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
envFrom:
- secretRef:
name: pol-secret