Modifies Keystone to use same MySQL DB as RO 47/7247/8
authorBenjamin Diaz <bdiaz@whitestack.com>
Fri, 22 Feb 2019 19:04:34 +0000 (16:04 -0300)
committerdiazb <bdiaz@whitestack.com>
Fri, 1 Mar 2019 16:55:35 +0000 (17:55 +0100)
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 <bdiaz@whitestack.com>
installers/docker/docker-compose.yaml
installers/full_install_osm.sh
tools/osm-report

index 2be8fa8..7ac827b 100644 (file)
@@ -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:
index c636326..79dc117 100755 (executable)
@@ -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
index 4e00b9a..f366685 100755 (executable)
@@ -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