Moved xos_ui to port 9000 and xos_bootstrap_ui to port 9001 for all config

Change-Id: I75ab78deb55b344b0b64b183dda2859936045e9c
diff --git a/acord/Makefile b/acord/Makefile
index e4e4365..a83689b 100644
--- a/acord/Makefile
+++ b/acord/Makefile
@@ -10,8 +10,8 @@
 
 DB_NAME            ?= $(BOOTSTRAP_PROJECT)_xos_db_1
 
-XOS_BOOTSTRAP_PORT ?= 9998
-XOS_UI_PORT        ?= 9999
+XOS_BOOTSTRAP_PORT ?= 9001
+XOS_UI_PORT        ?= 9000
 
 # Include common functions
 include $(COMMON_DIR)/Makefile
diff --git a/acord/docker-compose-bootstrap.yml b/acord/docker-compose-bootstrap.yml
index eed64bb..589fa4d 100644
--- a/acord/docker-compose-bootstrap.yml
+++ b/acord/docker-compose-bootstrap.yml
@@ -18,11 +18,11 @@
     image: xosproject/xos
     networks:
       - xos
-    command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     ports:
-        - "9998:9998"
+        - "9001:9001"
     links:
         - xos_db
     volumes:
diff --git a/acord/docker-compose.yml b/acord/docker-compose.yml
index 9ef6fc7..b75f809 100644
--- a/acord/docker-compose.yml
+++ b/acord/docker-compose.yml
@@ -26,9 +26,9 @@
 
 xos:
     image: xosproject/xos
-    command: python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9000 --insecure --makemigrations
     ports:
-        - "9999:8000"
+        - "9000:9000"
     links:
         - xos_db
     volumes:
diff --git a/acord/xos.yaml b/acord/xos.yaml
index a38a6f9..b5a446b 100644
--- a/acord/xos.yaml
+++ b/acord/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 9999
-        bootstrap_ui_port: 9998
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: acord
         db_container_name: acordbs_xos_db_1
 
diff --git a/common/Makedefs b/common/Makedefs
index c7a808d..72a4654 100644
--- a/common/Makedefs
+++ b/common/Makedefs
@@ -10,11 +10,12 @@
 XOS_DIR              ?= $(HOME_DIR)/xos
 SERVICE_DIR          ?= $(HOME_DIR)/xos_services
 LIBRARY_DIR          ?= $(HOME_DIR)/xos_libraries
-REST_GW_DIR          ?= $(HOME_DIR)/xos-rest-gw
-GUI_DIR              ?= $(HOME_DIR)/xos-gui
+# NOTE should we move xos-gui and xos-rest-gw to these folder instead that in libraries? In case update repo manifest accordingly
+# REST_GW_DIR          ?= $(HOME_DIR)/xos-rest-gw
+# GUI_DIR              ?= $(HOME_DIR)/xos-gui
 
-XOS_BOOTSTRAP_PORT   ?= 81
-XOS_UI_PORT          ?= 80
+XOS_BOOTSTRAP_PORT   ?= 9001
+XOS_UI_PORT          ?= 9000
 
 DOCKER_PROJECT       ?= unknown
 BOOTSTRAP_PROJECT    ?= $(DOCKER_PROJECT)bs
@@ -76,3 +77,9 @@
 
 GLOBALXOS_BRANCH ?= $(DEFAULT_BRANCH)
 GLOBALXOS_GIT_URL ?= $(CORD_BASE_GIT_URL)/globalxos.git
+
+XOS_REST_GW_BRANCH ?= $(DEFAULT_BRANCH)
+XOS_REST_GW_URL ?= $(CORD_BASE_GIT_URL)/xos-rest-gw.git
+
+XOS_GUI_BRANCH ?= $(DEFAULT_BRANCH)
+XOS_GUI_URL ?= $(CORD_BASE_GIT_URL)/xos-gui.git
diff --git a/common/Makefile b/common/Makefile
index 68567e1..c8b6b76 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -123,7 +123,9 @@
 	git -C $(SERVICE_DIR)/metronet-local pull
 
 cord_libraries: $(LIBRARY_DIR) \
-        $(LIBRARY_DIR)/ng-xos-lib
+        $(LIBRARY_DIR)/ng-xos-lib \
+        $(LIBRARY_DIR)/xos-rest-gw \
+        $(LIBRARY_DIR)/xos-gui
 
 $(LIBRARY_DIR):
 	mkdir -p $(LIBRARY_DIR)
