summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Gorshunov <roman.gorshunov@att.com>2019-01-17 14:29:32 +0100
committerRoman Gorshunov <roman.gorshunov@att.com>2019-01-21 17:33:06 +0000
commite44d0f7fddea43250929c45cad68a57fe92eaeb3 (patch)
treee5852d540c1bde4d93b8c3fb259e7c24b6ae3eae
parentb30c0d6ab4754b4e43708895da637fa9e8d31b83 (diff)
Verify VM disk size and relax kubelet disk reqs
Stop running airship-in-a-bottle.sh if minimum disk size requirements are not met. Relax kubelet's default disk thresholds. Change-Id: Id4cd251c585233b1b8e741b8c4f56a77ffd4e0c0
Notes
Notes (review): Code-Review+2: Bryan Strassner <strassner.bryan@gmail.com> Code-Review+2: Aaron Sheffield <ajs@sheffieldfamily.net> Workflow+1: Aaron Sheffield <ajs@sheffieldfamily.net> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 22 Jan 2019 19:57:32 +0000 Reviewed-on: https://review.openstack.org/631493 Project: openstack/airship-in-a-bottle Branch: refs/heads/master
-rw-r--r--deployment_files/global/v1.0demo/software/config/Kubelet.yaml4
-rw-r--r--deployment_files/global/v1.0dev/software/config/Kubelet.yaml2
-rwxr-xr-xmanifests/dev_single_node/airship-in-a-bottle.sh4
3 files changed, 8 insertions, 2 deletions
diff --git a/deployment_files/global/v1.0demo/software/config/Kubelet.yaml b/deployment_files/global/v1.0demo/software/config/Kubelet.yaml
index 67612eb..8c644c1 100644
--- a/deployment_files/global/v1.0demo/software/config/Kubelet.yaml
+++ b/deployment_files/global/v1.0demo/software/config/Kubelet.yaml
@@ -26,8 +26,10 @@ data:
26 - --cni-bin-dir=/opt/cni/bin 26 - --cni-bin-dir=/opt/cni/bin
27 - --cni-conf-dir=/etc/cni/net.d 27 - --cni-conf-dir=/etc/cni/net.d
28 - --eviction-max-pod-grace-period=-1 28 - --eviction-max-pod-grace-period=-1
29 - --eviction-hard="nodefs.available<1Gi,imagefs.available<1Gi"
30 - --eviction-minimum-reclaim="nodefs.available=1Gi,imagefs.available=1Gi"
29 - --network-plugin=cni 31 - --network-plugin=cni
30 - --node-status-update-frequency=5s 32 - --node-status-update-frequency=5s
33 - --seccomp-profile-root=SECCOMP_PROFILE_ROOT
31 - --serialize-image-pulls=false 34 - --serialize-image-pulls=false
32 - --v=5 35 - --v=5
33 - --seccomp-profile-root=SECCOMP_PROFILE_ROOT
diff --git a/deployment_files/global/v1.0dev/software/config/Kubelet.yaml b/deployment_files/global/v1.0dev/software/config/Kubelet.yaml
index 89aac09..b85654d 100644
--- a/deployment_files/global/v1.0dev/software/config/Kubelet.yaml
+++ b/deployment_files/global/v1.0dev/software/config/Kubelet.yaml
@@ -19,6 +19,8 @@ data:
19 - --cni-bin-dir=/opt/cni/bin 19 - --cni-bin-dir=/opt/cni/bin
20 - --cni-conf-dir=/etc/cni/net.d 20 - --cni-conf-dir=/etc/cni/net.d
21 - --eviction-max-pod-grace-period=-1 21 - --eviction-max-pod-grace-period=-1
22 - --eviction-hard="nodefs.available<1Gi,imagefs.available<1Gi"
23 - --eviction-minimum-reclaim="nodefs.available=1Gi,imagefs.available=1Gi"
22 - --network-plugin=cni 24 - --network-plugin=cni
23 - --node-status-update-frequency=5s 25 - --node-status-update-frequency=5s
24 - --serialize-image-pulls=false 26 - --serialize-image-pulls=false
diff --git a/manifests/dev_single_node/airship-in-a-bottle.sh b/manifests/dev_single_node/airship-in-a-bottle.sh
index 8319863..fa2504f 100755
--- a/manifests/dev_single_node/airship-in-a-bottle.sh
+++ b/manifests/dev_single_node/airship-in-a-bottle.sh
@@ -66,8 +66,10 @@ echo ""
66echo "The minimum recommended size of the Ubuntu 16.04 VM is 4 vCPUs, 20GB of RAM with 32GB disk space." 66echo "The minimum recommended size of the Ubuntu 16.04 VM is 4 vCPUs, 20GB of RAM with 32GB disk space."
67CPU_COUNT=$(grep -c processor /proc/cpuinfo) 67CPU_COUNT=$(grep -c processor /proc/cpuinfo)
68RAM_TOTAL=$(awk '/MemTotal/ {print $2}' /proc/meminfo) 68RAM_TOTAL=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
69# Blindly assume that all storage on this VM is under root FS
70DISK_SIZE=$(df --output=source,size / | awk '/dev/ {print $2}')
69source /etc/os-release 71source /etc/os-release
70if [[ $CPU_COUNT -lt 4 || $RAM_TOTAL -lt 20000000 || $NAME != "Ubuntu" || $VERSION_ID != "16.04" ]]; then 72if [[ $CPU_COUNT -lt 4 || $RAM_TOTAL -lt 20000000 || $DISK_SIZE -lt 30000000 || $NAME != "Ubuntu" || $VERSION_ID != "16.04" ]]; then
71 echo "Error: minimum VM recommendations are not met. Exiting." 73 echo "Error: minimum VM recommendations are not met. Exiting."
72 exit 1 74 exit 1
73fi 75fi