[CORD-988] Adding GUI and REST config files
Updating apache cord config and using it in local vagrant

Change-Id: I634ccc75a119c7e0cdb9549c488dda95e36bd840
diff --git a/roles/cord-profile/templates/app.config.js.j2 b/roles/cord-profile/templates/app.config.js.j2
new file mode 100644
index 0000000..e72aa5e
--- /dev/null
+++ b/roles/cord-profile/templates/app.config.js.j2
@@ -0,0 +1,5 @@
+angular.module('app')
+  .constant('AppConfig', {
+    apiEndpoint: '{{ gui_api_endpoint }}',
+    websocketClient: '{{ gui_websocket }}'
+  });
diff --git a/roles/cord-profile/templates/gateway-config.yml.j2 b/roles/cord-profile/templates/gateway-config.yml.j2
index 0e70f01..3b4a4bd 100644
--- a/roles/cord-profile/templates/gateway-config.yml.j2
+++ b/roles/cord-profile/templates/gateway-config.yml.j2
@@ -1,9 +1,9 @@
 default:
   xos:
     host: xos
-    port: 9000
+    port: {{ xos_ui_port }}
   redis:
     host: redis
     port: 6379
   gateway:
-    port: 3000
\ No newline at end of file
+    port: {{ gw_port }}
\ No newline at end of file
diff --git a/roles/cord-profile/templates/onboard-xos-gui.yaml.j2 b/roles/cord-profile/templates/onboard-xos-gui.yaml.j2
index 48dcc1b..e2dd0d3 100644
--- a/roles/cord-profile/templates/onboard-xos-gui.yaml.j2
+++ b/roles/cord-profile/templates/onboard-xos-gui.yaml.j2
@@ -15,6 +15,28 @@
         image: xosproject/xos-gui
         ports: 4000:4000
 
+    # UI App Config
+    /var/www/dist/app.config.js:
+      type: tosca.nodes.ComponentVolume
+      properties:
+          host_path: {{ cord_profile_dir }}/app.config.js
+          read_only: false
+      requirements:
+          - xos:
+             node: xos-spa-gui
+             relationship: tosca.relationships.VolumeOfComponent
+
+    # UI Style Config
+    /var/www/dist/style.config.js:
+      type: tosca.nodes.ComponentVolume
+      properties:
+          host_path: {{ cord_profile_dir }}/style.config.js
+          read_only: false
+      requirements:
+          - xos:
+             node: xos-spa-gui
+             relationship: tosca.relationships.VolumeOfComponent
+
     gui-to-chameleon:
       type: tosca.nodes.ComponentLink
       properties:
diff --git a/roles/cord-profile/templates/style.config.js.j2 b/roles/cord-profile/templates/style.config.js.j2
new file mode 100644
index 0000000..01a7624
--- /dev/null
+++ b/roles/cord-profile/templates/style.config.js.j2
@@ -0,0 +1,19 @@
+angular.module('app')
+  .constant('StyleConfig', {
+    projectName: '{{ gui_project_name }}',
+    favicon: '{{ gui_favicon }}',
+    background: '{{ gui_background }}',
+    payoff: '{{ gui_payoff }}',
+    logo: '{{ gui_logo }}',
+    routes: [
+    {% for route in gui_routes %}
+    {
+            label: '{{ route.label }}',
+            state: '{{ route.state }}',
+            {% if route.parent is defined %}
+            parent: '{{ route.parent }}'
+            {% endif %}
+    },
+    {% endfor %}
+    ]
+});
\ No newline at end of file