summaryrefslogtreecommitdiffstats
path: root/robot/assets/asdc/base_clearwater/base_clearwater.yaml
blob: c41b050925f54f610c4ea15a4042b30342d8071f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# Project Clearwater - IMS in the Cloud
# Copyright (C) 2015  Metaswitch Networks Ltd
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version, along with the "Special Exception" for use of
# the program along with SSL, set forth below. This program is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details. You should have received a copy of the GNU General Public
# License along with this program.  If not, see
# <http://www.gnu.org/licenses/>.
#
# The author can be reached by email at clearwater@metaswitch.com or by
# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK
#
# Special Exception
# Metaswitch Networks Ltd  grants you permission to copy, modify,
# propagate, and distribute a work formed by combining OpenSSL with The
# Software, or a work derivative of such a combination, even if such
# copying, modification, propagation, or distribution would otherwise
# violate the terms of the GPL. You must comply with the GPL in all
# respects for all of the code used other than OpenSSL.
# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL
# Project and licensed under the OpenSSL Licenses, or a work based on such
# software and licensed under the OpenSSL Licenses.
# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License
# under which the OpenSSL Project distributes the OpenSSL toolkit software,
# as those licenses appear in the file LICENSE-OPENSSL.

heat_template_version: 2013-05-23

description: >
  Base Project Clearwater deployment on ONAP (Open Network Automation Platform)

parameters:
  vnf_id:
    type: string
    label: VNF ID
    description: The VNF ID provided by ONAP
  vf_module_id:
    type: string
    label: VNF module ID
    description: The VNF module ID provided by ONAP
  public_net_id:
    type: string
    description: ID of public network
    constraints:
      - custom_constraint: neutron.network
        description: Must be a valid network ID
  bono_flavor_name:
    type: string
    description: VM flavor for bono VMs
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  sprout_flavor_name:
    type: string
    description: VM flavor for sprout VMs
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  homestead_flavor_name:
    type: string
    description: VM flavor for homestead VMs
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  homer_flavor_name:
    type: string
    description: VM flavor for homer VMs
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  ralf_flavor_name:
    type: string
    description: VM flavor for ralf VMs
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  ellis_flavor_name:
    type: string
    description: VM flavor for ellis VM
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  dns_flavor_name:
    type: string
    description: VM flavor for dns VM
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a valid flavor name
  bono_image_name:
    type: string
    description: Name of image for bono VMs
  sprout_image_name:
    type: string
    description: Name of image for sprout VMs
  homestead_image_name:
    type: string
    description: Name of image for homestead VMs
  homer_image_name:
    type: string
    description: Name of image for homer VMs
  ralf_image_name:
    type: string
    description: Name of image for ralf VMs
  ellis_image_name:
    type: string
    description: Name of image for ellis VM
  dns_image_name:
    type: string
    description: Name of image for dns VMs
  key_name:
    type: string
    description: Name of keypair to create
  pub_key:
    type: string
    label: Public key
    description: Public key to be installed on all compute instances
  repo_url:
    type: string
    description: URL for Clearwater repository
    default: http://repo.cw-ngv.com/stable
  zone:
    type: string
    description: DNS zone
    default: example.com
  dn_range_start:
    type: string
    description: First directory number in pool
    default: "6505550000"
    constraints:
      - allowed_pattern: "[0-9]+"
        description: Must be numeric
  dn_range_length:
    type: string
    description: Number of directory numbers to add to pool
    default: "1000"
    constraints:
      - allowed_pattern: "[0-9]+"
        description: Must be numeric
  dnssec_key:
    type: string
    description: DNSSEC private key (Base64-encoded)
    constraints:
      - allowed_pattern: "[0-9A-Za-z+/=]+"
        description: Must be Base64-encoded

resources:
  cw_keypair:
    type: OS::Nova::KeyPair
    properties:
      name: { get_param: key_name }
      public_key: { get_param: pub_key }
      save_private_key: false

# security_groups:
#   type: security-groups.yaml
#   properties:
#     name_prefix: { get_param: "OS::stack_name" }

  dns:
    type: dns.yaml
    properties:
      vnf_id: { get_param: vnf_id }
      vf_module_id: { get_param: vf_module_id }
      public_net_id: { get_param: public_net_id }
      dns_flavor_name: { get_param: dns_flavor_name }
      dns_image_name: { get_param: dns_image_name }
      key_name: { get_resource: cw_keypair }
#     dns_security_group: { get_attr: [ security_groups, dns ] }
      zone: { get_param: zone }
      dnssec_key: { get_param: dnssec_key }


  ellis:
    type: ellis.yaml
    properties:
      vnf_id: { get_param: vnf_id }
      vf_module_id: { get_param: vf_module_id }
      public_net_id: { get_param: public_net_id }
      ellis_flavor_name: { get_param: ellis_flavor_name }
      ellis_image_name: { get_param: ellis_image_name }
      key_name: { get_resource: cw_keypair }
