[CORD-3022] Splitting config and removing unused files
Change-Id: I559697e1b8a6ba54ce1761dfcd31d5119dfd102d
diff --git a/xos/synchronizer/Dockerfile.synchronizer b/Dockerfile.synchronizer
similarity index 92%
rename from xos/synchronizer/Dockerfile.synchronizer
rename to Dockerfile.synchronizer
index cd4da41..fb49db5 100644
--- a/xos/synchronizer/Dockerfile.synchronizer
+++ b/Dockerfile.synchronizer
@@ -20,7 +20,8 @@
FROM xosproject/xos-synchronizer-base:candidate
-COPY . /opt/xos/synchronizers/progran
+COPY xos/synchronizer /opt/xos/synchronizers/progran
+COPY VERSION /opt/xos/synchronizers/progran/
ENTRYPOINT []
@@ -55,5 +56,4 @@
org.opencord.component.xos.vcs-url=$org_opencord_component_xos_vcs_url \
org.opencord.component.xos.vcs-ref=$org_opencord_component_xos_vcs_ref
-CMD bash -c "service filebeat start; cd /opt/xos/synchronizers/progran; python progran-synchronizer.py"
-
+CMD ["/usr/bin/python", "/opt/xos/synchronizers/progran/progran-synchronizer.py"]
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..9f30863
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+6.0.0.dev
\ No newline at end of file
diff --git a/xos/synchronizer/progran_config.yml b/xos/synchronizer/config.yaml
similarity index 71%
rename from xos/synchronizer/progran_config.yml
rename to xos/synchronizer/config.yaml
index d3b209c..a3f2048 100644
--- a/xos/synchronizer/progran_config.yml
+++ b/xos/synchronizer/config.yaml
@@ -15,34 +15,22 @@
name: progran
-accessor:
- username: xosadmin@opencord.org
- password: "@/opt/xos/services/progran/credentials/xosadmin@opencord.org"
required_models:
- ProgranService
- ProgranServiceInstance
- MCordSubscriberInstance
- ENodeB
- Handover
-dependency_graph: "/opt/xos/synchronizers/progran/model_deps"
steps_dir: "/opt/xos/synchronizers/progran/steps"
sys_dir: "/opt/xos/synchronizers/progran/sys"
models_dir: "/opt/xos/synchronizers/progran/models"
-#model_policies_dir: "/opt/xos/synchronizers/progran/model_policies"
-
logging:
version: 1
handlers:
console:
class: logging.StreamHandler
- file:
- class: logging.handlers.RotatingFileHandler
- filename: /var/log/xos.log
- maxBytes: 10485760
- backupCount: 5
loggers:
'multistructlog':
handlers:
- console
- - file
level: DEBUG
\ No newline at end of file
diff --git a/xos/synchronizer/model_deps b/xos/synchronizer/model_deps
deleted file mode 100644
index 9e26dfe..0000000
--- a/xos/synchronizer/model_deps
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/xos/synchronizer/progran-synchronizer.py b/xos/synchronizer/progran-synchronizer.py
index 9632c8e..37fbd6b 100644
--- a/xos/synchronizer/progran-synchronizer.py
+++ b/xos/synchronizer/progran-synchronizer.py
@@ -23,8 +23,13 @@
import sys
from xosconfig import Config
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/progran_config.yml')
-Config.init(config_file, 'synchronizer-config-schema.yaml')
+base_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/config.yaml')
+mounted_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/mounted_config.yaml')
+
+if os.path.isfile(mounted_config_file):
+ Config.init(base_config_file, 'synchronizer-config-schema.yaml', mounted_config_file)
+else:
+ Config.init(base_config_file, 'synchronizer-config-schema.yaml')
synchronizer_path = os.path.join(os.path.dirname(
os.path.realpath(__file__)), "../../synchronizers/new_base")