blob: 8b56bf66a5577e8eb747bd0a815aedfdd35c00a8 [file] [log] [blame]
Andy Bavier2dc220c2017-10-12 15:10:30 -07001
2{#
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16#}
17
18
19tosca_definitions_version: tosca_simple_yaml_1_0
20
21description: created by platform-install, need to add M-CORD services later
22
23imports:
24 - custom_types/xos.yaml
Pingping Lina59faf82017-10-18 22:52:12 -070025 - custom_types/slice.yaml
26 - custom_types/site.yaml
27 - custom_types/image.yaml
28 - custom_types/flavor.yaml
29 - custom_types/network.yaml
Andy Bavieree0c91b2017-10-19 13:05:39 -070030 - custom_types/networkslice.yaml
Pingping Lina59faf82017-10-18 22:52:12 -070031 - custom_types/internetemulatorservice.yaml
32 - custom_types/internetemulatorserviceinstance.yaml
Andy Bavier2dc220c2017-10-12 15:10:30 -070033
34topology_template:
35 node_templates:
36
37# site, image, fully created in deployment.yaml
38 {{ site_name }}:
39 type: tosca.nodes.Site
Pingping Lina59faf82017-10-18 22:52:12 -070040 properties:
41 must-exist: true
42 name: {{ site_name }}
Andy Bavier2dc220c2017-10-12 15:10:30 -070043
44 m1.small:
45 type: tosca.nodes.Flavor
Pingping Lina59faf82017-10-18 22:52:12 -070046 properties:
47 name: m1.small
48 must-exist: true
Andy Bavier2dc220c2017-10-12 15:10:30 -070049
50 trusty-server-multi-nic:
51 type: tosca.nodes.Image
Pingping Lina59faf82017-10-18 22:52:12 -070052 properties:
53 name: trusty-server-multi-nic
54 must-exist: true
Andy Bavier2dc220c2017-10-12 15:10:30 -070055
56# management networks, fully created in management-net.yaml
57 management:
Pingping Lina59faf82017-10-18 22:52:12 -070058 type: tosca.nodes.Network
Andy Bavier2dc220c2017-10-12 15:10:30 -070059 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070060 must-exist: true
61 name: management
Andy Bavier2dc220c2017-10-12 15:10:30 -070062
63{% if use_management_hosts %}
64 management_hosts:
Pingping Lina59faf82017-10-18 22:52:12 -070065 type: tosca.nodes.Network
Andy Bavier2dc220c2017-10-12 15:10:30 -070066 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070067 must-exist: true
Andy Bavieree0c91b2017-10-19 13:05:39 -070068 name: management_hosts
Andy Bavier2dc220c2017-10-12 15:10:30 -070069{% endif %}
70
Andy Bavier79a95c02017-10-13 14:46:44 -070071# sgi_network is for connectivity between VMs, fully created in sgi-net.yaml
72 sgi_network:
Pingping Lina59faf82017-10-18 22:52:12 -070073 type: tosca.nodes.Network
Andy Bavier2dc220c2017-10-12 15:10:30 -070074 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070075 must-exist: true
76 name: sgi_network
Andy Bavier2dc220c2017-10-12 15:10:30 -070077
78
79# CORD Services
80 service#internetemulator:
81 type: tosca.nodes.InternetEmulatorService
82 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070083 name: internetemulator
84 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/mcord_rsa.pub') }}
Pingping Linab3fb462017-10-19 14:37:00 -070085 private_key_fn: /opt/xos/services/internetemulator/keys/mcord_rsa
Andy Bavier2dc220c2017-10-12 15:10:30 -070086 artifacts:
87 pubkey: /opt/cord_profile/key_import/mcord_rsa.pub
88
89# CORD Slices
Andy Bavieree0c91b2017-10-19 13:05:39 -070090 {{ site_name }}_internetemulator:
Andy Bavier2dc220c2017-10-12 15:10:30 -070091 description: Internet Emulator Slice
92 type: tosca.nodes.Slice
93 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070094 name: {{ site_name }}_internetemulator
95 default_isolation: vm
Andy Bavieree0c91b2017-10-19 13:05:39 -070096 network: noauto
Andy Bavier2dc220c2017-10-12 15:10:30 -070097 requirements:
98 - site:
99 node: mysite
Pingping Lina59faf82017-10-18 22:52:12 -0700100 relationship: tosca.relationships.BelongsToOne
101 - service:
Andy Bavier2dc220c2017-10-12 15:10:30 -0700102 node: service#internetemulator
Pingping Lina59faf82017-10-18 22:52:12 -0700103 relationship: tosca.relationships.BelongsToOne
Andy Bavier2dc220c2017-10-12 15:10:30 -0700104 - default_image:
105 node: trusty-server-multi-nic
Pingping Lina59faf82017-10-18 22:52:12 -0700106 relationship: tosca.relationships.BelongsToOne
Andy Bavier2dc220c2017-10-12 15:10:30 -0700107 - default_flavor:
108 node: m1.small
Pingping Lina59faf82017-10-18 22:52:12 -0700109 relationship: tosca.relationships.BelongsToOne
Andy Bavier79a95c02017-10-13 14:46:44 -0700110
111# CORD Service Instances
Andy Bavieree0c91b2017-10-19 13:05:39 -0700112 serviceinstance#internetemulator_instance:
113 type: tosca.nodes.InternetEmulatorServiceInstance
114 properties:
115 name: internetemulator_instance
116 requirements:
117 - owner:
118 node: service#internetemulator
119 relationship: tosca.relationships.BelongsToOne
120
121# CORD NetworkSlices
122 internetemulator_slice_management_network:
123 type: tosca.nodes.NetworkSlice
124 requirements:
125 - network:
126 node: management
127 relationship: tosca.relationships.BelongsToOne
128 - slice:
129 node: {{ site_name }}_internetemulator
130 relationship: tosca.relationships.BelongsToOne
131
132 internetemulator_slice_sgi_network:
133 type: tosca.nodes.NetworkSlice
134 requirements:
135 - network:
136 node: sgi_network
137 relationship: tosca.relationships.BelongsToOne
138 - slice:
139 node: {{ site_name }}_internetemulator
140 relationship: tosca.relationships.BelongsToOne