#     base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] }
#     ellis_mgmt_security_group: { get_attr: [ security_groups, ellis_mgmt ] }
      repo_url: { get_param: repo_url }
      zone: { get_param: zone }
      dn_range_start: { get_param: dn_range_start }
      dn_range_length: { get_param: dn_range_length }
      dns_ip: { get_attr: [ dns, dns_ip ] }
      dnssec_key: { get_param: dnssec_key }

  bono:
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      index_var: "__index__"
      resource_def:
        type: bono.yaml
        properties:
          vnf_id: { get_param: vnf_id }
          vf_module_id: { get_param: vf_module_id }
          public_net_id: { get_param: public_net_id }
          bono_flavor_name: { get_param: bono_flavor_name }
          bono_image_name: { get_param: bono_image_name }
          key_name: { get_resource: cw_keypair }
#         base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] }
#         bono_sig_security_group: { get_attr: [ security_groups, bono_sig ] }
          repo_url: { get_param: repo_url }
          zone: { get_param: zone }
          dns_ip: { get_attr: [ dns, dns_ip ] }
          dnssec_key: { get_param: dnssec_key }
          etcd_ip: { get_attr: [ ellis, public_ip ] }
          index: __index__

  sprout:
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      index_var: __index__
      resource_def:
        type: sprout.yaml
        properties:
          vnf_id: { get_param: vnf_id }
          vf_module_id: { get_param: vf_module_id }
          public_net_id: { get_param: public_net_id }
          sprout_flavor_name: { get_param: sprout_flavor_name }
          sprout_image_name: { get_param: sprout_image_name }
          key_name: { get_resource: cw_keypair }
#         base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] }
#         sprout_sig_security_group: { get_attr: [ security_groups, sprout_sig ] }
#         sprout_sig2_security_group: { get_attr: [ security_groups, sprout_sig2 ] }
          repo_url: { get_param: repo_url }
          zone: { get_param: zone }
          dns_ip: { get_attr: [ dns, dns_ip ] }
          dnssec_key: { get_param: dnssec_key }
          etcd_ip: { get_attr: [ ellis, public_ip ] }
          index: __index__

  homer:
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      index_var: __index__
      resource_def:
        type: homer.yaml
        properties:
          vnf_id: { get_param: vnf_id }
          vf_module_id: { get_param: vf_module_id }
          public_net_id: { get_param: public_net_id }
          homer_flavor_name: { get_param: homer_flavor_name }
          homer_image_name: { get_param: homer_image_name }
          key_name: { get_resource: cw_keypair }
#         base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] }
#         homer_mgmt_security_group: { get_attr: [ security_groups, homer_mgmt ] }
#         homer_sig_security_group: { get_attr: [ security_groups, homer_sig ] }
          repo_url: { get_param: repo_url }
          zone: { get_param: zone }
          dns_ip: { get_attr: [ dns, dns_ip ] }
          dnssec_key: { get_param: dnssec_key }
          etcd_ip: { get_attr: [ ellis, public_ip ] }
          index: __index__

  homestead:
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      index_var: __index__
      resource_def:
        type: homestead.yaml
        properties:
          vnf_id: { get_param: vnf_id }
          vf_module_id: { get_param: vf_module_id }
          public_net_id: { get_param: public_net_id }
          homestead_flavor_name: { get_param: homestead_flavor_name }
          homestead_image_name: { get_param: homestead_image_name }
          key_name: { get_resource: cw_keypair }
#         base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] }
#         homestead_mgmt_security_group: { get_attr: [ security_groups, homestead_mgmt ] }
#         homestead_sig_security_group: { get_attr: [ security_groups, homestead_sig ] }
          repo_url: { get_param: repo_url }
          zone: { get_param: zone }
          dns_ip: { get_attr: [ dns, dns_ip ] }
          dnssec_key: { get_param: dnssec_key }
          etcd_ip: { get_attr: [ ellis, public_ip ] }
          index: __index__

  ralf:
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      index_var: __index__
      resource_def:
        type: ralf.yaml
        properties:
          vnf_id: { get_param: vnf_id }
          vf_module_id: { get_param: vf_module_id }
          public_net_id: { get_param: public_net_id }
          ralf_flavor_name: { get_param: ralf_flavor_name }
          ralf_image_name: { get_param: ralf_image_name }
          key_name: { get_resource: cw_keypair }
#         base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] }
#         ralf_sig_security_group: { get_attr: [ security_groups, ralf_sig ] }
          repo_url: { get_param: repo_url }
          zone: { get_param: zone }
          dns_ip: { get_attr: [ dns, dns_ip ] }
          dnssec_key: { get_param: dnssec_key }
          etcd_ip: { get_attr: [ ellis, public_ip ] }
          index: __index__

outputs:
  zone:
    description: DNS zone
    value: { get_param: zone }
  dns_ip:
    description: IP address of DNS
    value: { get_attr: [ dns, dns_ip ] }