[CORD-1127] Rename GUI containers

Change-Id: Id51802851c2725b45ce9aca6bc607438e615a8ef
diff --git a/Vagrantfile b/Vagrantfile
index 3d4cc21..099337d 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -35,15 +35,15 @@
     sudo a2enmod proxy_wstunnel
 
     # Copy apache conf
-    sudo cp /home/vagrant/cord/build/platform-install/roles/head-prologue/files/cord-http.conf /etc/apache2/conf-enabled/cord-http.conf
+    sudo cp /home/vagrant/cord/build/platform-install/roles/apache-proxy/files/cord-http.conf /etc/apache2/conf-enabled/cord-http.conf
 
     # Reload Apache
     sudo service apache2 reload
 
     # Add hosts
     echo "127.0.0.1 xos" | sudo tee --append /etc/hosts > /dev/null
-    echo "127.0.0.1 xos-spa-gui" | sudo tee --append /etc/hosts > /dev/null
-    echo "127.0.0.1 xos-rest-gw" | sudo tee --append /etc/hosts > /dev/null
+    echo "127.0.0.1 xos-gui" | sudo tee --append /etc/hosts > /dev/null
+    echo "127.0.0.1 xos-ws" | sudo tee --append /etc/hosts > /dev/null
     echo "127.0.0.1 xos-chameleon" | sudo tee --append /etc/hosts > /dev/null
     echo "127.0.0.1 xos-core" | sudo tee --append /etc/hosts > /dev/null
   SHELL
diff --git a/roles/apache-proxy/files/cord-http.conf b/roles/apache-proxy/files/cord-http.conf
index d8393b1..2feb788 100644
--- a/roles/apache-proxy/files/cord-http.conf
+++ b/roles/apache-proxy/files/cord-http.conf
@@ -33,14 +33,14 @@
     </Location>
 
     # Cord SPA and rest-gw
-    ProxyPass /spa http://xos-spa-gui:4000
-    ProxyPass /spa/socket.io http://xos-rest-gw:3000/socket.io
-    ProxyPass /socket.io http://xos-rest-gw:3000/socket.io
+    ProxyPass /spa http://xos-gui:4000
+    ProxyPass /spa/socket.io http://xos-ws:3000/socket.io
+    ProxyPass /socket.io http://xos-ws:3000/socket.io
     <Location /socket.io>
         RewriteEngine on
         RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
         RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
-        RewriteRule .* ws://xos-rest-gw:3000%{REQUEST_URI} [P]
+        RewriteRule .* ws://xos-ws:3000%{REQUEST_URI} [P]
     </Location>
     
     # Map the various XOS roots to the XOS instance
diff --git a/roles/cord-profile/tasks/main.yml b/roles/cord-profile/tasks/main.yml
index f2965af..676ee83 100644
--- a/roles/cord-profile/tasks/main.yml
+++ b/roles/cord-profile/tasks/main.yml
@@ -121,7 +121,7 @@
     - onboard-chameleon.yaml
     - onboard-gui-extensions-store.yaml
     - onboard-xos-gui.yaml
-    - onboard-xos-rest-gw.yaml
+    - onboard-xos-ws.yaml
     - gateway-config.yml
     - style.config.js
     - app.config.js
diff --git a/roles/cord-profile/templates/docker-compose.yml.j2 b/roles/cord-profile/templates/docker-compose.yml.j2
index 4939307..31e6e70 100644
--- a/roles/cord-profile/templates/docker-compose.yml.j2
+++ b/roles/cord-profile/templates/docker-compose.yml.j2
@@ -35,7 +35,7 @@
     restart: unless-stopped
 {% endif %}
 
-  xos-spa-gui:
+  xos_gui:
     image: {{ deploy_docker_registry }}xosproject/xos-gui:{{ deploy_docker_tag }}
     networks:
 {% for network in xos_docker_networks %}
@@ -44,16 +44,16 @@
     ports:
       - "4000:4000"
     links:
-      - xos-rest-gateway:xos-rest-gw
+      - xos_ws:xos-ws
       - xos_chameleon:xos-chameleon
     depends_on:
-      - xos-rest-gateway
+      - xos_ws
       - xos_chameleon
     volumes:
       - {{ cord_profile_dir }}/style.config.js:/var/www/dist/style.config.js
       - {{ cord_profile_dir }}/app.config.js:/var/www/dist/app.config.js
     volumes_from:
-      - gui-extensions-store
+      - gui_extensions_store
     logging:
       driver: "json-file"
       options:
@@ -81,7 +81,7 @@
         max-file: "5"
     restart: unless-stopped
 
-  gui-extensions-store:
+  gui_extensions_store:
     image: {{ deploy_docker_registry }}node:argon
     networks:
 {% for network in xos_docker_networks %}
@@ -96,8 +96,8 @@
         max-size: "1000k"
         max-file: "5"
 