@@ -131,6 +133,12 @@
 $(LIBRARY_DIR)/ng-xos-lib:
 	git -C $(LIBRARY_DIR) $(GITOPTS) clone -b $(NG_XOS_LIB_BRANCH) $(NG_XOS_LIB_URL)
 
+$(LIBRARY_DIR)/xos-rest-gw:
+	git -C $(LIBRARY_DIR) $(GITOPTS) clone -b $(XOS_REST_GW_BRANCH) $(XOS_REST_GW_URL)
+
+$(LIBRARY_DIR)/xos-gui:
+	git -C $(LIBRARY_DIR) $(GITOPTS) clone -b $(XOS_GUI_BRANCH) $(XOS_GUI_URL)
+
 # bootstrap the containers
 
 RUN_TOSCA_BOOTSTRAP ?= python $(COMMON_DIR)/run_tosca.py $(XOS_BOOTSTRAP_PORT) $(ADMIN_USERNAME) $(ADMIN_PASSWORD)
@@ -176,11 +184,11 @@
 
 xos_rest_gw_c:
 	# this folder is cloned by repo
-	cd $(REST_GW_DIR); docker build -t xosproject/xos-rest-gw .
+	cd $(LIBRARY_DIR)/xos-rest-gw; sudo docker build -t xosproject/xos-rest-gw .
 
 xos_gui_c:
 	# this folder is cloned by repo
-	cd $(GUI_DIR); docker build -t xosproject/xos-gui .
+	cd $(LIBRARY_DIR)/xos-gui; sudo docker build -t xosproject/xos-gui .
 
 
 # utilties/convenience targets
@@ -225,3 +233,17 @@
 django-restart:
 	sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 touch /opt/xos/xos/settings.py
 
+rest-gw: xos_rest_gw_c
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/xos-rest-gw.yaml
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
+	bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
+	bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
+
+ui: xos_gui_c
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
+	$(RUN_TOSCA_BOOTSTRAP) $(CONFIG_DIR)/xos-gui.yaml
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
+	bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
+	bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
+
diff --git a/frontend/gateway-config.yml b/common/gateway-config.yml
similarity index 86%
rename from frontend/gateway-config.yml
rename to common/gateway-config.yml
index ae1f0b1..0e70f01 100644
--- a/frontend/gateway-config.yml
+++ b/common/gateway-config.yml
@@ -1,7 +1,7 @@
 default:
   xos:
     host: xos
-    port: 9999
+    port: 9000
   redis:
     host: redis
     port: 6379
diff --git a/frontend/ui_containers.yaml b/common/xos-rest-gw.yaml
similarity index 68%
rename from frontend/ui_containers.yaml
rename to common/xos-rest-gw.yaml
index 56b64a0..a4b1062 100644
--- a/frontend/ui_containers.yaml
+++ b/common/xos-rest-gw.yaml
@@ -17,10 +17,11 @@
         command: npm start -- --config gateway-config.yml
         ports: 3000:3000
 
+    # API Gateway config file
     /var/www/src/config/gateway-config.yml:
       type: tosca.nodes.ComponentVolume
       properties:
-          host_path: { path_join: [ SELF, CONFIG_DIR, ./gateway-config.yml, ENV_VAR ] }
+          host_path: { path_join: [ SELF, CONFIG_DIR, ./../common/gateway-config.yml, ENV_VAR ] }
           read_only: false
       requirements:
           - xos:
@@ -47,23 +48,4 @@
       requirements:
           - xos:
              node: xos-rest-gateway
-             relationship: tosca.relationships.LinkOfComponent
-
-    # UI Container
-    xos-spa-gui:
-      type: tosca.nodes.Component
-      properties:
-        name: xos-spa-gui
-        image: xosproject/xos-gui
-        ports: 81:81
-
-    gui-to-gw:
-      type: tosca.nodes.ComponentLink
-      properties:
-          container: xos-rest-gateway
-          alias: xos-rest-gw
-          kind: internal
-      requirements:
-          - xos:
-             node: xos-spa-gui
              relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file
diff --git a/cord-pod-ansible/docker-compose-bootstrap.yml b/cord-pod-ansible/docker-compose-bootstrap.yml
index a3522c9..ea78544 100644
--- a/cord-pod-ansible/docker-compose-bootstrap.yml
+++ b/cord-pod-ansible/docker-compose-bootstrap.yml
@@ -42,14 +42,14 @@
             max-file: "5"
 
 xos_bootstrap_ui:
