Matteo Scandolo | 76d7bcd | 2016-11-30 17:08:17 -0800 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | description: Onboard the exampleservice |
| 4 | |
| 5 | imports: |
| 6 | - custom_types/xos.yaml |
| 7 | |
| 8 | topology_template: |
| 9 | node_templates: |
| 10 | |
| 11 | # API Gateway |
| 12 | xos-rest-gateway: |
| 13 | type: tosca.nodes.Component |
| 14 | properties: |
Matteo Scandolo | 76d7bcd | 2016-11-30 17:08:17 -0800 | [diff] [blame] | 15 | image: xosproject/xos-rest-gw |
| 16 | command: npm start -- --config gateway-config.yml |
| 17 | ports: 3000:3000 |
| 18 | |
Matteo Scandolo | a317b87 | 2017-01-10 12:02:41 -0800 | [diff] [blame] | 19 | # API Gateway config file |
Matteo Scandolo | 76d7bcd | 2016-11-30 17:08:17 -0800 | [diff] [blame] | 20 | /var/www/src/config/gateway-config.yml: |
| 21 | type: tosca.nodes.ComponentVolume |
| 22 | properties: |
Matteo Scandolo | a317b87 | 2017-01-10 12:02:41 -0800 | [diff] [blame] | 23 | host_path: { path_join: [ SELF, CONFIG_DIR, ./../common/gateway-config.yml, ENV_VAR ] } |
Matteo Scandolo | 76d7bcd | 2016-11-30 17:08:17 -0800 | [diff] [blame] | 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: frontendbs_xos_redis_1 |
| 45 | alias: redis |
| 46 | kind: external |
| 47 | requirements: |
| 48 | - xos: |
| 49 | node: xos-rest-gateway |
Matteo Scandolo | 76d7bcd | 2016-11-30 17:08:17 -0800 | [diff] [blame] | 50 | relationship: tosca.relationships.LinkOfComponent |