blob: 3675bd92e8d42297468b8dbca8d4f13601be57bd [file] [log] [blame]
Gary Wuccd529b2018-01-16 18:31:01 -08001heat_template_version: 2015-10-15
2description: ONAP on Kubernetes using OOM
3
4parameters:
Gary Wuccd529b2018-01-16 18:31:01 -08005 docker_proxy:
6 type: string
7
8 apt_proxy:
9 type: string
10
Gary Wuc98156d2018-01-18 12:03:26 -080011 public_net_id:
12 type: string
13 description: The ID of the Public network for floating IP address allocation
14
Gary Wu60dd0d82018-01-18 14:54:47 -080015 public_net_name:
16 type: string
17 description: The name of the Public network referred by public_net_id
18
Gary Wuc98156d2018-01-18 12:03:26 -080019 oam_network_cidr:
20 type: string
21 description: CIDR of the OAM ONAP network
22
23 keystone_url:
24 type: string
25 description: URL of OpenStack Keystone
26
27 openstack_tenant_id:
28 type: string
29 description: OpenStack tenant ID
30
31 openstack_tenant_name:
32 type: string
33 description: OpenStack tenant name (matching with the openstack_tenant_id)
34
35 openstack_username:
36 type: string
37 description: OpenStack username
38
39 openstack_api_key:
40 type: string
41 description: OpenStack password or API Key
42
43 ubuntu_1404_image:
44 type: string
45 description: Name of the Ubuntu 14.04 image
46
Gary Wu60dd0d82018-01-18 14:54:47 -080047 ubuntu_1604_image:
48 type: string
49 description: Name of the Ubuntu 16.04 image
50
51 centos_7_image:
52 type: string
53 description: the id/name of the CentOS 7 VM imange
54
55 rancher_vm_flavor:
56 type: string
57 description: Name of the Ubuntu 14.04 image
58
59 k8s_vm_flavor:
60 type: string
61 description: Name of the Ubuntu 14.04 image
62
Gary Wu60dd0d82018-01-18 14:54:47 -080063 dns_forwarder:
64 type: string
65 description: the forwarder address for setting up ONAP's private DNS server
66
Gary Wu7b416392018-01-19 13:16:49 -080067 external_dns:
68 type: string
69 description: Public IP of the external DNS for ONAP network
70
71 dnsaas_proxy_enable:
72 type: string
73 description: whether to enable DNSaaS proxy via multicloud
74
75 dnsaas_region:
76 type: string
77 description: the region of the cloud instance providing the Designate DNS as a Service
78
Gary Wu52dfdcb2018-01-25 11:02:48 -080079 dnsaas_proxied_keystone_url_path:
80 type: string
81 description: the proxy keystone URL path for DCAE to use (via MultiCloud)
82
Gary Wu7b416392018-01-19 13:16:49 -080083 dnsaas_keystone_url:
84 type: string
85 description: the keystone URL of the cloud instance providing the Designate DNS as a Service
86
87 dnsaas_username:
88 type: string
89 description: the username of the cloud instance providing the Designate DNS as a Service
90
91 dnsaas_password:
92 type: string
93 description: the password of the cloud instance providing the Designate DNS as a Service
94
Gary Wu52dfdcb2018-01-25 11:02:48 -080095 dnsaas_tenant_id:
96 type: string
97 description: the ID of the tenant in the cloud instance providing the Designate DNS as a Service
98
Gary Wu7b416392018-01-19 13:16:49 -080099 dnsaas_tenant_name:
100 type: string
101 description: the name of the tenant in the cloud instance providing the Designate DNS as a Service
102
Gary Wuccd529b2018-01-16 18:31:01 -0800103resources:
Gary Wuc98156d2018-01-18 12:03:26 -0800104 random-str:
105 type: OS::Heat::RandomString
106 properties:
107 length: 4
108
Gary Wu52dfdcb2018-01-25 11:02:48 -0800109 # ONAP management private network
110 oam_network:
111 type: OS::Neutron::Net
112 properties:
113 name:
114 str_replace:
115 template: oam_network_rand
116 params:
117 rand: { get_resource: random-str }
118
119 oam_subnet:
120 type: OS::Neutron::Subnet
121 properties:
122 name:
123 str_replace:
124 template: oam_network_rand
125 params:
126 rand: { get_resource: random-str }
127 network_id: { get_resource: oam_network }
128 cidr: { get_param: oam_network_cidr }
129 dns_nameservers: [ get_param: dns_forwarder ]
130
131 router:
132 type: OS::Neutron::Router
133 properties:
134 external_gateway_info:
135 network: { get_param: public_net_id }
136
137 router_interface:
138 type: OS::Neutron::RouterInterface
139 properties:
140 router_id: { get_resource: router }
141 subnet_id: { get_resource: oam_subnet }
142
Gary Wuccd529b2018-01-16 18:31:01 -0800143 rancher_vm:
144 type: OS::Nova::Server
145 properties:
146 name: rancher
Gary Wu558ac6e2018-01-19 14:53:12 -0800147 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800148 flavor: { get_param: rancher_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800149 key_name: onap_key
150 networks:
151 - network: { get_param: public_net_id }
152 user_data_format: RAW
153 user_data:
154 str_replace:
155 params:
156 __docker_proxy__: { get_param: docker_proxy }
157 __apt_proxy__: { get_param: apt_proxy }
Gary Wu1ff56672018-01-17 20:51:45 -0800158 template:
159 get_file: rancher_vm_entrypoint.sh
Gary Wuccd529b2018-01-16 18:31:01 -0800160
Gary Wu52dfdcb2018-01-25 11:02:48 -0800161 k8s_private_port:
162 type: OS::Neutron::Port
163 properties:
164 network: { get_resource: oam_network }
165 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
166
167 k8s_floating_ip:
168 type: OS::Neutron::FloatingIP
169 properties:
170 floating_network_id: { get_param: public_net_id }
171 port_id: { get_resource: k8s_private_port }
172
Gary Wuccd529b2018-01-16 18:31:01 -0800173 k8s_vm:
174 type: OS::Nova::Server
175 properties:
176 name: k8s
Gary Wu558ac6e2018-01-19 14:53:12 -0800177 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800178 flavor: { get_param: k8s_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800179 key_name: onap_key
180 networks:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800181 - port: { get_resource: k8s_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800182 user_data_format: RAW
183 user_data:
184 str_replace:
185 params:
186 __docker_proxy__: { get_param: docker_proxy }
187 __apt_proxy__: { get_param: apt_proxy }
188 __rancher_ip_addr__: { get_attr: [rancher_vm, first_address] }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800189 __k8s_ip_addr__: { get_attr: [k8s_floating_ip, floating_ip_address] }
Gary Wuc98156d2018-01-18 12:03:26 -0800190 __openstack_tenant_id__: { get_param: openstack_tenant_id }
191 __openstack_tenant_name__: { get_param: openstack_tenant_name }
192 __openstack_username__: { get_param: openstack_username }
193 __openstack_api_key__: { get_param : openstack_api_key }
194 __public_net_id__: { get_param: public_net_id }
Gary Wu60dd0d82018-01-18 14:54:47 -0800195 __public_net_name__: { get_param: public_net_name }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800196 __oam_network_id__: { get_resource: oam_network }
Gary Wuc98156d2018-01-18 12:03:26 -0800197 __oam_network_cidr__: { get_param: oam_network_cidr }
198 __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800199 __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
200 __centos_7_image__: { get_param: centos_7_image }
Gary Wuc98156d2018-01-18 12:03:26 -0800201 __keystone_url__: { get_param: keystone_url }
Gary Wu60dd0d82018-01-18 14:54:47 -0800202 __dns_forwarder__: { get_param: dns_forwarder }
Gary Wu7b416392018-01-19 13:16:49 -0800203 __external_dns__: { get_param: external_dns }
204 __dnsaas_proxy_enable__: { get_param: dnsaas_proxy_enable }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800205 __dnsaas_proxied_keystone_url_path__: { get_param: dnsaas_proxied_keystone_url_path }
Gary Wu7b416392018-01-19 13:16:49 -0800206 __dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
207 __dnsaas_region__: { get_param: dnsaas_region }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800208 __dnsaas_tenant_id__: { get_param: dnsaas_tenant_id }
Gary Wu7b416392018-01-19 13:16:49 -0800209 __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
210 __dnsaas_username__: { get_param: dnsaas_username }
211 __dnsaas_password__: { get_param: dnsaas_password }
Gary Wu1ff56672018-01-17 20:51:45 -0800212 template:
213 get_file: k8s_vm_entrypoint.sh
Gary Wu7b416392018-01-19 13:16:49 -0800214
Gary Wu14ee41d2018-01-19 15:03:59 -0800215outputs:
Gary Wu61034082018-01-22 12:48:50 -0800216 rancher_vm_ip:
217 description: The IP address of the rancher instance
218 value: { get_attr: [rancher_vm, first_address] }
219
Gary Wu14ee41d2018-01-19 15:03:59 -0800220 k8s_vm_ip:
221 description: The IP address of the k8s instance
Gary Wu52dfdcb2018-01-25 11:02:48 -0800222 value: { get_attr: [k8s_floating_ip, floating_ip_address] }