blob: 69f41e230e85a61d538237edc1d6e1c7d0c49a1c [file] [log] [blame]
Scott Baker3fd18e52018-04-17 09:18:21 -07001---
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16tosca_definitions_version: tosca_simple_yaml_1_0
17
18description: Make a new Service and a ServicePort for it
19
20imports:
21 - custom_types/trustdomain.yaml
22 - custom_types/site.yaml
23 - custom_types/slice.yaml
24 - custom_types/service.yaml
25 - custom_types/serviceport.yaml
26 - custom_types/kubernetesservice.yaml
27
28topology_template:
29 node_templates:
30 mysite:
31 type: tosca.nodes.Site
32 properties:
33 name: placeholder-sitename
34 must-exist: true
35
36 service#kubernetes:
37 type: tosca.nodes.KubernetesService
38 properties:
39 name: kubernetes
40 must-exist: true
41
42 service#demo:
43 type: tosca.nodes.Service
44 properties:
45 name: demo-service
46
47 demo_trustdomain:
48 type: tosca.nodes.TrustDomain
49 properties:
50 name: "demo-trust"
51 requirements:
52 - owner:
53 node: service#kubernetes
54 relationship: tosca.relationships.BelongsToOne
55
56 mysite_demo1:
57 type: tosca.nodes.Slice
58 properties:
59 name: "mysite_demo1"
60 requirements:
61 - site:
62 node: mysite
63 relationship: tosca.relationships.BelongsToOne
64 - trust_domain:
65 node: demo_trustdomain
66 relationship: tosca.relationships.BelongsToOne
67 - service:
68 node: service#demo
69 relationship: tosca.relationships.BelongsToOne
70
71 demo_service_web_port:
72 type: tosca.nodes.ServicePort
73 properties:
74 name: demo-service-web-port
75 internal_port: 80
76 external_port: 30080
77 protocol: "TCP"
78 requirements:
79 - service:
80 node: service#demo
81 relationship: tosca.relationships.BelongsToOne