[CORD-1358] Creating base xos_config
Change-Id: I9053434fe98c5a314bc2a9b086ab7557fc01eb6d
diff --git a/roles/cord-profile/defaults/main.yml b/roles/cord-profile/defaults/main.yml
index 98734ec..e0f2de0 100644
--- a/roles/cord-profile/defaults/main.yml
+++ b/roles/cord-profile/defaults/main.yml
@@ -51,6 +51,15 @@
xos_other_templates: []
+# XOS Config (xos_config.yaml)
+xos_db_name: xos
+xos_db_username: postgres
+xos_db_password: password
+xos_logging_level: debug
+xos_logging_channels:
+ - file
+ - console
+
# GUI Config [new GUI], used in app.config.js.j2 and style.config.js.j2
gw_port: 3000
gui_api_endpoint: "/xosapi/v1"
diff --git a/roles/cord-profile/tasks/main.yml b/roles/cord-profile/tasks/main.yml
index d33765e..7a5fffb 100644
--- a/roles/cord-profile/tasks/main.yml
+++ b/roles/cord-profile/tasks/main.yml
@@ -117,6 +117,7 @@
mode: 0644
with_items:
- xos_common_config
+ - xos_config.yaml
- deployment.yaml
- xos.yaml
- gateway-config.yml
diff --git a/roles/cord-profile/templates/docker-compose.yml.j2 b/roles/cord-profile/templates/docker-compose.yml.j2
index f1cd4ab..29fa893 100644
--- a/roles/cord-profile/templates/docker-compose.yml.j2
+++ b/roles/cord-profile/templates/docker-compose.yml.j2
@@ -205,6 +205,7 @@
{% endif %}
volumes:
- {{ cord_profile_dir }}/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
+ - {{ cord_profile_dir }}/xos_config.yaml:/opt/xos/xos_config.yaml:ro
- {{ cord_profile_dir }}:/opt/cord_profile:ro
- {{ cord_dir }}/orchestration/xos_libraries/ng-xos-lib:/opt/xos_libraries/ng-xos-lib:ro
- {{ cord_profile_dir }}/im_cert_chain.pem:/usr/local/share/ca-certificates/local_certs.crt:ro
@@ -243,6 +244,7 @@
{% endif %}
volumes:
- {{ cord_profile_dir }}/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
+ - {{ cord_profile_dir }}/xos_config.yaml:/opt/xos/xos_config.yaml:ro
- {{ cord_profile_dir }}:/opt/cord_profile:ro
- {{ cord_dir }}/orchestration/xos_libraries/ng-xos-lib:/opt/xos_libraries/ng-xos-lib:ro
- {{ cord_profile_dir }}/im_cert_chain.pem:/usr/local/share/ca-certificates/local_certs.crt:ro
diff --git a/roles/cord-profile/templates/xos_config.yaml.j2 b/roles/cord-profile/templates/xos_config.yaml.j2
new file mode 100644
index 0000000..340d32c
--- /dev/null
+++ b/roles/cord-profile/templates/xos_config.yaml.j2
@@ -0,0 +1,11 @@
+name: xos-core
+database:
+ name: {{ xos_db_name }}
+ username: {{ xos_db_username }}
+ password: {{ xos_db_password }}
+logging:
+ level: {{ xos_logging_level }}
+ channels:
+{% for channel in xos_logging_channels %}
+ - {{ channel }}
+{% endfor %}
\ No newline at end of file