Moved xos-rest-gw config in configuration folders
Change-Id: I9d521d89284f550ac2b95a75a375fab0e2f2463f
diff --git a/common/Makefile b/common/Makefile
index ce0b916..e85d92e 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -235,7 +235,7 @@
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) $(CONFIG_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)
diff --git a/cord-pod/docker-compose-bootstrap.yml b/cord-pod/docker-compose-bootstrap.yml
index 1e68f91..55e88ad 100644
--- a/cord-pod/docker-compose-bootstrap.yml
+++ b/cord-pod/docker-compose-bootstrap.yml
@@ -17,6 +17,8 @@
image: redis
networks:
- xos
+ ports:
+ - "6379:6379"
logging:
driver: "json-file"
options:
diff --git a/cord-pod/xos-rest-gw.yaml b/cord-pod/xos-rest-gw.yaml
new file mode 100644
index 0000000..1132dd9
--- /dev/null
+++ b/cord-pod/xos-rest-gw.yaml
@@ -0,0 +1,51 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+
+ # API Gateway
+ xos-rest-gateway:
+ type: tosca.nodes.Component
+ properties:
+ name: xos-rest-gateway
+ image: xosproject/xos-rest-gw
+ 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, ./../common/gateway-config.yml, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.VolumeOfComponent
+
+ gw-to-xos:
+ type: tosca.nodes.ComponentLink
+ properties:
+ container: xos_ui
+ alias: xos
+ kind: internal
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.LinkOfComponent
+
+ gw-to-redis:
+ type: tosca.nodes.ComponentLink
+ properties:
+ container: cordpodbs_xos_redis_1
+ alias: redis
+ kind: external
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file
diff --git a/common/xos-rest-gw.yaml b/frontend/xos-rest-gw.yaml
similarity index 100%
rename from common/xos-rest-gw.yaml
rename to frontend/xos-rest-gw.yaml
diff --git a/mcord/docker-compose-bootstrap.yml b/mcord/docker-compose-bootstrap.yml
index a4ce102..7701458 100644
--- a/mcord/docker-compose-bootstrap.yml
+++ b/mcord/docker-compose-bootstrap.yml
@@ -17,6 +17,8 @@
image: redis
networks:
- xos
+ ports:
+ - "6379:6379"
logging:
driver: "json-file"
options:
diff --git a/mcord/xos-rest-gw.yaml b/mcord/xos-rest-gw.yaml
new file mode 100644
index 0000000..843e8fc
--- /dev/null
+++ b/mcord/xos-rest-gw.yaml
@@ -0,0 +1,51 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+
+ # API Gateway
+ xos-rest-gateway:
+ type: tosca.nodes.Component
+ properties:
+ name: xos-rest-gateway
+ image: xosproject/xos-rest-gw
+ 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, ./../common/gateway-config.yml, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.VolumeOfComponent
+
+ gw-to-xos:
+ type: tosca.nodes.ComponentLink
+ properties:
+ container: xos_ui
+ alias: xos
+ kind: internal
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.LinkOfComponent
+
+ gw-to-redis:
+ type: tosca.nodes.ComponentLink
+ properties:
+ container: mcordbs_xos_redis_1
+ alias: redis
+ kind: external
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file
diff --git a/metronetwork/docker-compose-bootstrap.yml b/metronetwork/docker-compose-bootstrap.yml
index 6812288..f0408e3 100644
--- a/metronetwork/docker-compose-bootstrap.yml
+++ b/metronetwork/docker-compose-bootstrap.yml
@@ -13,6 +13,18 @@
expose:
- "5432"
+ xos_redis:
+ image: redis
+ networks:
+ - xos
+ ports:
+ - "6379:6379"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "1000k"
+ max-file: "5"
+
xos_bootstrap_ui:
image: xosproject/xos
networks:
diff --git a/metronetwork/xos-rest-gw.yaml b/metronetwork/xos-rest-gw.yaml
new file mode 100644
index 0000000..dbedbcb
--- /dev/null
+++ b/metronetwork/xos-rest-gw.yaml
@@ -0,0 +1,51 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+
+ # API Gateway
+ xos-rest-gateway:
+ type: tosca.nodes.Component
+ properties:
+ name: xos-rest-gateway
+ image: xosproject/xos-rest-gw
+ 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, ./../common/gateway-config.yml, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.VolumeOfComponent
+
+ gw-to-xos:
+ type: tosca.nodes.ComponentLink
+ properties:
+ container: xos_ui
+ alias: xos
+ kind: internal
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.LinkOfComponent
+
+ gw-to-redis:
+ type: tosca.nodes.ComponentLink
+ properties:
+ container: metronetworkbs_xos_redis_1
+ alias: redis
+ kind: external
+ requirements:
+ - xos:
+ node: xos-rest-gateway
+ relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file