blob: bd382cbfa2fe70aa707daab035fce84847066fbe [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
30 - custom_types/internetemulatorservice.yaml
31 - custom_types/internetemulatorserviceinstance.yaml
Andy Bavier2dc220c2017-10-12 15:10:30 -070032
33topology_template:
34 node_templates:
35
36# site, image, fully created in deployment.yaml
37 {{ site_name }}:
38 type: tosca.nodes.Site
Pingping Lina59faf82017-10-18 22:52:12 -070039 properties:
40 must-exist: true
41 name: {{ site_name }}
Andy Bavier2dc220c2017-10-12 15:10:30 -070042
43 m1.small:
44 type: tosca.nodes.Flavor
Pingping Lina59faf82017-10-18 22:52:12 -070045 properties:
46 name: m1.small
47 must-exist: true
Andy Bavier2dc220c2017-10-12 15:10:30 -070048
49 trusty-server-multi-nic:
50 type: tosca.nodes.Image
Pingping Lina59faf82017-10-18 22:52:12 -070051 properties:
52 name: trusty-server-multi-nic
53 must-exist: true
Andy Bavier2dc220c2017-10-12 15:10:30 -070054
55# management networks, fully created in management-net.yaml
56 management:
Pingping Lina59faf82017-10-18 22:52:12 -070057 type: tosca.nodes.Network
Andy Bavier2dc220c2017-10-12 15:10:30 -070058 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070059 must-exist: true
60 name: management
Andy Bavier2dc220c2017-10-12 15:10:30 -070061
62{% if use_management_hosts %}
63 management_hosts:
Pingping Lina59faf82017-10-18 22:52:12 -070064 type: tosca.nodes.Network
Andy Bavier2dc220c2017-10-12 15:10:30 -070065 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070066 must-exist: true
67 name: management
Andy Bavier2dc220c2017-10-12 15:10:30 -070068{% endif %}
69
Andy Bavier79a95c02017-10-13 14:46:44 -070070# sgi_network is for connectivity between VMs, fully created in sgi-net.yaml
71 sgi_network:
Pingping Lina59faf82017-10-18 22:52:12 -070072 type: tosca.nodes.Network
Andy Bavier2dc220c2017-10-12 15:10:30 -070073 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070074 must-exist: true
75 name: sgi_network
Andy Bavier2dc220c2017-10-12 15:10:30 -070076
77
78# CORD Services
79 service#internetemulator:
80 type: tosca.nodes.InternetEmulatorService
81 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070082 name: internetemulator
83 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/mcord_rsa.pub') }}
Pingping Linab3fb462017-10-19 14:37:00 -070084 private_key_fn: /opt/xos/services/internetemulator/keys/mcord_rsa
Andy Bavier2dc220c2017-10-12 15:10:30 -070085 artifacts:
86 pubkey: /opt/cord_profile/key_import/mcord_rsa.pub
87
88# CORD Slices
89 mysite_internetemulator:
90 description: Internet Emulator Slice
91 type: tosca.nodes.Slice
92 properties:
Pingping Lina59faf82017-10-18 22:52:12 -070093 name: {{ site_name }}_internetemulator
94 default_isolation: vm
Andy Bavier2dc220c2017-10-12 15:10:30 -070095 requirements:
96 - site:
97 node: mysite
Pingping Lina59faf82017-10-18 22:52:12 -070098 relationship: tosca.relationships.BelongsToOne
99 - service:
Andy Bavier2dc220c2017-10-12 15:10:30 -0700100 node: service#internetemulator
Pingping Lina59faf82017-10-18 22:52:12 -0700101 relationship: tosca.relationships.BelongsToOne
Andy Bavier2dc220c2017-10-12 15:10:30 -0700102 - default_image:
103 node: trusty-server-multi-nic
Pingping Lina59faf82017-10-18 22:52:12 -0700104 relationship: tosca.relationships.BelongsToOne
Andy Bavier2dc220c2017-10-12 15:10:30 -0700105 - default_flavor:
106 node: m1.small
Pingping Lina59faf82017-10-18 22:52:12 -0700107 relationship: tosca.relationships.BelongsToOne
Andy Bavier79a95c02017-10-13 14:46:44 -0700108
Pingping Lina59faf82017-10-18 22:52:12 -0700109# TODO: will refactor this part later
Andy Bavier79a95c02017-10-13 14:46:44 -0700110# CORD Service Instances
Pingping Lina59faf82017-10-18 22:52:12 -0700111# serviceinstance#internetemulator_instance:
112# type: tosca.nodes.InternetEmulatorServiceInstance
113# properties:
114# name: internetemulator_instance
115# requirements:
Pingping Linab3fb462017-10-19 14:37:00 -0700116# - owner:
117# node: service#internetemulator
118# relationship: tosca.relationships.BelongsToOne