diff options
Diffstat (limited to 'deployment/heat/onap-oom/onap-oom.yaml')
-rw-r--r-- | deployment/heat/onap-oom/onap-oom.yaml | 991 |
1 files changed, 799 insertions, 192 deletions
diff --git a/deployment/heat/onap-oom/onap-oom.yaml b/deployment/heat/onap-oom/onap-oom.yaml index 689bb6603..e6845cc52 100644 --- a/deployment/heat/onap-oom/onap-oom.yaml +++ b/deployment/heat/onap-oom/onap-oom.yaml @@ -96,6 +96,10 @@ parameters: description: Set to "true" if you want to use a RAM disk for /dockerdata-nfs/. default: "false" + mtu: + type: number + default: 1500 + resources: random-str: type: OS::Heat::RandomString @@ -128,6 +132,10 @@ resources: - protocol: tcp port_range_min: 1 port_range_max: 65535 + # Protocols used for vLB/vDNS use case + - protocol: 47 + - protocol: 53 + - protocol: 132 # ONAP management private network @@ -213,6 +221,7 @@ resources: __helm_version__: { get_param: helm_version } __helm_deploy_delay__: { get_param: helm_deploy_delay } __use_ramdisk__: { get_param: use_ramdisk } + __mtu__: { get_param: mtu } __public_net_id__: { get_param: public_net_id } __oam_network_cidr__: { get_param: oam_network_cidr } __oam_network_id__: { get_resource: oam_network } @@ -261,6 +270,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_01_private_port } + k8s_01_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_01_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_01_vm_scripts } + k8s_01_vm: type: OS::Nova::Server properties: @@ -271,18 +323,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_01_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_01_vm_config } k8s_02_private_port: type: OS::Neutron::Port @@ -298,6 +340,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_02_private_port } + k8s_02_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_02_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_02_vm_scripts } + k8s_02_vm: type: OS::Nova::Server properties: @@ -308,18 +393,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_02_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_02_vm_config } k8s_03_private_port: type: OS::Neutron::Port @@ -335,6 +410,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_03_private_port } + k8s_03_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_03_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_03_vm_scripts } + k8s_03_vm: type: OS::Nova::Server properties: @@ -345,18 +463,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_03_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_03_vm_config } k8s_04_private_port: type: OS::Neutron::Port @@ -372,6 +480,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_04_private_port } + k8s_04_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_04_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_04_vm_scripts } + k8s_04_vm: type: OS::Nova::Server properties: @@ -382,18 +533,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_04_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_04_vm_config } k8s_05_private_port: type: OS::Neutron::Port @@ -409,6 +550,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_05_private_port } + k8s_05_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_05_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_05_vm_scripts } + k8s_05_vm: type: OS::Nova::Server properties: @@ -419,18 +603,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_05_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_05_vm_config } k8s_06_private_port: type: OS::Neutron::Port @@ -446,6 +620,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_06_private_port } + k8s_06_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_06_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_06_vm_scripts } + k8s_06_vm: type: OS::Nova::Server properties: @@ -456,18 +673,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_06_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_06_vm_config } k8s_07_private_port: type: OS::Neutron::Port @@ -483,6 +690,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_07_private_port } + k8s_07_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_07_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_07_vm_scripts } + k8s_07_vm: type: OS::Nova::Server properties: @@ -493,18 +743,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_07_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_07_vm_config } k8s_08_private_port: type: OS::Neutron::Port @@ -520,6 +760,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_08_private_port } + k8s_08_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_08_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_08_vm_scripts } + k8s_08_vm: type: OS::Nova::Server properties: @@ -530,18 +813,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_08_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_08_vm_config } k8s_09_private_port: type: OS::Neutron::Port @@ -557,6 +830,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_09_private_port } + k8s_09_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_09_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_09_vm_scripts } + k8s_09_vm: type: OS::Nova::Server properties: @@ -567,18 +883,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_09_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_09_vm_config } k8s_10_private_port: type: OS::Neutron::Port @@ -594,6 +900,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_10_private_port } + k8s_10_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_10_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_10_vm_scripts } + k8s_10_vm: type: OS::Nova::Server properties: @@ -604,18 +953,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_10_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_10_vm_config } k8s_11_private_port: type: OS::Neutron::Port @@ -631,6 +970,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_11_private_port } + k8s_11_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_11_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_11_vm_scripts } + k8s_11_vm: type: OS::Nova::Server properties: @@ -641,18 +1023,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_11_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_11_vm_config } k8s_12_private_port: type: OS::Neutron::Port @@ -668,6 +1040,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: k8s_12_private_port } + k8s_12_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] } + __host_label__: 'compute' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + k8s_12_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: k8s_12_vm_scripts } + k8s_12_vm: type: OS::Nova::Server properties: @@ -678,18 +1093,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: k8s_12_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'compute' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: k8s_12_vm_config } etcd_1_private_port: type: OS::Neutron::Port @@ -705,6 +1110,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: etcd_1_private_port } + etcd_1_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] } + __host_label__: 'etcd' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + etcd_1_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: etcd_1_vm_scripts } + etcd_1_vm: type: OS::Nova::Server properties: @@ -715,18 +1163,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: etcd_1_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'etcd' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: etcd_1_vm_config } etcd_2_private_port: type: OS::Neutron::Port @@ -742,6 +1180,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: etcd_2_private_port } + etcd_2_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] } + __host_label__: 'etcd' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + etcd_2_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: etcd_2_vm_scripts } + etcd_2_vm: type: OS::Nova::Server properties: @@ -752,18 +1233,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: etcd_2_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'etcd' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: etcd_2_vm_config } etcd_3_private_port: type: OS::Neutron::Port @@ -779,6 +1250,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: etcd_3_private_port } + etcd_3_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] } + __host_label__: 'etcd' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + etcd_3_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: etcd_3_vm_scripts } + etcd_3_vm: type: OS::Nova::Server properties: @@ -789,18 +1303,8 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: etcd_3_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'etcd' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: etcd_3_vm_config } orch_1_private_port: type: OS::Neutron::Port @@ -816,6 +1320,49 @@ resources: floating_network_id: { get_param: public_net_id } port_id: { get_resource: orch_1_private_port } + orch_1_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] } + __host_label__: 'orchestration' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + orch_1_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: orch_1_vm_scripts } + orch_1_vm: type: OS::Nova::Server properties: @@ -826,18 +1373,78 @@ resources: key_name: { get_param: key_name } networks: - port: { get_resource: orch_1_private_port } - user_data_format: RAW - user_data: - str_replace: - params: - __docker_proxy__: { get_param: docker_proxy } - __apt_proxy__: { get_param: apt_proxy } - __docker_version__: { get_param: docker_version } - __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } - __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } - __host_label__: 'orchestration' - template: - get_file: k8s_vm_entrypoint.sh + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: orch_1_vm_config } + + orch_2_private_port: + type: OS::Neutron::Port + properties: + network: { get_resource: oam_network } + fixed_ips: [{"subnet": { get_resource: oam_subnet }}] + security_groups: + - { get_resource: onap_sg } + + orch_2_floating_ip: + type: OS::Neutron::FloatingIP + properties: + floating_network_id: { get_param: public_net_id } + port_id: { get_resource: orch_2_private_port } + + orch_2_vm_scripts: + type: OS::Heat::CloudConfig + properties: + cloud_config: + power_state: + mode: reboot + runcmd: + - [ /opt/k8s_vm_install.sh ] + write_files: + - path: /opt/k8s_vm_install.sh + permissions: '0755' + content: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __docker_version__: { get_param: docker_version } + __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } + __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] } + __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] } + __mtu__: { get_param: mtu } + template: + get_file: k8s_vm_install.sh + - path: /opt/k8s_vm_init.sh + permissions: '0755' + content: + str_replace: + params: + __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] } + __host_label__: 'orchestration' + template: + get_file: k8s_vm_init.sh + - path: /etc/init.d/k8s_vm_init_serv + permissions: '0755' + content: + get_file: k8s_vm_init_serv.sh + + orch_2_vm_config: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: orch_2_vm_scripts } + + orch_2_vm: + type: OS::Nova::Server + properties: + name: + list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '2' ] ] + image: { get_param: ubuntu_1604_image } + flavor: { get_param: orch_vm_flavor } + key_name: { get_param: key_name } + networks: + - port: { get_resource: orch_2_private_port } + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: orch_2_vm_config } outputs: rancher_vm_ip: |