-    command: python /opt/xos/manage.py runserver 0.0.0.0:81 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     image: xosproject/xos
     links:
         - xos_db
     ports:
-        - "81:81"
+        - "9001:9001"
     volumes:
         - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
         - ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
diff --git a/cord-pod-ansible/vars/cord-pod_defaults.yml b/cord-pod-ansible/vars/cord-pod_defaults.yml
index 2b51288..4cc1e13 100644
--- a/cord-pod-ansible/vars/cord-pod_defaults.yml
+++ b/cord-pod-ansible/vars/cord-pod_defaults.yml
@@ -15,8 +15,8 @@
 bootstrap_project: "cordpodbs"
 docker_project: "cordpod"
 
-bootstrap_port: 81
-ui_port: 80
+bootstrap_port: 9001
+ui_port:  9000
 
 bootstrap_user: "padmin@vicci.org"
 bootstrap_password: "letmein"
diff --git a/cord-pod-ansible/xos.yaml b/cord-pod-ansible/xos.yaml
index 91327f2..35b4174 100644
--- a/cord-pod-ansible/xos.yaml
+++ b/cord-pod-ansible/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 80
-        bootstrap_ui_port: 81
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: cordpod
         db_container_name: cordpodbs_xos_db_1
 
diff --git a/cord-pod/Makefile b/cord-pod/Makefile
index 832f135..e8368c1 100644
--- a/cord-pod/Makefile
+++ b/cord-pod/Makefile
@@ -8,12 +8,12 @@
 DOCKER_PROJECT     ?= cordpod
 BOOTSTRAP_PROJECT  ?= cordpodbs
 
-XOS_UI_PORT        := 8888
+XOS_UI_PORT        := 9000
 
 # Include common functions
 include $(COMMON_DIR)/Makefile
 
-xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding
+xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding rest-gw ui
 
 onboarding: synchronizers.yaml id_rsa id_rsa.pub
 	@echo "[ONBOARDING]"
diff --git a/cord-pod/docker-compose-bootstrap.yml b/cord-pod/docker-compose-bootstrap.yml
index c145a83..1e68f91 100644
--- a/cord-pod/docker-compose-bootstrap.yml
+++ b/cord-pod/docker-compose-bootstrap.yml
@@ -47,7 +47,7 @@
         max-file: "5"
 
   xos_bootstrap_ui:
-    command: python /opt/xos/manage.py runserver 0.0.0.0:81 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     image: xosproject/xos
@@ -56,7 +56,7 @@
     links:
         - xos_db
     ports:
-        - "81:81"
+        - "9001:9001"
     volumes:
         - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
         - ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
diff --git a/cord-pod/xos-gui.yaml b/cord-pod/xos-gui.yaml
new file mode 100644
index 0000000..2dae32f
--- /dev/null
+++ b/cord-pod/xos-gui.yaml
@@ -0,0 +1,29 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+
+    # UI Container
+    xos-spa-gui:
+      type: tosca.nodes.Component
+      properties:
+        # command: cd /var/www; BRAND=cord npm run build
+        name: xos-spa-gui
+        image: xosproject/xos-gui
+        ports: 4000:4000
+
+    gui-to-gw:
+      type: tosca.nodes.ComponentLink
+      properties:
+          container: xos-rest-gateway
+          alias: xos-rest-gw
+          kind: internal
+      requirements:
+          - xos:
+             node: xos-spa-gui
+             relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file
diff --git a/cord-pod/xos.yaml b/cord-pod/xos.yaml
index 08fceb0..a60f52d 100644
--- a/cord-pod/xos.yaml
+++ b/cord-pod/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 8888
-        bootstrap_ui_port: 81
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: cordpod
         db_container_name: cordpodbs_xos_db_1
         redis_container_name: cordpodbs_xos_redis_1
diff --git a/devel/Makefile b/devel/Makefile
index cd7287f..ee5167a 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -8,8 +8,8 @@
 DOCKER_PROJECT     ?= devel
 BOOTSTRAP_PROJECT  ?= develbs
 
-XOS_BOOTSTRAP_PORT ?= 9998
-XOS_UI_PORT        ?= 9999
+XOS_BOOTSTRAP_PORT ?= 9001
+XOS_UI_PORT        ?= 9000
 
 # Include common functions
 include $(COMMON_DIR)/Makefile
diff --git a/devel/docker-compose-bootstrap.yml b/devel/docker-compose-bootstrap.yml
index 548f2e8..d9d7060 100644
--- a/devel/docker-compose-bootstrap.yml
+++ b/devel/docker-compose-bootstrap.yml
@@ -5,11 +5,11 @@
 
 xos_bootstrap_ui:
     image: xosproject/xos
