Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | description: Onboard XOS |
| 4 | |
| 5 | imports: |
| 6 | - custom_types/xos.yaml |
| 7 | |
| 8 | topology_template: |
| 9 | node_templates: |
| 10 | |
| 11 | xos: |
| 12 | type: tosca.nodes.XOS |
| 13 | properties: |
| 14 | ui_port: {{ xos_ui_port }} |
| 15 | bootstrap_ui_port: {{ xos_bootstrap_ui_port }} |
| 16 | docker_project_name: {{ cord_profile | regex_replace('\W','') }} |
| 17 | db_container_name: {{ cord_profile | regex_replace('\W','') }}bs_xos_db_1 |
| 18 | {% if use_redis %} |
| 19 | redis_container_name: {{ cord_profile | regex_replace('\W','') }}bs_xos_redis_1 |
| 20 | {% endif %} |
| 21 | {% if frontend_only is defined %} |
| 22 | frontend_only: {{ frontend_only }} |
| 23 | {% endif %} |
| 24 | {% if source_ui_image is defined %} |
| 25 | source_ui_image: {{ source_ui_image }} |
| 26 | {% endif %} |
| 27 | |
| 28 | /opt/xos/xos_configuration/xos_common_config: |
| 29 | type: tosca.nodes.XOSVolume |
| 30 | properties: |
| 31 | host_path: {{ cord_profile_dir }}/xos_common_config |
| 32 | read_only: True |
| 33 | requirements: |
| 34 | - xos: |
| 35 | node: xos |
| 36 | relationship: tosca.relationships.UsedByXOS |
| 37 | |
| 38 | /opt/cord_profile: |
| 39 | type: tosca.nodes.XOSVolume |
| 40 | properties: |
| 41 | host_path: {{ cord_profile_dir }} |
| 42 | read_only: True |
| 43 | requirements: |
| 44 | - xos: |
| 45 | node: xos |
| 46 | relationship: tosca.relationships.UsedByXOS |
| 47 | |
| 48 | {% for library in xos_libraries %} |
| 49 | /opt/xos_libraries/{{ library }}: |
| 50 | type: tosca.nodes.XOSVolume |
| 51 | properties: |
| 52 | host_path: {{ cord_dir }}/orchestration/xos_libraries/{{ library }} |
| 53 | read_only: True |
| 54 | requirements: |
| 55 | - xos: |
| 56 | node: xos |
| 57 | relationship: tosca.relationships.UsedByXOS |
| 58 | |
| 59 | {% endfor %} |
| 60 | |
| 61 | |
| 62 | {% for service in xos_services %} |
| 63 | /opt/xos_services/{{ service.path | basename }}: |
| 64 | type: tosca.nodes.XOSVolume |
| 65 | properties: |
| 66 | host_path: {{ cord_dir }}/{{ service.path }} |
| 67 | read_only: {{ service.read_only | default("True") }} |
| 68 | requirements: |
| 69 | - xos: |
| 70 | node: xos |
| 71 | relationship: tosca.relationships.UsedByXOS |
| 72 | |
| 73 | {% endfor %} |
| 74 | |
| 75 | {% for volume in xos_docker_volumes %} |
| 76 | {{ volume.container }}: |
| 77 | type: tosca.nodes.XOSVolume |
| 78 | properties: |
| 79 | host_path: {{ volume.host }} |
| 80 | read_only: {{ volume.read_only | default("True") }} |
| 81 | requirements: |
| 82 | - xos: |
| 83 | node: xos |
| 84 | relationship: tosca.relationships.UsedByXOS |
| 85 | |
| 86 | {% endfor %} |
| 87 | |