convert over to docker-compose v2 format, create 'xos' network, to try to get #1850 in faster
use xos_db db host, update other docker-compose files
Change-Id: I7c81b11b9effb0eb89c1eaff515e9901e1096a4a
diff --git a/acord/docker-compose-bootstrap.yml b/acord/docker-compose-bootstrap.yml
index 8e11b73..eed64bb 100644
--- a/acord/docker-compose-bootstrap.yml
+++ b/acord/docker-compose-bootstrap.yml
@@ -1,10 +1,23 @@
-xos_db:
- image: xosproject/xos-postgres
- expose:
- - "5432"
+---
+version: '2'
-xos_bootstrap_ui:
+networks:
+ xos:
+ external: true
+
+services:
+
+ xos_db:
+ image: xosproject/xos-postgres
+ networks:
+ - xos
+ expose:
+ - "5432"
+
+ xos_bootstrap_ui:
image: xosproject/xos
+ networks:
+ - xos
command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
environment:
- CONFIG_DIR
@@ -19,8 +32,10 @@
- ../../xos_services:/opt/xos_services
- ../../xos_libraries:/opt/xos_libraries
-xos_synchronizer_onboarding:
+ xos_synchronizer_onboarding:
image: xosproject/xos
+ networks:
+ - xos
command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
# command: sleep 86400
labels:
@@ -33,14 +48,17 @@
- ./key_import:/opt/xos/key_import:ro
- ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
- ../../xos_services:/opt/xos_services
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
-xos_synchronizer_openstack:
+ xos_synchronizer_openstack:
command: bash -c "sleep 120; python /opt/xos/synchronizers/openstack/xos-synchronizer.py"
image: xosproject/xos-synchronizer-openstack
+ networks:
+ - xos
labels:
org.xosproject.kind: synchronizer
org.xosproject.target: openstack
@@ -53,7 +71,8 @@
- ../setup:/root/setup:ro
- ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
- ./images:/opt/xos/images:ro
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
diff --git a/common/Makefile b/common/Makefile
index 7c8d5ff..58dcb0c 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -142,6 +142,7 @@
@echo "XOS Image Commit Hash: `sudo docker inspect -f '{{ .Config.Labels.XOS_GIT_COMMIT_HASH }}' xosproject/xos`"
@echo "XOS Image Commit Date: `sudo docker inspect -f '{{ .Config.Labels.XOS_GIT_COMMIT_DATE }}' xosproject/xos`"
sudo rm -f $(DOCKER_COMPOSE_YML)
+ sudo docker network create xos
sudo CONFIG_DIR=$(CONFIG_DIR) docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) up -d
bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_BOOTSTRAP_PORT)
sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py none /opt/xos/bootstrap_tosca/fixtures.yaml
diff --git a/common/xos_common_config b/common/xos_common_config
index 76ba747..244e9ef 100644
--- a/common/xos_common_config
+++ b/common/xos_common_config
@@ -6,7 +6,7 @@
name=xos
user=postgres
password=password
-host=localhost
+host=xos_db
port=5432
[api]
diff --git a/cord-pod/docker-compose-bootstrap.yml b/cord-pod/docker-compose-bootstrap.yml
index 6325c4b..c145a83 100644
--- a/cord-pod/docker-compose-bootstrap.yml
+++ b/cord-pod/docker-compose-bootstrap.yml
@@ -1,17 +1,32 @@
-xos_db:
+---
+version: '2'
+
+networks:
+ xos:
+ external: true
+
+services:
+ xos_db:
image: xosproject/xos-postgres
+ networks:
+ - xos
expose:
- "5432"
-xos_redis:
+ xos_redis:
image: redis
- log_driver: "json-file"
- log_opt:
- max-size: "1000k"
- max-file: "5"
+ networks:
+ - xos
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
-xos_synchronizer_onboarding:
+ xos_synchronizer_onboarding:
image: xosproject/xos
+ networks:
+ - xos
command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
#command: sleep 86400
labels:
@@ -25,16 +40,19 @@
- ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
- ../../xos_services:/opt/xos_services
- ../../xos_libraries:/opt/xos_libraries
- log_driver: "json-file"
- log_opt:
- max-size: "1000k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
-xos_bootstrap_ui:
+ xos_bootstrap_ui:
command: python /opt/xos/manage.py runserver 0.0.0.0:81 --insecure --makemigrations
environment:
- CONFIG_DIR
image: xosproject/xos
+ networks:
+ - xos
links:
- xos_db
ports:
@@ -47,7 +65,9 @@
- ./admin-openrc.sh:/root/setup/admin-openrc.sh
- ../common/tosca/fixtures.yaml:/opt/xos/bootstrap_tosca/fixtures.yaml
- ./deployment.yaml:/opt/xos/bootstrap_tosca/deployment.yaml
- log_driver: "json-file"
- log_opt:
- max-size: "1000k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
+
diff --git a/frontend/docker-compose-bootstrap.yml b/frontend/docker-compose-bootstrap.yml
index e991da4..672033f 100644
--- a/frontend/docker-compose-bootstrap.yml
+++ b/frontend/docker-compose-bootstrap.yml
@@ -1,26 +1,40 @@
-xos_db:
+---
+version: '2'
+
+networks:
+ xos:
+ external: true
+
+services:
+ xos_db:
image: xosproject/xos-postgres
+ networks:
+ - xos
expose:
- - "5432"
+ - "5432"
ports:
- - "5432:5432"
+ - "5432:5432"
-xos_redis:
+ xos_redis:
image: redis
+ networks:
+ - xos
ports:
- - "6379:6379"
+ - "6379:6379"
-xos_bootstrap_ui:
+ xos_bootstrap_ui:
image: xosproject/xos
+ networks:
+ - xos
# command: sleep 86400
command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
environment:
- - CONFIG_DIR
+ - CONFIG_DIR
ports:
- - "9998:9998"
+ - "9998:9998"
links:
- - xos_db
- - xos_redis:redis
+ - xos_db
+ - xos_redis:redis
volumes:
- ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config
- ../cord-pod/files/xos_vtn_config:/opt/xos/xos_configuration/xos_vtn_config:ro
@@ -33,7 +47,7 @@
- ../../xos/xos/core/xoslib/static/css:/opt/xos/core/xoslib/static/css
- ../../xos/xos/core/xoslib/static/images:/opt/xos/core/xoslib/static/images
- ../../xos/xos/core/xoslib/static/js:/opt/xos/core/xoslib/static/js
-
+
# The following volumes are sometimes used in development,
# but they are not tested and they can break part of the system, handle with care.
# - ../../xos_services:/opt/xos_services
@@ -41,21 +55,25 @@
# - ../../xos/xos/tosca:/opt/xos/tosca
# - ../../xos/xos/xos:/opt/xos/xos
-xos_synchronizer_onboarding:
+ xos_synchronizer_onboarding:
image: xosproject/xos
+ networks:
+ - xos
command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
labels:
- org.xosproject.kind: synchronizer
- org.xosproject.target: onboarding
+ org.xosproject.kind: synchronizer
+ org.xosproject.target: onboarding
links:
- - xos_db
+ - xos_db
volumes:
- - /var/run/docker.sock:/var/run/docker.sock
- - ./key_import:/opt/xos/key_import:ro
- - ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
- - ../../xos_services:/opt/xos_services
- - ../../xos_libraries:/opt/xos_libraries
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ - /var/run/docker.sock:/var/run/docker.sock
+ - ./key_import:/opt/xos/key_import:ro
+ - ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
+ - ../../xos_services:/opt/xos_services
+ - ../../xos_libraries:/opt/xos_libraries
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
+
diff --git a/globalxos/docker-compose-bootstrap.yml b/globalxos/docker-compose-bootstrap.yml
index 000a796..598d5ee 100644
--- a/globalxos/docker-compose-bootstrap.yml
+++ b/globalxos/docker-compose-bootstrap.yml
@@ -1,10 +1,22 @@
-xos_db:
+---
+version: '2'
+
+networks:
+ xos:
+ external: true
+
+services:
+ xos_db:
image: xosproject/xos-postgres
+ networks:
+ - xos
expose:
- "5432"
-xos_bootstrap_ui:
+ xos_bootstrap_ui:
image: xosproject/xos
+ networks:
+ - xos
command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
environment:
- CONFIG_DIR
@@ -30,8 +42,10 @@
# - ../../xos/xos/tosca:/opt/xos/tosca
# - ../../xos/xos/xos:/opt/xos/xos
-xos_synchronizer_onboarding:
+ xos_synchronizer_onboarding:
image: xosproject/xos
+ networks:
+ - xos
command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
labels:
org.xosproject.kind: synchronizer
@@ -44,7 +58,9 @@
- ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
- ../../xos_services:/opt/xos_services
- ../../xos_libraries:/opt/xos_libraries
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
+
diff --git a/mcord/docker-compose-bootstrap.yml b/mcord/docker-compose-bootstrap.yml
index bb79486..2852b4d 100644
--- a/mcord/docker-compose-bootstrap.yml
+++ b/mcord/docker-compose-bootstrap.yml
@@ -1,10 +1,22 @@
-xos_db:
+---
+version: '2'
+
+networks:
+ xos:
+ external: true
+
+services:
+ xos_db:
image: xosproject/xos-postgres
+ networks:
+ - xos
expose:
- "5432"
-xos_synchronizer_onboarding:
+ xos_synchronizer_onboarding:
image: xosproject/xos
+ networks:
+ - xos
command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
#command: sleep 86400
labels:
@@ -18,10 +30,11 @@
- ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
- ../../xos_services:/opt/xos_services
- ../../xos_libraries:/opt/xos_libraries
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
#xos_synchronizer_openstack:
# command: bash -c "sleep 120; python /opt/xos/synchronizers/openstack/xos-synchronizer.py"
@@ -42,11 +55,13 @@
# max-size: "100k"
# max-file: "5"
-xos_bootstrap_ui:
+ xos_bootstrap_ui:
command: python /opt/xos/manage.py runserver 0.0.0.0:81 --insecure --makemigrations
environment:
- CONFIG_DIR
image: xosproject/xos
+ networks:
+ - xos
links:
- xos_db
ports:
@@ -58,7 +73,9 @@
- ../../xos_services:/opt/xos_services
- ../common/tosca/fixtures.yaml:/opt/xos/bootstrap_tosca/fixtures.yaml
- ./deployment.yaml:/opt/xos/bootstrap_tosca/deployment.yaml
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
+
diff --git a/metronetwork/docker-compose-bootstrap.yml b/metronetwork/docker-compose-bootstrap.yml
index dd3fc7e..d5307a9 100644
--- a/metronetwork/docker-compose-bootstrap.yml
+++ b/metronetwork/docker-compose-bootstrap.yml
@@ -1,10 +1,22 @@
-xos_db:
+---
+version: '2'
+
+networks:
+ xos:
+ external: true
+
+services:
+ xos_db:
image: xosproject/xos-postgres
+ networks:
+ - xos
expose:
- "5432"
-xos_bootstrap_ui:
+ xos_bootstrap_ui:
image: xosproject/xos
+ networks:
+ - xos
# command: sleep 86400
command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
environment:
@@ -29,9 +41,16 @@
- ../../xos/xos/xos:/opt/xos/xos
- ../../xos/xos/tosca:/opt/xos/tosca
- ../../xos/xos/synchronizers:/opt/xos/synchronizers
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
-xos_synchronizer_onboarding:
+ xos_synchronizer_onboarding:
image: xosproject/xos
+ networks:
+ - xos
command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
labels:
org.xosproject.kind: synchronizer
@@ -44,7 +63,8 @@
- ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
- ../../xos_services:/opt/xos_services
- ../../xos_libraries:/opt/xos_libraries
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
diff --git a/test-standalone/docker-compose-bootstrap.yml b/test-standalone/docker-compose-bootstrap.yml
index 7b8a093..c8910fd 100644
--- a/test-standalone/docker-compose-bootstrap.yml
+++ b/test-standalone/docker-compose-bootstrap.yml
@@ -1,10 +1,22 @@
-xos_db:
+---
+version: '2'
+
+networks:
+ xos:
+ external: true
+
+services:
+ xos_db:
image: xosproject/xos-postgres
+ networks:
+ - xos
expose:
- "5432"
-xos_bootstrap_ui:
+ xos_bootstrap_ui:
image: xosproject/xos
+ networks:
+ - xos
command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
ports:
- "9998:9998"
@@ -17,9 +29,16 @@
- ../../xos/xos/core/tests:/opt/xos/core/tests
- ../common/tosca/fixtures.yaml:/opt/xos/bootstrap_tosca/fixtures.yaml
- ./deployment.yaml:/opt/xos/bootstrap_tosca/deployment.yaml
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
-xos_synchronizer_onboarding:
+ xos_synchronizer_onboarding:
image: xosproject/xos
+ networks:
+ - xos
command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
# command: sleep 86400
labels:
@@ -33,7 +52,9 @@
- ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
- ../../xos_services:/opt/xos_services
- ../../xos_libraries:/opt/xos_libraries
- log_driver: "json-file"
- log_opt:
- max-size: "100k"
- max-file: "5"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
+