ARG REPOSITORY=testing
RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
-RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} RO IM common openvim" && apt-get update
+RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} RO IM common" && apt-get update
ARG RO_VERSION
ARG IM_VERSION
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-osm-im${IM_VERSION} \
python3-osm-ro-plugin${RO_VERSION} \
- python3-osm-ro${RO_VERSION} python3-osm-roclient${RO_VERSION} \
+ python3-osm-ro${RO_VERSION} python3-osm-roclient${RO_VERSION} python3-osm-ng-ro${RO_VERSION} \
python3-osm-rosdn-arista-cloudvision${RO_VERSION} python3-osm-rosdn-dpb${RO_VERSION} \
python3-osm-rosdn-dynpac${RO_VERSION} python3-osm-rosdn-floodlightof${RO_VERSION} \
python3-osm-rosdn-ietfl2vpn${RO_VERSION} python3-osm-rosdn-juniper-contrail${RO_VERSION} \
ENV RO_DB_OVIM_NAME=mano_vim_db
ENV OPENMANO_TENANT=osm
+# database
+ENV OSMRO_DATABASE_DRIVER mongo
+ENV OSMRO_DATABASE_URI mongodb://mongo:27017
+# ENV OSMRO_DATABASE_COMMONKEY xxx
+# ENV OSMRO_DATABASE_USER xxx
+# ENV OSMRO_DATABASE_PASSWORD xxx
+
+# message
+ENV OSMRO_MESSAGE_DRIVER kafka
+ENV OSMRO_MESSAGE_HOST kafka
+ENV OSMRO_MESSAGE_PORT 9092
+
+# logs
+ENV OSMRO_LOG_LEVEL INFO
+
HEALTHCHECK --start-period=130s --interval=10s --timeout=5s --retries=12 \
- CMD curl --silent --fail localhost:9090/openmano/tenants || exit 1
-CMD /usr/bin/RO-start.sh
+ CMD curl --silent --fail http://localhost:9090/ro || exit 1
+ # CMD curl --silent --fail localhost:9090/openmano/tenants || exit 1
+# CMD /usr/bin/RO-start.sh
+CMD python3 -m osm_ng_ro.ro_main
- osm_packages:/app/storage
environment:
OSMLCM_RO_HOST: ro
+ OSMLCM_RO_PORT: "9090"
OSMLCM_DATABASE_HOST: mongo
OSMLCM_MESSAGE_HOST: kafka
env_file:
- netOSM
environment:
RO_DB_HOST: mysql
+ OSMRO_DATABASE_HOST: mongo
+ OSMRO_MESSAGE_HOST: kafka
env_file:
- ./ro.env
#depends_on:
- # - mysql
- volumes:
- - ro:/var/log/osm
+ # - mongo
+ # - kafka
ports:
- "${OSM_RO_PORTS:-9090:9090}"
logging:
initContainers:
- name: ro-db-test
image: alpine:latest
- command: ["sh", "-c", "until nc -zvw1 mysql 3306; do sleep 3 ; done; exit 0"]
+ command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 mongodb-k8s 27017 ); do sleep 3; done; exit 0"]
containers:
- name: ro
image: opensourcemano/ro:8
- containerPort: 9090
protocol: TCP
env:
- - name: RO_DB_HOST
- value: mysql
+ - name: OSMRO_DATABASE_URI
+ value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
+ - name: OSMRO_MESSAGE_HOST
+ value: kafka
envFrom:
- secretRef:
name: ro-secret
- volumeMounts:
- - name: ro
- mountPath: /var/log/osm
- volumes:
- - name: ro
- hostPath:
- path: /var/lib/osm/osm_ro/_data
+
if [ ! -f $OSM_DOCKER_WORK_DIR/ro.env ]; then
echo "RO_DB_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" |$WORKDIR_SUDO tee $OSM_DOCKER_WORK_DIR/ro.env
fi
+ if ! grep -Fq "OSMRO_DATABASE_COMMONKEY" $OSM_DOCKER_WORK_DIR/ro.env; then
+ echo "OSMRO_DATABASE_COMMONKEY=${OSM_DATABASE_COMMONKEY}" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/ro.env
+ fi
# Keystone
KEYSTONE_DB_PASSWORD=$(generate_secret)