-    command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     ports:
-        - "9998:9998"
+        - "9001:9001"
     links:
         - xos_db
     volumes:
diff --git a/devel/docker-compose.yml b/devel/docker-compose.yml
index 9ef6fc7..b75f809 100644
--- a/devel/docker-compose.yml
+++ b/devel/docker-compose.yml
@@ -26,9 +26,9 @@
 
 xos:
     image: xosproject/xos
-    command: python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9000 --insecure --makemigrations
     ports:
-        - "9999:8000"
+        - "9000:9000"
     links:
         - xos_db
     volumes:
diff --git a/devel/xos.m4 b/devel/xos.m4
index cf20886..bacc170 100644
--- a/devel/xos.m4
+++ b/devel/xos.m4
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 9999
-        bootstrap_ui_port: 9998
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: devel
         db_container_name: develbs_xos_db_1
         extra_hosts: ctl:CTLIP
diff --git a/frontend/Makefile b/frontend/Makefile
index b533d30..01439c7 100644
--- a/frontend/Makefile
+++ b/frontend/Makefile
@@ -8,13 +8,13 @@
 DOCKER_PROJECT     ?= frontend
 BOOTSTRAP_PROJECT  ?= frontendbs
 
-XOS_BOOTSTRAP_PORT ?= 9998
-XOS_UI_PORT        ?= 9999
+XOS_BOOTSTRAP_PORT ?= 9001
+XOS_UI_PORT        ?= 9000
 
 # Include common functions
 include $(COMMON_DIR)/Makefile
 
-frontend: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding frontendconfig
+frontend: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding frontendconfig rest-gw ui
 
 onboarding:
 	@echo "[ONBOARDING]"
@@ -113,11 +113,3 @@
 clean-config-folder:
 	sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_mcord_config
 	sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_cord_config
-
-experimental-ui: xos_rest_gw_c xos_gui_c
-	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
-	$(RUN_TOSCA_BOOTSTRAP) $(CONFIG_DIR)/ui_containers.yaml
-	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
-	bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
-	bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
-
diff --git a/frontend/docker-compose-bootstrap.yml b/frontend/docker-compose-bootstrap.yml
index 672033f..26f4b42 100644
--- a/frontend/docker-compose-bootstrap.yml
+++ b/frontend/docker-compose-bootstrap.yml
@@ -27,11 +27,11 @@
     networks:
       - xos
     # command: sleep 86400
-    command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
       - CONFIG_DIR
     ports:
-      - "9998:9998"
+      - "9001:9001"
     links:
       - xos_db
       - xos_redis:redis
diff --git a/frontend/xos-gui.yaml b/frontend/xos-gui.yaml
new file mode 100644
index 0000000..457e946
--- /dev/null
+++ b/frontend/xos-gui.yaml
@@ -0,0 +1,29 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+
+    # UI Container
+    xos-spa-gui:
+      type: tosca.nodes.Component
+      properties:
+        # command: cd /var/www; BRAND=opencloud npm run build
+        name: xos-spa-gui
+        image: xosproject/xos-gui
+        ports: 4000:4000
+
+    gui-to-gw:
+      type: tosca.nodes.ComponentLink
+      properties:
+          container: xos-rest-gateway
+          alias: xos-rest-gw
+          kind: internal
+      requirements:
+          - xos:
+             node: xos-spa-gui
+             relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file
diff --git a/frontend/xos.yaml b/frontend/xos.yaml
index 261e6dd..c1f4188 100644
--- a/frontend/xos.yaml
+++ b/frontend/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 9999
-        bootstrap_ui_port: 9998
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: frontend
         db_container_name: frontendbs_xos_db_1
         redis_container_name: frontendbs_xos_redis_1
diff --git a/globalxos/Makefile b/globalxos/Makefile
index 8f14c38..1adbc0f 100644
--- a/globalxos/Makefile
+++ b/globalxos/Makefile
@@ -8,8 +8,8 @@
 DOCKER_PROJECT     ?= globalxos
 BOOTSTRAP_PROJECT  ?= globalxosbs
 
-XOS_BOOTSTRAP_PORT ?= 9998
-XOS_UI_PORT        ?= 9999
+XOS_BOOTSTRAP_PORT ?= 9001
+XOS_UI_PORT        ?= 9000
 
 # Include common functions
 include $(COMMON_DIR)/Makefile
