fa08320e36ea1a71d5227e3f24a1638d824cb29f
[it/dep.git] / tools / k8s / heat / parts / part-1.yaml
1 heat_template_version: 2015-10-15
2 description: OpenStack HOT for RIC Kubernetes cluster
3 ################################################################################
4 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
5 #   Copyright (c) 2019 Nokia.                                                  #
6 #                                                                              #
7 #   Licensed under the Apache License, Version 2.0 (the "License");            #
8 #   you may not use this file except in compliance with the License.           #
9 #   You may obtain a copy of the License at                                    #
10 #                                                                              #
11 #       http://www.apache.org/licenses/LICENSE-2.0                             #
12 #                                                                              #
13 #   Unless required by applicable law or agreed to in writing, software        #
14 #   distributed under the License is distributed on an "AS IS" BASIS,          #
15 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
16 #   See the License for the specific language governing permissions and        #
17 #   limitations under the License.                                             #
18 ################################################################################
19
20 parameters:
21   docker_proxy:
22     type: string
23     default: ""
24
25   apt_proxy:
26     type: string
27     default: ""
28
29   public_net_id:
30     type: string
31     description: The ID of the Public network for floating IP address allocation
32
33   public_v6net_id:
34     type: string
35     description: The ID of the IPv6 provider network for ipv6 interface IP address allocation
36
37   int_net_cidr:
38     type: string
39     description: CIDR of the OAM ONAP network
40
41   ubuntu_1604_image:
42     type: string
43     description: Name of the Ubuntu 16.04 image
44
45   k8s_vm_flavor:
46     type: string
47     description: VM flavor for k8s hosts
48
49   helm_override_yaml:
50     type: string
51     description: Content for helm_override.yaml
52
53   docker_manifest:
54     type: string
55     default: ""
56
57   key_name:
58     type: string
59     default: "id-oran-int"
60
61   docker_version:
62     type: string
63     default: "18.06.1"
64
65   k8s_version:
66     type: string
67     default: "1.18.3"
68
69   k8s_cni_version:
70     type: string
71     default: "0.6.0"
72
73   helm_version:
74     type: string
75     default: "3.2.3"
76
77   helm_deploy_delay:
78     type: string
79     default: "2m"
80
81   use_ramdisk:
82     type: string
83     description: Set to "true" if you want to use a RAM disk for /dockerdata-nfs/.
84     default: "false"
85
86   mtu:
87     type: number
88     default: 1500
89
90 resources:
91   random-str:
92     type: OS::Heat::RandomString
93     properties:
94       length: 4
95
96   cinder_volume:
97     type: OS::Cinder::Volume
98     properties:
99       size: 5
100       name:
101         str_replace:
102           template: volume_rand
103           params:
104             rand: { get_resource: random-str }
105
106   # RIC security group
107   ric_sg:
108     type: OS::Neutron::SecurityGroup
109     properties:
110       name:
111         str_replace:
112           template: base_rand
113           params:
114             base: ric_sg
115             rand: { get_resource: random-str }
116       description: security group for RIC traffic
117       rules:
118         # All egress traffic
119         - direction: egress
120           ethertype: IPv4
121         - direction: egress
122           ethertype: IPv6
123         # ingress traffic
124         # ICMP
125         - protocol: icmp
126           ethertype: IPv4
127         - protocol: icmp
128           ethertype: IPv6
129         - protocol: udp
130           ethertype: IPv4
131           port_range_min: 1
132           port_range_max: 65535
133         - protocol: udp
134           ethertype: IPv6
135           port_range_min: 1
136           port_range_max: 65535
137         - protocol: tcp
138           ethertype: IPv4
139           port_range_min: 1
140           port_range_max: 65535
141         - protocol: tcp
142           ethertype: IPv6
143           port_range_min: 1
144           port_range_max: 65535
145         # additional IP Protocols to allow
146         # SCTP
147         - protocol: 132
148           ethertype: IPv4
149         - protocol: 132
150           ethertype: IPv6
151
152
153   # RIC internal network
154   int_network:
155     type: OS::Neutron::Net
156     properties:
157       name:
158         str_replace:
159           template: ric_network_rand
160           params:
161             rand: { get_resource: random-str }
162
163   int_subnet:
164     type: OS::Neutron::Subnet
165     properties:
166       name:
167         str_replace:
168           template: oam_network_rand
169           params:
170             rand: { get_resource: random-str }
171       network_id: { get_resource: int_network }
172       cidr: { get_param: int_net_cidr }
173       dns_nameservers: [ "8.8.8.8" ]
174
175
176   router:
177     type: OS::Neutron::Router
178     properties:
179       name:
180         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
181       external_gateway_info:
182         network: { get_param: public_net_id }
183
184   router_interface:
185     type: OS::Neutron::RouterInterface
186     properties:
187       router_id: { get_resource: router }
188       subnet_id: { get_resource: int_subnet }
189