aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/heat/onap-oom
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/heat/onap-oom')
-rw-r--r--deployment/heat/onap-oom/env/tlab/onap-oom.env19
-rw-r--r--deployment/heat/onap-oom/env/windriver/onap-oom.env19
-rw-r--r--deployment/heat/onap-oom/k8s_vm_init.sh21
-rw-r--r--deployment/heat/onap-oom/k8s_vm_init_serv.sh98
-rw-r--r--deployment/heat/onap-oom/k8s_vm_install.sh (renamed from deployment/heat/onap-oom/k8s_vm_entrypoint.sh)30
-rw-r--r--deployment/heat/onap-oom/onap-oom.yaml991
-rw-r--r--deployment/heat/onap-oom/parts/onap-oom-1.yaml8
-rw-r--r--deployment/heat/onap-oom/parts/onap-oom-2.yaml57
-rw-r--r--deployment/heat/onap-oom/rancher_vm_entrypoint.sh11
-rwxr-xr-xdeployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh3
10 files changed, 1011 insertions, 246 deletions
diff --git a/deployment/heat/onap-oom/env/tlab/onap-oom.env b/deployment/heat/onap-oom/env/tlab/onap-oom.env
index 49d02c4fb..04fa44d76 100644
--- a/deployment/heat/onap-oom/env/tlab/onap-oom.env
+++ b/deployment/heat/onap-oom/env/tlab/onap-oom.env
@@ -7,8 +7,8 @@ parameters:
rancher_vm_flavor: m1.large
k8s_vm_flavor: m1.xlarge
- etcd_vm_flavor: m1.large
- orch_vm_flavor: m1.large
+ etcd_vm_flavor: m1.medium
+ orch_vm_flavor: m1.medium
public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9
@@ -22,8 +22,8 @@ parameters:
pullPolicy: IfNotPresent
robot:
flavor: large
- appcUsername: "admin"
- appcPassword: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+ appcUsername: "appc@appc.onap.org"
+ appcPassword: "demo123456!"
openStackKeyStoneUrl: "https://bdc1tlab01.research.att.com:5000"
openStackPublicNetId: "__oam_network_id__" # NOTE: for TLAB, openStackPublicNetId needs to be oam_network_id instead of public_net_id
openStackTenantId: "${OS_PROJECT_ID}"
@@ -48,10 +48,9 @@ parameters:
openStackKeyStoneUrl: "https://bdc1tlab01.research.att.com:5000/v2.0"
openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
appc:
- replicaCount: 1
+ replicaCount: 3
config:
- enableClustering: false
- enableAAF: false
+ enableClustering: true
openStackType: "OpenStackProvider"
openStackName: "OpenStack"
openStackKeyStoneUrl: "https://bdc1tlab01.research.att.com:5000/v2.0"
@@ -59,9 +58,7 @@ parameters:
openStackDomain: "${OS_USER_DOMAIN_NAME}"
openStackUserName: "${OS_USERNAME}"
openStackEncryptedPassword: "${OS_PASSWORD}"
- odlUser: admin
- odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
sdnc:
- replicaCount: 1
+ replicaCount: 3
config:
- enableClustering: false
+ enableClustering: true
diff --git a/deployment/heat/onap-oom/env/windriver/onap-oom.env b/deployment/heat/onap-oom/env/windriver/onap-oom.env
index c6111843c..15819ffe1 100644
--- a/deployment/heat/onap-oom/env/windriver/onap-oom.env
+++ b/deployment/heat/onap-oom/env/windriver/onap-oom.env
@@ -7,8 +7,8 @@ parameters:
rancher_vm_flavor: m1.large
k8s_vm_flavor: m1.xlarge
- etcd_vm_flavor: m1.large
- orch_vm_flavor: m1.large
+ etcd_vm_flavor: m1.medium
+ orch_vm_flavor: m1.medium
public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4
@@ -22,8 +22,8 @@ parameters:
pullPolicy: IfNotPresent
robot:
flavor: large
- appcUsername: "admin"
- appcPassword: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+ appcUsername: "appc@appc.onap.org"
+ appcPassword: "demo123456!"
openStackKeyStoneUrl: "http://10.12.25.2:5000"
openStackPublicNetId: "__public_net_id__"
openStackTenantId: "${OS_PROJECT_ID}"
@@ -49,10 +49,9 @@ parameters:
openStackKeyStoneUrl: "http://10.12.25.2:5000/v2.0"
openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
appc:
- replicaCount: 1
+ replicaCount: 3
config:
- enableClustering: false
- enableAAF: false
+ enableClustering: true
openStackType: "OpenStackProvider"
openStackName: "OpenStack"
openStackKeyStoneUrl: "http://10.12.25.2:5000/v2.0"
@@ -60,9 +59,7 @@ parameters:
openStackDomain: "${OS_USER_DOMAIN_NAME}"
openStackUserName: "${OS_USERNAME}"
openStackEncryptedPassword: "${OS_PASSWORD}"
- odlUser: admin
- odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
sdnc:
- replicaCount: 1
+ replicaCount: 3
config:
- enableClustering: false
+ enableClustering: true
diff --git a/deployment/heat/onap-oom/k8s_vm_init.sh b/deployment/heat/onap-oom/k8s_vm_init.sh
new file mode 100644
index 000000000..5d162cb87
--- /dev/null
+++ b/deployment/heat/onap-oom/k8s_vm_init.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -x
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+RANCHER_IMAGES=$(docker images | grep rancher | wc -l)
+if [ $RANCHER_IMAGES -eq 0 ]; then
+ while [ ! -e /dockerdata-nfs/rancher_agent_cmd.sh ]; do
+ mount /dockerdata-nfs
+ sleep 10
+ done
+
+ cd ~
+ cp /dockerdata-nfs/rancher_agent_cmd.sh .
+ sed -i "s/docker run/docker run -e CATTLE_HOST_LABELS='__host_label__=true' -e CATTLE_AGENT_IP=__host_private_ip_addr__/g" rancher_agent_cmd.sh
+ source rancher_agent_cmd.sh
+fi
diff --git a/deployment/heat/onap-oom/k8s_vm_init_serv.sh b/deployment/heat/onap-oom/k8s_vm_init_serv.sh
new file mode 100644
index 000000000..153607739
--- /dev/null
+++ b/deployment/heat/onap-oom/k8s_vm_init_serv.sh
@@ -0,0 +1,98 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: k8s_vm_init.sh
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start daemon at boot time
+# Description: Enable service provided by daemon.
+### END INIT INFO
+
+dir="/opt"
+cmd="./k8s_vm_init.sh"
+user="root"
+
+name=`basename $0`
+pid_file="/var/run/$name.pid"
+stdout_log="/var/log/$name.log"
+stderr_log="/var/log/$name.err"
+
+get_pid() {
+ cat "$pid_file"
+}
+
+is_running() {
+ [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1
+}
+
+case "$1" in
+ start)
+ if is_running; then
+ echo "Already started"
+ else
+ echo "Starting $name"
+ cd "$dir"
+ if [ -z "$user" ]; then
+ sudo $cmd >> "$stdout_log" 2>> "$stderr_log" &
+ else
+ sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" &
+ fi
+ echo $! > "$pid_file"
+ if ! is_running; then
+ echo "Unable to start, see $stdout_log and $stderr_log"
+ exit 1
+ fi
+ fi
+ ;;
+ stop)
+ if is_running; then
+ echo -n "Stopping $name.."
+ kill `get_pid`
+ for i in {1..10}
+ do
+ if ! is_running; then
+ break
+ fi
+
+ echo -n "."
+ sleep 1
+ done
+ echo
+
+ if is_running; then
+ echo "Not stopped; may still be shutting down or shutdown may have failed"
+ exit 1
+ else
+ echo "Stopped"
+ if [ -f "$pid_file" ]; then
+ rm "$pid_file"
+ fi
+ fi
+ else
+ echo "Not running"
+ fi
+ ;;
+ restart)
+ $0 stop
+ if is_running; then
+ echo "Unable to stop, will not attempt to start"
+ exit 1
+ fi
+ $0 start
+ ;;
+ status)
+ if is_running; then
+ echo "Running"
+ else
+ echo "Stopped"
+ exit 1
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_install.sh
index 62340c11c..3e80f8ea0 100644
--- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/k8s_vm_install.sh
@@ -1,5 +1,4 @@
#!/bin/bash -x
-#
# Copyright 2018 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -8,27 +7,34 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
-
export DEBIAN_FRONTEND=noninteractive
-HOST_IP=$(hostname -I)
-echo $HOST_IP `hostname` >> /etc/hosts
+echo "__host_private_ip_addr__ $(hostname)" >> /etc/hosts
printenv
mkdir -p /opt/config
echo "__docker_version__" > /opt/config/docker_version.txt
echo "__rancher_ip_addr__" > /opt/config/rancher_ip_addr.txt
echo "__rancher_private_ip_addr__" > /opt/config/rancher_private_ip_addr.txt
+echo "__host_private_ip_addr__" > /opt/config/host_private_ip_addr.txt
+echo "__mtu__" > /opt/config/mtu.txt
mkdir -p /etc/docker
if [ ! -z "__docker_proxy__" ]; then
cat > /etc/docker/daemon.json <<EOF
{
+ "mtu": __mtu__,
"insecure-registries" : ["__docker_proxy__"]
}
EOF
+else
+ cat > /etc/docker/daemon.json <<EOF
+{
+ "mtu": __mtu__
+}
+EOF
fi
if [ ! -z "__apt_proxy__" ]; then
- cat > /etc/apt/apt.conf.d/30proxy<<EOF
+ cat > /etc/apt/apt.conf.d/30proxy <<EOF
Acquire::http { Proxy "http://__apt_proxy__"; };
Acquire::https::Proxy "DIRECT";
EOF
@@ -58,15 +64,5 @@ while ! hash docker &> /dev/null; do
done
apt-mark hold docker-ce
-while [ ! -e /dockerdata-nfs/rancher_agent_cmd.sh ]; do
- mount /dockerdata-nfs
- sleep 10
-done
-
-cd ~
-cp /dockerdata-nfs/rancher_agent_cmd.sh .
-sed -i "s/docker run/docker run -e CATTLE_HOST_LABELS='__host_label__=true' -e CATTLE_AGENT_IP=${HOST_IP}/g" rancher_agent_cmd.sh
-source rancher_agent_cmd.sh
-sleep 1m
-
-reboot
+# Enable autorestart when VM reboots
+update-rc.d k8s_vm_init_serv defaults
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:
diff --git a/deployment/heat/onap-oom/parts/onap-oom-1.yaml b/deployment/heat/onap-oom/parts/onap-oom-1.yaml
index a96c9a373..5f117acb8 100644
--- a/deployment/heat/onap-oom/parts/onap-oom-1.yaml
+++ b/deployment/heat/onap-oom/parts/onap-oom-1.yaml
@@ -93,6 +93,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
@@ -125,6 +129,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
diff --git a/deployment/heat/onap-oom/parts/onap-oom-2.yaml b/deployment/heat/onap-oom/parts/onap-oom-2.yaml
index ff2272d92..721f3cdc4 100644
--- a/deployment/heat/onap-oom/parts/onap-oom-2.yaml
+++ b/deployment/heat/onap-oom/parts/onap-oom-2.yaml
@@ -12,6 +12,49 @@
floating_network_id: { get_param: public_net_id }
port_id: { get_resource: ${VM_TYPE}_${VM_NUM}_private_port }
+ ${VM_TYPE}_${VM_NUM}_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: [${VM_TYPE}_${VM_NUM}_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: [${VM_TYPE}_${VM_NUM}_floating_ip, fixed_ip_address] }
+ __host_label__: '$HOST_LABEL'
+ 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
+
+ ${VM_TYPE}_${VM_NUM}_vm_config:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: ${VM_TYPE}_${VM_NUM}_vm_scripts }
+
${VM_TYPE}_${VM_NUM}_vm:
type: OS::Nova::Server
properties:
@@ -22,16 +65,6 @@
key_name: { get_param: key_name }
networks:
- port: { get_resource: ${VM_TYPE}_${VM_NUM}_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__: '$HOST_LABEL'
- template:
- get_file: k8s_vm_entrypoint.sh
+ user_data_format: SOFTWARE_CONFIG
+ user_data: { get_resource: ${VM_TYPE}_${VM_NUM}_vm_config }
diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
index aced5dfc6..bd39963de 100644
--- a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
@@ -35,6 +35,7 @@ echo "__rancher_agent_version__" > /opt/config/rancher_agent_version.txt
echo "__kubectl_version__" > /opt/config/kubectl_version.txt
echo "__helm_version__" > /opt/config/helm_version.txt
echo "__helm_deploy_delay__" > /opt/config/helm_deploy_delay.txt
+echo "__mtu__" > /opt/config/mtu.txt
cat <<EOF > /opt/config/integration-override.yaml
__integration_override_yaml__
@@ -50,14 +51,20 @@ sed -i 's/\_\_docker_proxy__/__docker_proxy__/g' /opt/config/integration-overrid
cp /opt/config/integration-override.yaml /root
cat /root/integration-override.yaml
-echo `hostname -I` `hostname` >> /etc/hosts
mkdir -p /etc/docker
if [ ! -z "__docker_proxy__" ]; then
cat > /etc/docker/daemon.json <<EOF
{
+ "mtu": __mtu__,
"insecure-registries" : ["__docker_proxy__"]
}
EOF
+else
+ cat > /etc/docker/daemon.json <<EOF
+{
+ "mtu": __mtu__
+}
+EOF
fi
if [ ! -z "__apt_proxy__" ]; then
cat > /etc/apt/apt.conf.d/30proxy<<EOF
@@ -157,7 +164,7 @@ curl -s -u "${CATTLE_ACCESS_KEY}:${CATTLE_SECRET_KEY}" \
-X PUT \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--d '{"stacks":[{"type":"catalogTemplate", "answers":{"CONSTRAINT_TYPE":"required"}, "name":"kubernetes", "templateVersionId":"library:infra*k8s:52"}, {"type":"catalogTemplate", "name":"network-services", "templateId":"library:infra*network-services"}, {"type":"catalogTemplate", "name":"ipsec", "templateId":"library:infra*ipsec"}, {"type":"catalogTemplate", "name":"healthcheck", "templateId":"library:infra*healthcheck"}]}' \
+-d '{"stacks":[{"type":"catalogTemplate", "answers":{"CONSTRAINT_TYPE":"required"}, "name":"kubernetes", "templateVersionId":"library:infra*k8s:52"}, {"type":"catalogTemplate", "name":"network-services", "templateId":"library:infra*network-services"}, {"type":"catalogTemplate", "name":"ipsec", "templateId":"library:infra*ipsec", "answers":{"MTU":"__mtu__"}}, {"type":"catalogTemplate", "name":"healthcheck", "templateId":"library:infra*healthcheck"}]}' \
"http://$RANCHER_IP:8080/v2-beta/projecttemplates/$TEMPLATE_ID"
curl -s -u "${CATTLE_ACCESS_KEY}:${CATTLE_SECRET_KEY}" -X POST -H 'Content-Type: application/json' -d '{ "name":"oom", "projectTemplateId":"'$TEMPLATE_ID'" }' "http://$RANCHER_IP:8080/v2-beta/projects" > project.json
diff --git a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
index 1167496c5..61d5f9f70 100755
--- a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
+++ b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
@@ -63,6 +63,7 @@ cat <<EOF
__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 }
@@ -103,7 +104,7 @@ for VM_NUM in $(seq 3); do
VM_TYPE=etcd HOST_LABEL=etcd VM_NUM=$VM_NUM envsubst < $PARTS_DIR/onap-oom-2.yaml
done
-for VM_NUM in $(seq 1); do
+for VM_NUM in $(seq 2); do
VM_TYPE=orch HOST_LABEL=orchestration VM_NUM=$VM_NUM envsubst < $PARTS_DIR/onap-oom-2.yaml
done