diff --git a/globalxos/docker-compose-bootstrap.yml b/globalxos/docker-compose-bootstrap.yml
index 598d5ee..4707370 100644
--- a/globalxos/docker-compose-bootstrap.yml
+++ b/globalxos/docker-compose-bootstrap.yml
@@ -17,11 +17,11 @@
     image: xosproject/xos
     networks:
       - xos
-    command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     ports:
-        - "9998:9998"
+        - "9001:9001"
     links:
         - xos_db
     volumes:
diff --git a/globalxos/xos.yaml b/globalxos/xos.yaml
index d7f84c5..02a5df9 100644
--- a/globalxos/xos.yaml
+++ b/globalxos/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 9999
-        bootstrap_ui_port: 9998
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: globalxos
         db_container_name: globalxosbs_xos_db_1
         frontend_only: false
diff --git a/mcord/Makefile b/mcord/Makefile
index f51d99f..d7eeb92 100644
--- a/mcord/Makefile
+++ b/mcord/Makefile
@@ -8,11 +8,11 @@
 DOCKER_PROJECT     ?= mcord
 BOOTSTRAP_PROJECT  ?= mcordbs
 
-XOS_UI_PORT        :=8888
+XOS_UI_PORT        := 8000
 
 include $(COMMON_DIR)/Makefile
 
-xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding podconfig
+xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding podconfig rest-gw ui
 
 onboarding:
 	@echo "[ONBOARDING]"
diff --git a/mcord/docker-compose-bootstrap.yml b/mcord/docker-compose-bootstrap.yml
index 4ce8359..a4ce102 100644
--- a/mcord/docker-compose-bootstrap.yml
+++ b/mcord/docker-compose-bootstrap.yml
@@ -66,7 +66,7 @@
 #            max-file: "5"
 
   xos_bootstrap_ui:
-    command: python /opt/xos/manage.py runserver 0.0.0.0:81 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     image: xosproject/xos
@@ -75,7 +75,7 @@
     links:
         - xos_db
     ports:
-        - "81:81"
+        - "9001:9001"
     volumes:
         - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
         - ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
diff --git a/mcord/xos-gui.yaml b/mcord/xos-gui.yaml
new file mode 100644
index 0000000..457e946
--- /dev/null
+++ b/mcord/xos-gui.yaml
@@ -0,0 +1,29 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+
+    # UI Container
+    xos-spa-gui:
+      type: tosca.nodes.Component
+      properties:
+        # command: cd /var/www; BRAND=opencloud npm run build
+        name: xos-spa-gui
+        image: xosproject/xos-gui
+        ports: 4000:4000
+
+    gui-to-gw:
+      type: tosca.nodes.ComponentLink
+      properties:
+          container: xos-rest-gateway
+          alias: xos-rest-gw
+          kind: internal
+      requirements:
+          - xos:
+             node: xos-spa-gui
+             relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file
diff --git a/mcord/xos.yaml b/mcord/xos.yaml
index 270ad3d..f1662d5 100644
--- a/mcord/xos.yaml
+++ b/mcord/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 8888
-        bootstrap_ui_port: 81
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: mcord
         db_container_name: mcordbs_xos_db_1
         redis_container_name: mcordbs_xos_redis_1
diff --git a/metronetwork/Makefile b/metronetwork/Makefile
index e083347..2f8616f 100644
--- a/metronetwork/Makefile
+++ b/metronetwork/Makefile
@@ -8,15 +8,15 @@
 DOCKER_PROJECT     ?= metronetwork
 BOOTSTRAP_PROJECT  ?= metronetworkbs
 
-XOS_BOOTSTRAP_PORT ?= 9998
-XOS_UI_PORT        ?= 9999
+XOS_BOOTSTRAP_PORT ?= 9001
+XOS_UI_PORT        ?= 9000
 
 BOOTSTRAP_DEVEL_YML        ?= $(CONFIG_DIR)/docker-compose-bootstrap-devel.yml
 
 # Include common functions
 include $(COMMON_DIR)/Makefile
 
-metronetwork: prereqs config_dirs xos_download cord_services cord_libraries bootstrap dashboard onboarding ecord_services
+metronetwork: prereqs config_dirs xos_download cord_services cord_libraries bootstrap dashboard onboarding ecord_services rest-gw ui
 
 # Targets to accomodate users with HTTP proxies
 metronetworkconfig: prereqs config_dirs xos_download cord_services cord_libraries
