From: Benjamin Diaz Date: Fri, 22 Feb 2019 19:04:34 +0000 (-0300) Subject: Modifies Keystone to use same MySQL DB as RO X-Git-Tag: v6.0.0~32 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=6e3a2b64fff49ae68a1d588589af9598979594a6;p=osm%2Fdevops.git Modifies Keystone to use same MySQL DB as RO ro-db is renamed to mysql There is no benefit of having multiple sql database engines. All components should share the same. This is part of the effort to make OSM components support an HA scenario. Unifying sql db engines, allows to have them all connected to a database cluster, for example. Change-Id: I5d0f2b75da9ea7c6bbb341cac3cb899b4821dd40 Signed-off-by: Benjamin Diaz --- diff --git a/installers/docker/docker-compose.yaml b/installers/docker/docker-compose.yaml index 2be8fa8d..7ac827b5 100644 --- a/installers/docker/docker-compose.yaml +++ b/installers/docker/docker-compose.yaml @@ -6,7 +6,6 @@ volumes: mon_db: pol_db: osm_packages: - keystone_db: prom_db: networks: netOSM: @@ -59,22 +58,12 @@ services: - prom_db:/prometheus networks: - netOSM - keystone-db: - image: mariadb:10 - networks: - - netOSM - volumes: - - keystone_db:/var/lib/mysql - env_file: - - ./keystone-db.env -# ports: -# - "3306:3306" keystone: image: ${DOCKER_USER:-opensourcemano}/keystone:${TAG:-latest} networks: - netOSM environment: - DB_HOST: keystone-db + DB_HOST: mysql env_file: - ./keystone.env ports: @@ -111,10 +100,12 @@ services: # - kafka # - mongo # - ro - ro-db: + mysql: image: mysql:5 networks: - - netOSM + netOSM: + aliases: + - ro-db volumes: - ro_db:/var/lib/mysql env_file: @@ -126,11 +117,11 @@ services: networks: - netOSM environment: - RO_DB_HOST: ro-db + RO_DB_HOST: mysql env_file: - ./ro.env #depends_on: - # - ro-db + # - mysql volumes: - ro:/var/log/osm ports: diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index c6363263..79dc117f 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -781,7 +781,6 @@ function generate_docker_env_files() { fi # Keystone - MYSQL_ROOT_PASSWORD=$(generate_secret) KEYSTONE_DB_PASSWORD=$(generate_secret) NBI_PASSWORD=$(generate_secret) if [ ! -f $OSM_DOCKER_WORK_DIR/keystone-db.env ]; then diff --git a/tools/osm-report b/tools/osm-report index 4e00b9ab..f366685b 100755 --- a/tools/osm-report +++ b/tools/osm-report @@ -42,7 +42,7 @@ echo "which osmclient:" which osm #dockers deb packages echo "dockers deb packages" -for i in kafka keystone keystone-db lcm light-ui mon mongo nbi pol prometheus ro ro-db zookeeper; do +for i in kafka keystone lcm light-ui mon mongo nbi pol prometheus ro mysql zookeeper; do echo "docker osm_$i" docker exec $(docker ps -q -f name=osm_$i -l) dpkg -l |grep osm done