blob: 6b51669e4ad24f832e5a145baccb77a9975ebb64 [file] [log] [blame]
Pingping Lin96f17e92017-05-04 18:16:54 -07001tosca_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
12 xos-rest-gateway:
13 type: tosca.nodes.Component
14 properties:
15 name: xos-rest-gateway
16 image: xosproject/xos-rest-gw
17 command: npm start -- --config gateway-config.yml
18 ports: 3000:3000
19
20 /var/www/src/config/gateway-config.yml:
21 type: tosca.nodes.ComponentVolume
22 properties:
23 host_path: { path_join: [ SELF, CONFIG_DIR, ./gateway-config.yml, ENV_VAR ] }
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:
38 node: xos-rest-gateway
39 relationship: tosca.relationships.LinkOfComponent
40
41 gw-to-redis:
42 type: tosca.nodes.ComponentLink
43 properties:
44 container: mcordbs_xos_redis_1
45 alias: redis
46 kind: external
47 requirements:
48 - xos:
49 node: xos-rest-gateway
50 relationship: tosca.relationships.LinkOfComponent
51
52
53 # UI Container
54 xos-spa-gui:
55 type: tosca.nodes.Component
56 properties:
57 # command: cd /var/www; BRAND=opencloud npm run build
58 name: xos-spa-gui
59 image: xosproject/xos-gui
60 ports: 4000:4000
61
62 # UI Style Config
63 /var/www/dist/style.config.js:
64 type: tosca.nodes.ComponentVolume
65 properties:
66 host_path: { path_join: [ SELF, CONFIG_DIR, ./ui-style-config.js, ENV_VAR ] }
67 read_only: false
68 requirements:
69 - xos:
70 node: xos-spa-gui
71 relationship: tosca.relationships.VolumeOfComponent
72
73 gui-to-gw:
74 type: tosca.nodes.ComponentLink
75 properties:
76 container: xos-rest-gateway
77 alias: xos-rest-gw
78 kind: internal
79 requirements:
80 - xos:
81 node: xos-spa-gui
82 relationship: tosca.relationships.LinkOfComponent