diff --git a/metronetwork/docker-compose-bootstrap.yml b/metronetwork/docker-compose-bootstrap.yml
index d5307a9..6812288 100644
--- a/metronetwork/docker-compose-bootstrap.yml
+++ b/metronetwork/docker-compose-bootstrap.yml
@@ -18,11 +18,11 @@
     networks:
       - xos
     # command: sleep 86400
-    command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     ports:
-        - "9998:9998"
+        - "9001:9001"
     links:
         - xos_db
     volumes:
diff --git a/metronetwork/xos-gui.yaml b/metronetwork/xos-gui.yaml
new file mode 100644
index 0000000..457e946
--- /dev/null
+++ b/metronetwork/xos-gui.yaml
@@ -0,0 +1,29 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+
+    # UI Container
+    xos-spa-gui:
+      type: tosca.nodes.Component
+      properties:
+        # command: cd /var/www; BRAND=opencloud npm run build
+        name: xos-spa-gui
+        image: xosproject/xos-gui
+        ports: 4000:4000
+
+    gui-to-gw:
+      type: tosca.nodes.ComponentLink
+      properties:
+          container: xos-rest-gateway
+          alias: xos-rest-gw
+          kind: internal
+      requirements:
+          - xos:
+             node: xos-spa-gui
+             relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file
diff --git a/metronetwork/xos.yaml b/metronetwork/xos.yaml
index 585458c..e6dd966 100644
--- a/metronetwork/xos.yaml
+++ b/metronetwork/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 9999
-        bootstrap_ui_port: 9998
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: metronetwork 
         db_container_name: metronetworkbs_xos_db_1
 
diff --git a/opencloud/docker-compose-bootstrap.yml b/opencloud/docker-compose-bootstrap.yml
index d7b848d..847c1c6 100644
--- a/opencloud/docker-compose-bootstrap.yml
+++ b/opencloud/docker-compose-bootstrap.yml
@@ -31,14 +31,14 @@
             max-file: "5"
 
 xos_bootstrap_ui:
-    command: python /opt/xos/manage.py runserver 0.0.0.0:81 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     environment:
         - CONFIG_DIR
     image: xosproject/xos
     links:
         - xos_db
     ports:
-        - "81:81"
+        - "9001:9001"
     volumes:
         - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
         - ./files/xos_vtn_config:/opt/xos/xos_configuration/xos_vtn_config:ro
diff --git a/opencloud/xos.yaml b/opencloud/xos.yaml
index 6fd072d..63ee17f 100644
--- a/opencloud/xos.yaml
+++ b/opencloud/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 80
-        bootstrap_ui_port: 81
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: oc
         db_container_name: ocb_xos_db_1
 
diff --git a/test-standalone/Makefile b/test-standalone/Makefile
index 42ba754..ecd5f7e 100644
--- a/test-standalone/Makefile
+++ b/test-standalone/Makefile
@@ -8,8 +8,8 @@
 DOCKER_PROJECT     ?= teststandalone
 BOOTSTRAP_PROJECT  ?= teststandalonebs
 
-XOS_BOOTSTRAP_PORT ?= 9998
-XOS_UI_PORT        ?= 9999
+XOS_BOOTSTRAP_PORT ?= 9001
+XOS_UI_PORT        ?= 9000
 
 DB_NAME            ?= $(BOOTSTRAP_PROJECT)_xos_db_1
 
diff --git a/test-standalone/docker-compose-bootstrap.yml b/test-standalone/docker-compose-bootstrap.yml
index c8910fd..0769731 100644
--- a/test-standalone/docker-compose-bootstrap.yml
+++ b/test-standalone/docker-compose-bootstrap.yml
@@ -17,9 +17,9 @@
     image: xosproject/xos
     networks:
       - xos
-    command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
+    command: python /opt/xos/manage.py runserver 0.0.0.0:9001 --insecure --makemigrations
     ports:
-        - "9998:9998"
+        - "9001:9001"
     links:
         - xos_db
     volumes:
diff --git a/test-standalone/xos.yaml b/test-standalone/xos.yaml
index 81446a3..b22513a 100644
--- a/test-standalone/xos.yaml
+++ b/test-standalone/xos.yaml
@@ -10,8 +10,8 @@
     xos:
       type: tosca.nodes.XOS
       properties:
-        ui_port: 9999
-        bootstrap_ui_port: 9998
+        ui_port:  9000
+        bootstrap_ui_port:  9001
         docker_project_name: teststandalone
         db_container_name: teststandalonebs_xos_db_1
         frontend_only: true