blob: 3c8208a2dd4cca15e653e81823a8b78eaf8df5e0 [file] [log] [blame]
Scott Baker970f24b2017-02-13 14:16:40 -08001tosca_definitions_version: tosca_simple_yaml_1_0
2
3description: Onboard the exampleservice
4
5imports:
6 - custom_types/xos.yaml
7
8topology_template:
9 node_templates:
10
11 # API Gateway
Matteo Scandolofb9ac8a2017-04-19 15:51:11 -070012 xos-ws:
Scott Baker970f24b2017-02-13 14:16:40 -080013 type: tosca.nodes.Component
14 properties:
Matteo Scandolofb9ac8a2017-04-19 15:51:11 -070015 image: {{ deploy_docker_registry }}xosproject/xos-ws:{{ deploy_docker_tag }}
Scott Baker970f24b2017-02-13 14:16:40 -080016 command: npm start -- --config gateway-config.yml
17 ports: 3000:3000
18
19 # API Gateway config file
20 /var/www/src/config/gateway-config.yml:
21 type: tosca.nodes.ComponentVolume
22 properties:
23 host_path: "{{ cord_profile_dir }}/gateway-config.yml"
24 read_only: false
25 requirements:
26 - xos:
27 node: xos-rest-gateway
28 relationship: tosca.relationships.VolumeOfComponent
29
30 gw-to-xos:
31 type: tosca.nodes.ComponentLink
32 properties:
33 container: xos_ui
34 alias: xos
35 kind: internal
36 requirements:
37 - xos:
Matteo Scandolofb9ac8a2017-04-19 15:51:11 -070038 node: xos-ws
Scott Baker970f24b2017-02-13 14:16:40 -080039 relationship: tosca.relationships.LinkOfComponent
40
41 gw-to-redis:
42 type: tosca.nodes.ComponentLink
43 properties:
Matteo Scandolo2e419b12017-02-16 13:14:16 -080044 container: {{ cord_profile | regex_replace('\\W','') }}bs_xos_redis_1
Scott Baker970f24b2017-02-13 14:16:40 -080045 alias: redis
46 kind: external
47 requirements:
48 - xos:
Matteo Scandolofb9ac8a2017-04-19 15:51:11 -070049 node: xos-ws
Andy Baviera6cffe12017-03-15 17:33:42 -040050 relationship: tosca.relationships.LinkOfComponent