-  xos-rest-gateway:
-    image: {{ deploy_docker_registry }}xosproject/xos-rest-gw:{{ deploy_docker_tag }}
+  xos_ws:
+    image: {{ deploy_docker_registry }}xosproject/xos-ws:{{ deploy_docker_tag }}
     networks:
 {% for network in xos_docker_networks %}
      - {{ network }}
@@ -197,7 +197,7 @@
 {% endfor %}
     command: npm run build
     volumes_from:
-      - gui-extensions-store
+      - gui_extensions_store
     logging:
       driver: "json-file"
       options:
diff --git a/roles/cord-profile/templates/onboard-xos-gui.yaml.j2 b/roles/cord-profile/templates/onboard-xos-gui.yaml.j2
index 877f444..2b41e81 100644
--- a/roles/cord-profile/templates/onboard-xos-gui.yaml.j2
+++ b/roles/cord-profile/templates/onboard-xos-gui.yaml.j2
@@ -61,8 +61,8 @@
     gui-to-gw:
       type: tosca.nodes.ComponentLink
       properties:
-          container: xos-rest-gateway
-          alias: xos-rest-gw
+          container: xos-ws
+          alias: xos-ws
           kind: internal
       requirements:
           - xos:
diff --git a/roles/cord-profile/templates/onboard-xos-rest-gw.yaml.j2 b/roles/cord-profile/templates/onboard-xos-ws.yaml.j2
similarity index 86%
rename from roles/cord-profile/templates/onboard-xos-rest-gw.yaml.j2
rename to roles/cord-profile/templates/onboard-xos-ws.yaml.j2
index 503d6b5..3c8208a 100644
--- a/roles/cord-profile/templates/onboard-xos-rest-gw.yaml.j2
+++ b/roles/cord-profile/templates/onboard-xos-ws.yaml.j2
@@ -9,10 +9,10 @@
   node_templates:
 
     # API Gateway
-    xos-rest-gateway:
+    xos-ws:
       type: tosca.nodes.Component
       properties:
-        image: {{ deploy_docker_registry }}xosproject/xos-rest-gw:{{ deploy_docker_tag }}
+        image: {{ deploy_docker_registry }}xosproject/xos-ws:{{ deploy_docker_tag }}
         command: npm start -- --config gateway-config.yml
         ports: 3000:3000
 
@@ -35,7 +35,7 @@
           kind: internal
       requirements:
           - xos:
-             node: xos-rest-gateway
+             node: xos-ws
              relationship: tosca.relationships.LinkOfComponent
 
     gw-to-redis:
@@ -46,5 +46,5 @@
           kind: external
       requirements:
           - xos:
-             node: xos-rest-gateway
+             node: xos-ws
              relationship: tosca.relationships.LinkOfComponent
diff --git a/roles/xos-container-test-restgw/tasks/main.yml b/roles/xos-container-test-restgw/tasks/main.yml
index 5e27e02..36ff9c6 100644
--- a/roles/xos-container-test-restgw/tasks/main.yml
+++ b/roles/xos-container-test-restgw/tasks/main.yml
@@ -1,4 +1,4 @@
-#xos-rest-gw tests
+#xos-ws tests
 
 - name: Check Rest GW Process
   shell: ps -f | grep "node src/server.js --config gateway-config.yml"
diff --git a/roles/xos-docker-images/tasks/main.yml b/roles/xos-docker-images/tasks/main.yml
index 421fb6f..5fd3f81 100644
--- a/roles/xos-docker-images/tasks/main.yml
+++ b/roles/xos-docker-images/tasks/main.yml
@@ -61,10 +61,10 @@
     dockerfile: "Dockerfile.chameleon"
     pull: False # use the locally built copy of xosproject/xos
 
-- name: Build xosproject/xos-rest-gw container image
+- name: Build xosproject/xos-ws container image
   docker_image:
-    name: "xosproject/xos-rest-gw"
-    path: "{{ cord_dir }}/orchestration/xos-rest-gw"
+    name: "xosproject/xos-ws"
+    path: "{{ cord_dir }}/orchestration/xos-rest-gw" # TODO rename repo
     dockerfile: "Dockerfile"
     pull: False # use the locally built copy of xosproject/xos
 
diff --git a/roles/xos-onboarding/defaults/main.yml b/roles/xos-onboarding/defaults/main.yml
index 3167ed5..fa6ce10 100644
--- a/roles/xos-onboarding/defaults/main.yml
+++ b/roles/xos-onboarding/defaults/main.yml
@@ -13,8 +13,8 @@
     recipe_filename: onboard-gui-extensions-store.yaml
   - name: Chameleon
     recipe_filename: onboard-chameleon.yaml
-  - name: xos-rest-gw
-    recipe_filename: onboard-xos-rest-gw.yaml
+  - name: xos-ws
+    recipe_filename: onboard-xos-ws.yaml
   - name: xos-gui
     recipe_filename: onboard-xos-gui.yaml