summaryrefslogtreecommitdiffstats
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/k8s_vm_install.sh8
-rw-r--r--deployment/heat/onap-oom/onap-oom.yaml22
-rw-r--r--deployment/heat/onap-oom/parts/onap-oom-1.yaml4
-rw-r--r--deployment/heat/onap-oom/parts/onap-oom-2.yaml1
-rw-r--r--deployment/heat/onap-oom/rancher_vm_entrypoint.sh11
-rwxr-xr-xdeployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh1
6 files changed, 45 insertions, 2 deletions
diff --git a/deployment/heat/onap-oom/k8s_vm_install.sh b/deployment/heat/onap-oom/k8s_vm_install.sh
index e5b843e5d..3e80f8ea0 100644
--- a/deployment/heat/onap-oom/k8s_vm_install.sh
+++ b/deployment/heat/onap-oom/k8s_vm_install.sh
@@ -16,14 +16,22 @@ 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
diff --git a/deployment/heat/onap-oom/onap-oom.yaml b/deployment/heat/onap-oom/onap-oom.yaml
index 4699bca13..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
@@ -217,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 }
@@ -285,6 +290,7 @@ resources:
__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
@@ -354,6 +360,7 @@ resources:
__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
@@ -423,6 +430,7 @@ resources:
__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
@@ -492,6 +500,7 @@ resources:
__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
@@ -561,6 +570,7 @@ resources:
__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
@@ -630,6 +640,7 @@ resources:
__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
@@ -699,6 +710,7 @@ resources:
__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
@@ -768,6 +780,7 @@ resources:
__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
@@ -837,6 +850,7 @@ resources:
__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
@@ -906,6 +920,7 @@ resources:
__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
@@ -975,6 +990,7 @@ resources:
__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
@@ -1044,6 +1060,7 @@ resources:
__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
@@ -1113,6 +1130,7 @@ resources:
__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
@@ -1182,6 +1200,7 @@ resources:
__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
@@ -1251,6 +1270,7 @@ resources:
__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
@@ -1320,6 +1340,7 @@ resources:
__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
@@ -1389,6 +1410,7 @@ resources:
__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
diff --git a/deployment/heat/onap-oom/parts/onap-oom-1.yaml b/deployment/heat/onap-oom/parts/onap-oom-1.yaml
index ba3933b76..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
diff --git a/deployment/heat/onap-oom/parts/onap-oom-2.yaml b/deployment/heat/onap-oom/parts/onap-oom-2.yaml
index 34fc0d78f..721f3cdc4 100644
--- a/deployment/heat/onap-oom/parts/onap-oom-2.yaml
+++ b/deployment/heat/onap-oom/parts/onap-oom-2.yaml
@@ -32,6 +32,7 @@
__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
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 b9e4f10bb..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 }