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 | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 5 | docker_proxy: |
| 6 | type: string |
| 7 | |
| 8 | apt_proxy: |
| 9 | type: string |
| 10 | |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 11 | public_net_id: |
| 12 | type: string |
| 13 | description: The ID of the Public network for floating IP address allocation |
| 14 | |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 15 | public_net_name: |
| 16 | type: string |
| 17 | description: The name of the Public network referred by public_net_id |
| 18 | |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 19 | 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 Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 47 | 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 Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 63 | dns_forwarder: |
| 64 | type: string |
| 65 | description: the forwarder address for setting up ONAP's private DNS server |
| 66 | |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 67 | 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 Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 79 | dnsaas_proxied_keystone_url_path: |
| 80 | type: string |
| 81 | description: the proxy keystone URL path for DCAE to use (via MultiCloud) |
| 82 | |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 83 | 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 Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 95 | 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 Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 99 | 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 Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 103 | resources: |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 104 | random-str: |
| 105 | type: OS::Heat::RandomString |
| 106 | properties: |
| 107 | length: 4 |
| 108 | |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 109 | # ONAP security group |
| 110 | onap_sg: |
| 111 | type: OS::Neutron::SecurityGroup |
| 112 | properties: |
| 113 | name: |
| 114 | str_replace: |
| 115 | template: base_rand |
| 116 | params: |
| 117 | base: onap_sg |
| 118 | rand: { get_resource: random-str } |
| 119 | description: security group used by ONAP |
| 120 | rules: |
| 121 | # All egress traffic |
| 122 | - direction: egress |
| 123 | ethertype: IPv4 |
| 124 | - direction: egress |
| 125 | ethertype: IPv6 |
| 126 | # ingress traffic |
| 127 | # ICMP |
| 128 | - protocol: icmp |
| 129 | - protocol: udp |
| 130 | port_range_min: 1 |
| 131 | port_range_max: 65535 |
| 132 | - protocol: tcp |
| 133 | port_range_min: 1 |
| 134 | port_range_max: 65535 |
| 135 | |
| 136 | |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 137 | # ONAP management private network |
| 138 | oam_network: |
| 139 | type: OS::Neutron::Net |
| 140 | properties: |
| 141 | name: |
| 142 | str_replace: |
| 143 | template: oam_network_rand |
| 144 | params: |
| 145 | rand: { get_resource: random-str } |
| 146 | |
| 147 | oam_subnet: |
| 148 | type: OS::Neutron::Subnet |
| 149 | properties: |
| 150 | name: |
| 151 | str_replace: |
| 152 | template: oam_network_rand |
| 153 | params: |
| 154 | rand: { get_resource: random-str } |
| 155 | network_id: { get_resource: oam_network } |
| 156 | cidr: { get_param: oam_network_cidr } |
| 157 | dns_nameservers: [ get_param: dns_forwarder ] |
| 158 | |
| 159 | router: |
| 160 | type: OS::Neutron::Router |
| 161 | properties: |
| 162 | external_gateway_info: |
| 163 | network: { get_param: public_net_id } |
| 164 | |
| 165 | router_interface: |
| 166 | type: OS::Neutron::RouterInterface |
| 167 | properties: |
| 168 | router_id: { get_resource: router } |
| 169 | subnet_id: { get_resource: oam_subnet } |
| 170 | |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 171 | rancher_private_port: |
| 172 | type: OS::Neutron::Port |
| 173 | properties: |
| 174 | network: { get_resource: oam_network } |
| 175 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 176 | security_groups: |
| 177 | - { get_resource: onap_sg } |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 178 | |
| 179 | rancher_floating_ip: |
| 180 | type: OS::Neutron::FloatingIP |
| 181 | properties: |
| 182 | floating_network_id: { get_param: public_net_id } |
| 183 | port_id: { get_resource: rancher_private_port } |
| 184 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 185 | rancher_vm: |
| 186 | type: OS::Nova::Server |
| 187 | properties: |
| 188 | name: rancher |
Gary Wu | 558ac6e | 2018-01-19 14:53:12 -0800 | [diff] [blame] | 189 | image: { get_param: ubuntu_1604_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 190 | flavor: { get_param: rancher_vm_flavor } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 191 | key_name: onap_key |
| 192 | networks: |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 193 | - port: { get_resource: rancher_private_port } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 194 | user_data_format: RAW |
| 195 | user_data: |
| 196 | str_replace: |
| 197 | params: |
| 198 | __docker_proxy__: { get_param: docker_proxy } |
| 199 | __apt_proxy__: { get_param: apt_proxy } |
Gary Wu | 1ff5667 | 2018-01-17 20:51:45 -0800 | [diff] [blame] | 200 | template: |
| 201 | get_file: rancher_vm_entrypoint.sh |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 202 | |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 203 | k8s_private_port: |
| 204 | type: OS::Neutron::Port |
| 205 | properties: |
| 206 | network: { get_resource: oam_network } |
| 207 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 208 | security_groups: |
| 209 | - { get_resource: onap_sg } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 210 | |
| 211 | k8s_floating_ip: |
| 212 | type: OS::Neutron::FloatingIP |
| 213 | properties: |
| 214 | floating_network_id: { get_param: public_net_id } |
| 215 | port_id: { get_resource: k8s_private_port } |
| 216 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 217 | k8s_vm: |
| 218 | type: OS::Nova::Server |
| 219 | properties: |
| 220 | name: k8s |
Gary Wu | 558ac6e | 2018-01-19 14:53:12 -0800 | [diff] [blame] | 221 | image: { get_param: ubuntu_1604_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 222 | flavor: { get_param: k8s_vm_flavor } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 223 | key_name: onap_key |
| 224 | networks: |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 225 | - port: { get_resource: k8s_private_port } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 226 | user_data_format: RAW |
| 227 | user_data: |
| 228 | str_replace: |
| 229 | params: |
| 230 | __docker_proxy__: { get_param: docker_proxy } |
| 231 | __apt_proxy__: { get_param: apt_proxy } |
Gary Wu | 5d325d0 | 2018-02-06 21:21:31 -0800 | [diff] [blame] | 232 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 233 | __k8s_ip_addr__: { get_attr: [k8s_floating_ip, floating_ip_address] } |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 234 | __openstack_tenant_id__: { get_param: openstack_tenant_id } |
| 235 | __openstack_tenant_name__: { get_param: openstack_tenant_name } |
| 236 | __openstack_username__: { get_param: openstack_username } |
| 237 | __openstack_api_key__: { get_param : openstack_api_key } |
| 238 | __public_net_id__: { get_param: public_net_id } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 239 | __public_net_name__: { get_param: public_net_name } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 240 | __oam_network_id__: { get_resource: oam_network } |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 241 | __oam_network_cidr__: { get_param: oam_network_cidr } |
| 242 | __ubuntu_1404_image__: { get_param: ubuntu_1404_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 243 | __ubuntu_1604_image__: { get_param: ubuntu_1604_image } |
| 244 | __centos_7_image__: { get_param: centos_7_image } |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 245 | __keystone_url__: { get_param: keystone_url } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 246 | __dns_forwarder__: { get_param: dns_forwarder } |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 247 | __external_dns__: { get_param: external_dns } |
| 248 | __dnsaas_proxy_enable__: { get_param: dnsaas_proxy_enable } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 249 | __dnsaas_proxied_keystone_url_path__: { get_param: dnsaas_proxied_keystone_url_path } |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 250 | __dnsaas_keystone_url__: { get_param: dnsaas_keystone_url } |
| 251 | __dnsaas_region__: { get_param: dnsaas_region } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 252 | __dnsaas_tenant_id__: { get_param: dnsaas_tenant_id } |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 253 | __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name } |
| 254 | __dnsaas_username__: { get_param: dnsaas_username } |
| 255 | __dnsaas_password__: { get_param: dnsaas_password } |
Gary Wu | 1ff5667 | 2018-01-17 20:51:45 -0800 | [diff] [blame] | 256 | template: |
| 257 | get_file: k8s_vm_entrypoint.sh |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 258 | |
Gary Wu | 14ee41d | 2018-01-19 15:03:59 -0800 | [diff] [blame] | 259 | outputs: |
Gary Wu | 6103408 | 2018-01-22 12:48:50 -0800 | [diff] [blame] | 260 | rancher_vm_ip: |
| 261 | description: The IP address of the rancher instance |
Gary Wu | 5d325d0 | 2018-02-06 21:21:31 -0800 | [diff] [blame] | 262 | value: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 6103408 | 2018-01-22 12:48:50 -0800 | [diff] [blame] | 263 | |
Gary Wu | 14ee41d | 2018-01-19 15:03:59 -0800 | [diff] [blame] | 264 | k8s_vm_ip: |
| 265 | description: The IP address of the k8s instance |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 266 | value: { get_attr: [k8s_floating_ip, floating_ip_address] } |