Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 1 | heat_template_version: 2015-10-15 |
| 2 | description: ONAP on Kubernetes using OOM |
| 3 | |
| 4 | parameters: |
Gary Wu | 19c81b4 | 2018-04-17 11:35:48 -0700 | [diff] [blame] | 5 | lab_name: |
| 6 | type: string |
| 7 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 8 | docker_proxy: |
| 9 | type: string |
| 10 | |
| 11 | apt_proxy: |
| 12 | type: string |
| 13 | |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 14 | public_net_id: |
| 15 | type: string |
| 16 | description: The ID of the Public network for floating IP address allocation |
| 17 | |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 18 | public_net_name: |
| 19 | type: string |
| 20 | description: The name of the Public network referred by public_net_id |
| 21 | |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 22 | oam_network_cidr: |
| 23 | type: string |
| 24 | description: CIDR of the OAM ONAP network |
| 25 | |
| 26 | keystone_url: |
| 27 | type: string |
| 28 | description: URL of OpenStack Keystone |
| 29 | |
| 30 | openstack_tenant_id: |
| 31 | type: string |
| 32 | description: OpenStack tenant ID |
| 33 | |
| 34 | openstack_tenant_name: |
| 35 | type: string |
| 36 | description: OpenStack tenant name (matching with the openstack_tenant_id) |
| 37 | |
| 38 | openstack_username: |
| 39 | type: string |
| 40 | description: OpenStack username |
| 41 | |
| 42 | openstack_api_key: |
| 43 | type: string |
| 44 | description: OpenStack password or API Key |
| 45 | |
| 46 | ubuntu_1404_image: |
| 47 | type: string |
| 48 | description: Name of the Ubuntu 14.04 image |
| 49 | |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 50 | ubuntu_1604_image: |
| 51 | type: string |
| 52 | description: Name of the Ubuntu 16.04 image |
| 53 | |
| 54 | centos_7_image: |
| 55 | type: string |
| 56 | description: the id/name of the CentOS 7 VM imange |
| 57 | |
| 58 | rancher_vm_flavor: |
| 59 | type: string |
| 60 | description: Name of the Ubuntu 14.04 image |
| 61 | |
| 62 | k8s_vm_flavor: |
| 63 | type: string |
| 64 | description: Name of the Ubuntu 14.04 image |
| 65 | |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 66 | dns_forwarder: |
| 67 | type: string |
| 68 | description: the forwarder address for setting up ONAP's private DNS server |
| 69 | |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 70 | external_dns: |
| 71 | type: string |
| 72 | description: Public IP of the external DNS for ONAP network |
| 73 | |
| 74 | dnsaas_proxy_enable: |
| 75 | type: string |
| 76 | description: whether to enable DNSaaS proxy via multicloud |
| 77 | |
| 78 | dnsaas_region: |
| 79 | type: string |
| 80 | description: the region of the cloud instance providing the Designate DNS as a Service |
| 81 | |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 82 | dnsaas_proxied_keystone_url_path: |
| 83 | type: string |
| 84 | description: the proxy keystone URL path for DCAE to use (via MultiCloud) |
| 85 | |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 86 | dnsaas_keystone_url: |
| 87 | type: string |
| 88 | description: the keystone URL of the cloud instance providing the Designate DNS as a Service |
| 89 | |
| 90 | dnsaas_username: |
| 91 | type: string |
| 92 | description: the username of the cloud instance providing the Designate DNS as a Service |
| 93 | |
| 94 | dnsaas_password: |
| 95 | type: string |
| 96 | description: the password of the cloud instance providing the Designate DNS as a Service |
| 97 | |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 98 | dnsaas_tenant_id: |
| 99 | type: string |
| 100 | description: the ID of the tenant in the cloud instance providing the Designate DNS as a Service |
| 101 | |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 102 | dnsaas_tenant_name: |
| 103 | type: string |
| 104 | description: the name of the tenant in the cloud instance providing the Designate DNS as a Service |
| 105 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 106 | resources: |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 107 | random-str: |
| 108 | type: OS::Heat::RandomString |
| 109 | properties: |
| 110 | length: 4 |
| 111 | |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 112 | # ONAP security group |
| 113 | onap_sg: |
| 114 | type: OS::Neutron::SecurityGroup |
| 115 | properties: |
| 116 | name: |
| 117 | str_replace: |
| 118 | template: base_rand |
| 119 | params: |
| 120 | base: onap_sg |
| 121 | rand: { get_resource: random-str } |
| 122 | description: security group used by ONAP |
| 123 | rules: |
| 124 | # All egress traffic |
| 125 | - direction: egress |
| 126 | ethertype: IPv4 |
| 127 | - direction: egress |
| 128 | ethertype: IPv6 |
| 129 | # ingress traffic |
| 130 | # ICMP |
| 131 | - protocol: icmp |
| 132 | - protocol: udp |
| 133 | port_range_min: 1 |
| 134 | port_range_max: 65535 |
| 135 | - protocol: tcp |
| 136 | port_range_min: 1 |
| 137 | port_range_max: 65535 |
| 138 | |
| 139 | |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 140 | # ONAP management private network |
| 141 | oam_network: |
| 142 | type: OS::Neutron::Net |
| 143 | properties: |
| 144 | name: |
| 145 | str_replace: |
| 146 | template: oam_network_rand |
| 147 | params: |
| 148 | rand: { get_resource: random-str } |
| 149 | |
| 150 | oam_subnet: |
| 151 | type: OS::Neutron::Subnet |
| 152 | properties: |
| 153 | name: |
| 154 | str_replace: |
| 155 | template: oam_network_rand |
| 156 | params: |
| 157 | rand: { get_resource: random-str } |
| 158 | network_id: { get_resource: oam_network } |
| 159 | cidr: { get_param: oam_network_cidr } |
| 160 | dns_nameservers: [ get_param: dns_forwarder ] |
| 161 | |
| 162 | router: |
| 163 | type: OS::Neutron::Router |
| 164 | properties: |
| 165 | external_gateway_info: |
| 166 | network: { get_param: public_net_id } |
| 167 | |
| 168 | router_interface: |
| 169 | type: OS::Neutron::RouterInterface |
| 170 | properties: |
| 171 | router_id: { get_resource: router } |
| 172 | subnet_id: { get_resource: oam_subnet } |
| 173 | |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 174 | rancher_private_port: |
| 175 | type: OS::Neutron::Port |
| 176 | properties: |
| 177 | network: { get_resource: oam_network } |
| 178 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 179 | security_groups: |
| 180 | - { get_resource: onap_sg } |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 181 | |
| 182 | rancher_floating_ip: |
| 183 | type: OS::Neutron::FloatingIP |
| 184 | properties: |
| 185 | floating_network_id: { get_param: public_net_id } |
| 186 | port_id: { get_resource: rancher_private_port } |
| 187 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 188 | rancher_vm: |
| 189 | type: OS::Nova::Server |
| 190 | properties: |
| 191 | name: rancher |
Gary Wu | 558ac6e | 2018-01-19 14:53:12 -0800 | [diff] [blame] | 192 | image: { get_param: ubuntu_1604_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 193 | flavor: { get_param: rancher_vm_flavor } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 194 | key_name: onap_key |
| 195 | networks: |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 196 | - port: { get_resource: rancher_private_port } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 197 | user_data_format: RAW |
| 198 | user_data: |
| 199 | str_replace: |
| 200 | params: |
| 201 | __docker_proxy__: { get_param: docker_proxy } |
| 202 | __apt_proxy__: { get_param: apt_proxy } |
Gary Wu | 1ff5667 | 2018-01-17 20:51:45 -0800 | [diff] [blame] | 203 | template: |
| 204 | get_file: rancher_vm_entrypoint.sh |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 205 | |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 206 | k8s_private_port: |
| 207 | type: OS::Neutron::Port |
| 208 | properties: |
| 209 | network: { get_resource: oam_network } |
| 210 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 211 | security_groups: |
| 212 | - { get_resource: onap_sg } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 213 | |
| 214 | k8s_floating_ip: |
| 215 | type: OS::Neutron::FloatingIP |
| 216 | properties: |
| 217 | floating_network_id: { get_param: public_net_id } |
| 218 | port_id: { get_resource: k8s_private_port } |
| 219 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 220 | k8s_vm: |
| 221 | type: OS::Nova::Server |
| 222 | properties: |
| 223 | name: k8s |
Gary Wu | 558ac6e | 2018-01-19 14:53:12 -0800 | [diff] [blame] | 224 | image: { get_param: ubuntu_1604_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 225 | flavor: { get_param: k8s_vm_flavor } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 226 | key_name: onap_key |
| 227 | networks: |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 228 | - port: { get_resource: k8s_private_port } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 229 | user_data_format: RAW |
| 230 | user_data: |
| 231 | str_replace: |
| 232 | params: |
Gary Wu | 19c81b4 | 2018-04-17 11:35:48 -0700 | [diff] [blame] | 233 | __lab_name__: { get_param: lab_name } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 234 | __docker_proxy__: { get_param: docker_proxy } |
| 235 | __apt_proxy__: { get_param: apt_proxy } |
Gary Wu | 5d325d0 | 2018-02-06 21:21:31 -0800 | [diff] [blame] | 236 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 237 | __k8s_ip_addr__: { get_attr: [k8s_floating_ip, floating_ip_address] } |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 238 | __openstack_tenant_id__: { get_param: openstack_tenant_id } |
| 239 | __openstack_tenant_name__: { get_param: openstack_tenant_name } |
| 240 | __openstack_username__: { get_param: openstack_username } |
| 241 | __openstack_api_key__: { get_param : openstack_api_key } |
| 242 | __public_net_id__: { get_param: public_net_id } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 243 | __public_net_name__: { get_param: public_net_name } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 244 | __oam_network_id__: { get_resource: oam_network } |
Gary Wu | 57abb1a | 2018-03-09 13:38:28 -0800 | [diff] [blame] | 245 | __oam_subnet_id__: { get_resource: oam_subnet } |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 246 | __oam_network_cidr__: { get_param: oam_network_cidr } |
| 247 | __ubuntu_1404_image__: { get_param: ubuntu_1404_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 248 | __ubuntu_1604_image__: { get_param: ubuntu_1604_image } |
| 249 | __centos_7_image__: { get_param: centos_7_image } |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 250 | __keystone_url__: { get_param: keystone_url } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 251 | __dns_forwarder__: { get_param: dns_forwarder } |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 252 | __external_dns__: { get_param: external_dns } |
| 253 | __dnsaas_proxy_enable__: { get_param: dnsaas_proxy_enable } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 254 | __dnsaas_proxied_keystone_url_path__: { get_param: dnsaas_proxied_keystone_url_path } |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 255 | __dnsaas_keystone_url__: { get_param: dnsaas_keystone_url } |
| 256 | __dnsaas_region__: { get_param: dnsaas_region } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 257 | __dnsaas_tenant_id__: { get_param: dnsaas_tenant_id } |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 258 | __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name } |
| 259 | __dnsaas_username__: { get_param: dnsaas_username } |
| 260 | __dnsaas_password__: { get_param: dnsaas_password } |
Gary Wu | 1ff5667 | 2018-01-17 20:51:45 -0800 | [diff] [blame] | 261 | template: |
| 262 | get_file: k8s_vm_entrypoint.sh |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 263 | |
Gary Wu | 14ee41d | 2018-01-19 15:03:59 -0800 | [diff] [blame] | 264 | outputs: |
Gary Wu | 6103408 | 2018-01-22 12:48:50 -0800 | [diff] [blame] | 265 | rancher_vm_ip: |
| 266 | description: The IP address of the rancher instance |
Gary Wu | 5d325d0 | 2018-02-06 21:21:31 -0800 | [diff] [blame] | 267 | value: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 6103408 | 2018-01-22 12:48:50 -0800 | [diff] [blame] | 268 | |
Gary Wu | 14ee41d | 2018-01-19 15:03:59 -0800 | [diff] [blame] | 269 | k8s_vm_ip: |
| 270 | description: The IP address of the k8s instance |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 271 | value: { get_attr: [k8s_floating_ip, floating_ip_address] } |