From 29f8b0a3639ca399172a249703f8350fbeeb0cd6 Mon Sep 17 00:00:00 2001
From: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
Date: Thu, 28 May 2020 20:53:44 +0000
Subject: [PATCH] Change Node-selector to openstack-control-plane for  All UC's

 1. Changing nodeselector to use same label and to sync
     (openstack-control-plane = enabled) which comes default
     with osh deployment.

 2. Fix Ceph Deploy script.

 3. Updated Apparmor script to remove node-selector.

 4. Remove repos cloned  not needed for Porthole Project.

Change-Id: Ibb4c98a956347c8487beff90277fe9a88bed9739
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
---
 charts/calicoctl-utility/values.yaml          |   6 +-
 charts/ceph-utility/values.yaml               |   6 +-
 charts/compute-utility/values.yaml            |   6 +-
 charts/etcdctl-utility/values.yaml            |  10 +-
 charts/mysqlclient-utility/values.yaml        |   7 +-
 charts/openstack-utility/values.yaml          |   4 +-
 charts/postgresql-utility/values.yaml         |   6 +-
 .../apparmor/000-install-packages.sh          |  17 +-
 .../apparmor/001-setup-apparmor-profiles.sh   |   2 +-
 tools/deployment/apparmor/002-deploy-k8s.sh   |   2 +-
 .../apparmor/005-calicoctl-utility.sh         |  12 +-
 tools/deployment/apparmor/010-ceph-utility.sh |  13 +-
 .../apparmor/020-compute-utility.sh           |  11 +-
 .../apparmor/030-etcdctl-utility.sh           |  14 +-
 .../apparmor/040-mysqlclient-utility.sh       |  14 +-
 .../apparmor/050-openstack-utility.sh         |  22 +-
 .../apparmor/060-postgresql-utility.sh        |  16 +-
 .../utilities/005-calicoctl-utility.sh        |  18 +-
 .../deployment/utilities/010-ceph-utility.sh  | 220 ++++++++++++++++--
 .../utilities/020-compute-utility.sh          |  15 +-
 .../utilities/030-etcdctl-utility.sh          |  14 +-
 .../utilities/040-mysqlclient-utility.sh      |  11 +-
 .../utilities/050-openstack-utility.sh        |  14 +-
 .../utilities/060-postgresql-utility.sh       |  13 +-
 24 files changed, 325 insertions(+), 148 deletions(-)

diff --git a/charts/calicoctl-utility/values.yaml b/charts/calicoctl-utility/values.yaml
index 9701842b..3f71a139 100644
--- a/charts/calicoctl-utility/values.yaml
+++ b/charts/calicoctl-utility/values.yaml
@@ -65,10 +65,10 @@ release_group: null
 
 labels:
   utility:
-    node_selector_key: openstack-helm-node-class
+    node_selector_key: openstack-control-plane
     node_selector_value: enabled
   job:
-    node_selector_key: openstack-helm-node-class
+    node_selector_key: openstack-control-plane
     node_selector_value: enabled
 
 dependencies:
@@ -239,4 +239,4 @@ manifests:
   configmap_etc_client: true
   deployment_calicoctl_utility: true
   job_image_repo_sync: false
-  secret_certificates: false
+  secret_certificates: false
\ No newline at end of file
diff --git a/charts/ceph-utility/values.yaml b/charts/ceph-utility/values.yaml
index fe5da31b..b06d4680 100644
--- a/charts/ceph-utility/values.yaml
+++ b/charts/ceph-utility/values.yaml
@@ -30,8 +30,8 @@ images:
 
 labels:
   utility:
-    node_selector_key: openstack-helm-node-class
-    node_selector_value: primary
+    node_selector_key: openstack-control-plane
+    node_selector_value: enabled
 
 pod:
   security_context:
@@ -196,4 +196,4 @@ manifests:
   configmap_etc_client: true
   configmap_etc_sudoers: true
   deployment_utility: true
-  network_policy: false
+  network_policy: false
\ No newline at end of file
diff --git a/charts/compute-utility/values.yaml b/charts/compute-utility/values.yaml
index 456e5274..6d6ed3a6 100644
--- a/charts/compute-utility/values.yaml
+++ b/charts/compute-utility/values.yaml
@@ -31,8 +31,8 @@ images:
 
 labels:
   utility:
-    node_selector_key: openstack-helm-node-class
-    node_selector_value: primary
+    node_selector_key: openstack-control-plane
+    node_selector_value: enabled
 
 pod:
   security_context:
@@ -166,4 +166,4 @@ manifests:
   configmap_bin: true
   configmap_etc_client: true
   configmap_etc_sudoers: true
-  deployment_utility: true
+  deployment_utility: true
\ No newline at end of file
diff --git a/charts/etcdctl-utility/values.yaml b/charts/etcdctl-utility/values.yaml
index 0e46e10f..cf580c8f 100644
--- a/charts/etcdctl-utility/values.yaml
+++ b/charts/etcdctl-utility/values.yaml
@@ -31,11 +31,11 @@ images:
 
 labels:
   utility:
-    node_selector_key: openstack-helm-node-class
-    node_selector_value: primary
+    node_selector_key: openstack-control-plane
+    node_selector_value: enabled
   job:
-    node_selector_key: openstack-helm-node-class
-    node_selector_value: primary
+    node_selector_key: openstack-control-plane
+    node_selector_value: enabled
 
 pod:
   security_context:
@@ -201,4 +201,4 @@ manifests:
   configmap_etc_sudoers: true
   deployment_etcdctl_utility: true
   job_image_repo_sync: false
-  secret_certificates: true
+  secret_certificates: true
\ No newline at end of file
diff --git a/charts/mysqlclient-utility/values.yaml b/charts/mysqlclient-utility/values.yaml
index 1e423e4f..be7cd374 100644
--- a/charts/mysqlclient-utility/values.yaml
+++ b/charts/mysqlclient-utility/values.yaml
@@ -30,8 +30,8 @@ images:
 
 labels:
   utility:
-    node_selector_key: openstack-helm-node-class
-    node_selector_value: primary
+    node_selector_key: openstack-control-plane
+    node_selector_value: enabled
 
 pod:
   security_context:
@@ -164,5 +164,4 @@ manifests:
   configmap_bin: true
   configmap_etc_client: true
   configmap_etc_sudoers: true
-  deployment_utility: true
-
+  deployment_utility: true
\ No newline at end of file
diff --git a/charts/openstack-utility/values.yaml b/charts/openstack-utility/values.yaml
index 46bf8388..61c2e093 100644
--- a/charts/openstack-utility/values.yaml
+++ b/charts/openstack-utility/values.yaml
@@ -19,8 +19,8 @@ images:
 
 labels:
   utility:
-    node_selector_key: openstack-helm-node-class
-    node_selector_value: primary
+    node_selector_key: openstack-control-plane
+    node_selector_value: enabled
 
 pod:
   security_context:
diff --git a/charts/postgresql-utility/values.yaml b/charts/postgresql-utility/values.yaml
index 82b1988b..7d41ffc8 100644
--- a/charts/postgresql-utility/values.yaml
+++ b/charts/postgresql-utility/values.yaml
@@ -30,8 +30,8 @@ images:
 
 labels:
   utility:
-    node_selector_key: openstack-helm-node-class
-    node_selector_value: primary
+    node_selector_key: openstack-control-plane
+    node_selector_value: enabled
 
 pod:
   security_context:
@@ -188,4 +188,4 @@ manifests:
   configmap_etc: true
   secret_etc: true
   secret_admin: true
-  deployment_utility: true
+  deployment_utility: true
\ No newline at end of file
diff --git a/tools/deployment/apparmor/000-install-packages.sh b/tools/deployment/apparmor/000-install-packages.sh
index 6bc03aca..1d626a19 100755
--- a/tools/deployment/apparmor/000-install-packages.sh
+++ b/tools/deployment/apparmor/000-install-packages.sh
@@ -4,25 +4,10 @@ set -xe
 CURRENT_DIR="$(pwd)"
 : "${INSTALL_PATH:="../"}"
 : "${OSH_INFRA_COMMIT:="8ba46703ee9fab0115e4b7f62ea43e0798c36872"}"
-: "${CLONE_ARMADA:=true}"
-: "${CLONE_DECKHAND:=true}"
-: "${CLONE_SHIPYARD:=true}"
-
 cd ${INSTALL_PATH}
 
-# Clone Airship projects
-if [[ ${CLONE_ARMADA} = true ]] ; then
-    git clone https://opendev.org/airship/armada.git
-fi
-if [[ ${CLONE_DECKHAND} = true ]] ; then
-    git clone https://opendev.org/airship/deckhand.git
-fi
-if [[ ${CLONE_SHIPYARD} = true ]] ; then
-    git clone https://opendev.org/airship/shipyard.git
-fi
-
 # Clone dependencies
 git clone https://opendev.org/openstack/openstack-helm-infra.git
 
 cd openstack-helm-infra
-git checkout "${OSH_INFRA_COMMIT}"
+git checkout "${OSH_INFRA_COMMIT}"
\ No newline at end of file
diff --git a/tools/deployment/apparmor/001-setup-apparmor-profiles.sh b/tools/deployment/apparmor/001-setup-apparmor-profiles.sh
index c6f89ff9..5a9e11bf 100755
--- a/tools/deployment/apparmor/001-setup-apparmor-profiles.sh
+++ b/tools/deployment/apparmor/001-setup-apparmor-profiles.sh
@@ -4,4 +4,4 @@ CURRENT_DIR="$(pwd)"
 : "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
 
 cd "${OSH_INFRA_PATH}"
-bash -c "./tools/deployment/common/001-setup-apparmor-profiles.sh"
+bash -c "./tools/deployment/common/001-setup-apparmor-profiles.sh"
\ No newline at end of file
diff --git a/tools/deployment/apparmor/002-deploy-k8s.sh b/tools/deployment/apparmor/002-deploy-k8s.sh
index 72299445..f968ffac 100755
--- a/tools/deployment/apparmor/002-deploy-k8s.sh
+++ b/tools/deployment/apparmor/002-deploy-k8s.sh
@@ -4,4 +4,4 @@ CURRENT_DIR="$(pwd)"
 : "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
 
 cd "${OSH_INFRA_PATH}"
-bash -c "./tools/deployment/common/005-deploy-k8s.sh"
+bash -c "./tools/deployment/common/005-deploy-k8s.sh"
\ No newline at end of file
diff --git a/tools/deployment/apparmor/005-calicoctl-utility.sh b/tools/deployment/apparmor/005-calicoctl-utility.sh
index d6de71c6..8b1929d0 100755
--- a/tools/deployment/apparmor/005-calicoctl-utility.sh
+++ b/tools/deployment/apparmor/005-calicoctl-utility.sh
@@ -13,13 +13,15 @@
 
 set -xe
 namespace=utility
-kubectl label nodes --all openstack-helm-node-class=enabled --overwrite
 helm dependency update charts/calicoctl-utility
-cd charts
+helm upgrade --install calicoctl-utility ./charts/calicoctl-utility --namespace=$namespace
 
-helm upgrade --install calicoctl-utility ./calicoctl-utility --namespace=$namespace
-sleep 180
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
 
+#Validate Apparmor
 cal_pod=$(kubectl get pods --namespace=$namespace  -o wide | grep calico | awk '{print $1}')
 expected_profile="docker-default (enforce)"
 profile=`kubectl -n $namespace exec $cal_pod -- cat /proc/1/attr/current`
@@ -33,4 +35,4 @@ echo "Profile running: $profile"
       echo "$profile is the WRONG PROFILE!!"
       return 1
     fi
-  fi
+  fi
\ No newline at end of file
diff --git a/tools/deployment/apparmor/010-ceph-utility.sh b/tools/deployment/apparmor/010-ceph-utility.sh
index 3f27de61..861d69bb 100755
--- a/tools/deployment/apparmor/010-ceph-utility.sh
+++ b/tools/deployment/apparmor/010-ceph-utility.sh
@@ -200,7 +200,6 @@ done
     --no-headers | awk '{ print $1; exit }')
   kubectl exec -n ceph ${MON_POD} -- ceph -s
 
-
 #NOTE: Deploy command
 : ${OSH_EXTRA_HELM_ARGS:=""}
 tee /tmp/ceph-utility-config.yaml <<EOF
@@ -228,7 +227,6 @@ conf:
     enabled: true
 EOF
 
-
 helm upgrade --install ceph-utility-config ./ceph-provisioners \
   --namespace=utility \
   --values=/tmp/ceph-utility-config.yaml \
@@ -236,17 +234,16 @@ helm upgrade --install ceph-utility-config ./ceph-provisioners \
   ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE}
 
 #Deploy Ceph-Utility
-
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
 cd ${CURRENT_DIR}
 helm dependency update charts/ceph-utility
-
 helm upgrade --install ceph-utility ./charts/ceph-utility --namespace=$namespace
-sleep 180
-kubectl get pods --namespace=$namespace
+
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
 
 #Validate Apparmor
-
 ceph_pod=$(kubectl get pods --namespace=$namespace  -o wide | grep ceph |  grep 1/1  | awk '{print $1}')
 expected_profile="docker-default (enforce)"
 profile=`kubectl -n $namespace exec $ceph_pod -- cat /proc/1/attr/current`
diff --git a/tools/deployment/apparmor/020-compute-utility.sh b/tools/deployment/apparmor/020-compute-utility.sh
index 718c369e..49f1eec4 100755
--- a/tools/deployment/apparmor/020-compute-utility.sh
+++ b/tools/deployment/apparmor/020-compute-utility.sh
@@ -14,14 +14,15 @@
 
 set -xe
 namespace="utility"
-kubectl label nodes --all openstack-helm-node-class=enabled --overwrite
 helm dependency update charts/compute-utility
-cd charts
-helm upgrade --install compute-utility ./compute-utility --namespace=$namespace
-sleep 180
+helm upgrade --install compute-utility ./charts/compute-utility --namespace=$namespace
 
-kubectl get pods --namespace=$namespace
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
 
+#Validate Apparmor
 com_pod=$(kubectl get pods --namespace=$namespace  -o wide | grep compute | awk '{print $1}')
 expected_profile="docker-default (enforce)"
 profile=`kubectl -n $namespace exec $com_pod -- cat /proc/1/attr/current`
diff --git a/tools/deployment/apparmor/030-etcdctl-utility.sh b/tools/deployment/apparmor/030-etcdctl-utility.sh
index 35773f12..845f351c 100755
--- a/tools/deployment/apparmor/030-etcdctl-utility.sh
+++ b/tools/deployment/apparmor/030-etcdctl-utility.sh
@@ -13,13 +13,15 @@
 
 set -xe
 namespace="utility"
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
 helm dependency update charts/etcdctl-utility
-cd charts
-helm upgrade --install etcdctl-utility ./etcdctl-utility --namespace=$namespace
-sleep 180
-kubectl get pods --namespace=$namespace
+helm upgrade --install etcdctl-utility ./charts/etcdctl-utility --namespace=$namespace
 
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
+
+#Validate Apparmor
 etc_pod=$(kubectl get pods --namespace=$namespace  -o wide | grep etcdctl | awk '{print $1}')
 expected_profile="docker-default (enforce)"
 profile=`kubectl -n $namespace exec $etc_pod -- cat /proc/1/attr/current`
@@ -33,4 +35,4 @@ echo "Profile running: $profile"
       echo "$profile is the WRONG PROFILE!!"
       return 1
     fi
-  fi
+  fi
\ No newline at end of file
diff --git a/tools/deployment/apparmor/040-mysqlclient-utility.sh b/tools/deployment/apparmor/040-mysqlclient-utility.sh
index 089f338a..453117b8 100755
--- a/tools/deployment/apparmor/040-mysqlclient-utility.sh
+++ b/tools/deployment/apparmor/040-mysqlclient-utility.sh
@@ -13,13 +13,15 @@
 
 set -xe
 namespace="utility"
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
 helm dependency update charts/mysqlclient-utility
-cd charts
-helm upgrade --install mysqlclient-utility ./mysqlclient-utility --namespace=$namespace
-sleep 180
-kubectl get pods --namespace=$namespace
+helm upgrade --install mysqlclient-utility ./charts/mysqlclient-utility --namespace=$namespace
 
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
+
+#Validate Apparmor
 mysql_pod=$(kubectl get pods --namespace=$namespace  -o wide | grep mysqlclient | awk '{print $1}')
 expected_profile="docker-default (enforce)"
 profile=`kubectl -n $namespace exec $mysql_pod -- cat /proc/1/attr/current`
@@ -33,4 +35,4 @@ echo "Profile running: $profile"
       echo "$profile is the WRONG PROFILE!!"
       return 1
     fi
-  fi
+  fi
\ No newline at end of file
diff --git a/tools/deployment/apparmor/050-openstack-utility.sh b/tools/deployment/apparmor/050-openstack-utility.sh
index 50c3013e..37db6435 100755
--- a/tools/deployment/apparmor/050-openstack-utility.sh
+++ b/tools/deployment/apparmor/050-openstack-utility.sh
@@ -12,27 +12,23 @@
 #    under the License.
 
 set -xe
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
 namespace="utility"
-
 helm dependency update charts/openstack-utility
-cd charts
-kubectl get pods --all-namespaces
-sleep 120
+helm upgrade --install openstack-utility ./charts/openstack-utility --namespace=$namespace
 
-helm upgrade --install openstack-utility ./openstack-utility --namespace=$namespace \
-# NOTE: Validate Deployment and User.
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
 
-sleep 180
-kubectl get pods --namespace=$namespace | grep openstack-utility
-ouc_pod=$(kubectl get pods --namespace=$namespace --selector="application=openstack" --no-headers | awk '{ print $1; exit }')
-unsorted_process_file="/tmp/unsorted_proc_list"
-sorted_process_file="/tmp/proc_list"
+#Validate Apparmor
+ouc_pod=$(kubectl get pods --namespace=$namespace -o wide | grep openstack | awk '{print $1}')
 expected_profile="docker-default (enforce)"
-kubectl describe pod $ouc_pod -n utility
 
 #Below can be used for multiple Processes.Grab the processes (numbered directories) from the /proc directory,
 # and then sort them. Highest proc number indicates most recent process.
+#unsorted_process_file="/tmp/unsorted_proc_list"
+#sorted_process_file="/tmp/proc_list"
 #kubectl -n $namespace exec $ouc_pod -- ls -1 /proc | grep -e "^[0-9]*$" > $unsorted_process_file
 #sort --numeric-sort $unsorted_process_file > $sorted_process_file
 
diff --git a/tools/deployment/apparmor/060-postgresql-utility.sh b/tools/deployment/apparmor/060-postgresql-utility.sh
index 4f051369..fd391589 100755
--- a/tools/deployment/apparmor/060-postgresql-utility.sh
+++ b/tools/deployment/apparmor/060-postgresql-utility.sh
@@ -10,17 +10,17 @@
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
-
 set -xe
 namespace="utility"
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
-
 helm dependency update charts/postgresql-utility
-cd charts
-helm upgrade --install postgresql-utility ./postgresql-utility --namespace=$namespace
-sleep 180
-kubectl get pods --namespace=$namespace
+helm upgrade --install postgresql-utility ./charts/postgresql-utility --namespace=$namespace
 
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
+
+#Validate Apparmor
 pos_pod=$(kubectl get pods --namespace=$namespace  -o wide | grep postgresql | awk '{print $1}')
 expected_profile="docker-default (enforce)"
 profile=`kubectl -n $namespace exec $pos_pod -- cat /proc/1/attr/current`
@@ -34,4 +34,4 @@ echo "Profile running: $profile"
       echo "$profile is the WRONG PROFILE!!"
       return 1
     fi
-  fi
+  fi
\ No newline at end of file
diff --git a/tools/deployment/utilities/005-calicoctl-utility.sh b/tools/deployment/utilities/005-calicoctl-utility.sh
index 8040c184..edf34fa8 100755
--- a/tools/deployment/utilities/005-calicoctl-utility.sh
+++ b/tools/deployment/utilities/005-calicoctl-utility.sh
@@ -1,12 +1,16 @@
 #!/bin/bash
 set -xe
-kubectl label nodes --all openstack-helm-node-class=enabled --overwrite
-
+namespace=utility
 helm dependency update charts/calicoctl-utility
-cd charts
-helm  upgrade --install calicoctl-utility ./calicoctl-utility --namespace=utility
+helm  upgrade --install calicoctl-utility ./charts/calicoctl-utility --namespace=$namespace
+
+
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
 
 #NOTE: Validate Deployment info
-kubectl get -n utility secrets
-kubectl get -n utility configmaps
-kubectl get pods -n utility | grep calicoctl-utility
+kubectl get -n $namespace secrets
+kubectl get -n $namespace configmaps
+kubectl get pods -n $namespace | grep calicoctl-utility
\ No newline at end of file
diff --git a/tools/deployment/utilities/010-ceph-utility.sh b/tools/deployment/utilities/010-ceph-utility.sh
index 92e710ca..fb77df3d 100755
--- a/tools/deployment/utilities/010-ceph-utility.sh
+++ b/tools/deployment/utilities/010-ceph-utility.sh
@@ -1,9 +1,204 @@
 #!/bin/bash
 set -xe
+namespace="utility"
+CURRENT_DIR="$(pwd)"
 
-#NOTE: Lint and package chart
 : ${OSH_INFRA_PATH:="../../openstack-helm-infra"}
-make -C ${OSH_INFRA_PATH} ceph-provisioners
+cd "${OSH_INFRA_PATH}"
+
+for CHART in ceph-mon ceph-client ceph-provisioners; do
+  make "${CHART}"
+done
+
+#NOTE: Deploy command
+: ${OSH_EXTRA_HELM_ARGS:=""}
+[ -s /tmp/ceph-fs-uuid.txt ] || uuidgen > /tmp/ceph-fs-uuid.txt
+CEPH_FS_ID="$(cat /tmp/ceph-fs-uuid.txt)"
+#NOTE(portdirect): to use RBD devices with Ubuntu kernels < 4.5 this
+# should be set to 'hammer'
+. /etc/os-release
+if [ "x${ID}" == "xubuntu" ] && \
+   [ "$(uname -r | awk -F "." '{ print $2 }')" -lt "5" ]; then
+  CRUSH_TUNABLES=hammer
+else
+  CRUSH_TUNABLES=null
+fi
+tee /tmp/ceph.yaml <<EOF
+endpoints:
+  ceph_mon:
+    namespace: ceph
+    port:
+      mon:
+        default: 6789
+  ceph_mgr:
+    namespace: ceph
+    port:
+      mgr:
+        default: 7000
+      metrics:
+        default: 9283
+network:
+  public: 172.17.0.1/16
+  cluster: 172.17.0.1/16
+  port:
+    mon: 6789
+    rgw: 8088
+    mgr: 7000
+deployment:
+  storage_secrets: true
+  ceph: true
+  rbd_provisioner: true
+  cephfs_provisioner: true
+  client_secrets: false
+  rgw_keystone_user_and_endpoints: false
+bootstrap:
+  enabled: true
+conf:
+  rgw_ks:
+    enabled: false
+  ceph:
+    global:
+      fsid: ${CEPH_FS_ID}
+      mon_addr: :6789
+      osd_pool_default_size: 1
+    osd:
+      osd_crush_chooseleaf_type: 0
+  pool:
+    crush:
+      tunables: ${CRUSH_TUNABLES}
+    target:
+      osd: 1
+      pg_per_osd: 100
+    default:
+      crush_rule: same_host
+    spec:
+      # RBD pool
+      - name: rbd
+        application: rbd
+        replication: 1
+        percent_total_data: 40
+      # CephFS pools
+      - name: cephfs_metadata
+        application: cephfs
+        replication: 1
+        percent_total_data: 5
+      - name: cephfs_data
+        application: cephfs
+        replication: 1
+        percent_total_data: 10
+      # RadosGW pools
+      - name: .rgw.root
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.control
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.data.root
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.gc
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.log
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.intent-log
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.meta
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.usage
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.users.keys
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.users.email
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.users.swift
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.users.uid
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.buckets.extra
+        application: rgw
+        replication: 1
+        percent_total_data: 0.1
+      - name: default.rgw.buckets.index
+        application: rgw
+        replication: 1
+        percent_total_data: 3
+      - name: default.rgw.buckets.data
+        application: rgw
+        replication: 1
+        percent_total_data: 34.8
+  storage:
+    osd:
+      - data:
+          type: directory
+          location: /var/lib/openstack-helm/ceph/osd/osd-one
+        journal:
+          type: directory
+          location: /var/lib/openstack-helm/ceph/osd/journal-one
+pod:
+  replicas:
+    mds: 1
+    mgr: 1
+    rgw: 1
+jobs:
+  ceph_defragosds:
+    # Execute every 15 minutes for gates
+    cron: "*/15 * * * *"
+    history:
+      # Number of successful job to keep
+      successJob: 1
+      # Number of failed job to keep
+      failJob: 1
+    concurrency:
+      # Skip new job if previous job still active
+      execPolicy: Forbid
+    startingDeadlineSecs: 60
+manifests:
+  cronjob_defragosds: true
+  job_bootstrap: false
+EOF
+
+for CHART in ceph-mon ceph-client ceph-provisioners; do
+  helm upgrade --install ${CHART} ./${CHART} \
+    --namespace=ceph \
+    --values=/tmp/ceph.yaml \
+    ${OSH_INFRA_EXTRA_HELM_ARGS} \
+    ${OSH_INFRA_EXTRA_HELM_ARGS_CEPH_DEPLOY}
+done
+  helm upgrade --install ceph-osd ./ceph-osd \
+    --namespace=ceph \
+    --values=/tmp/ceph.yaml
+
+  #NOTE: Wait for deploy
+  ./tools/deployment/common/wait-for-pods.sh ceph
+
+  #NOTE: Validate deploy
+  MON_POD=$(kubectl get pods \
+    --namespace=ceph \
+    --selector="application=ceph" \
+    --selector="component=mon" \
+    --no-headers | awk '{ print $1; exit }')
+  kubectl exec -n ceph ${MON_POD} -- ceph -s
 
 #NOTE: Deploy command
 : ${OSH_EXTRA_HELM_ARGS:=""}
@@ -31,22 +226,19 @@ conf:
   rgw_ks:
     enabled: true
 EOF
-# Deploy Ceph Dependency Pods
-helm upgrade --install ceph-utility-config ${OSH_INFRA_PATH}/ceph-provisioners \
+
+helm upgrade --install ceph-utility-config ./ceph-provisioners \
   --namespace=utility \
   --values=/tmp/ceph-utility-config.yaml \
   ${OSH_EXTRA_HELM_ARGS} \
   ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE}
 
-#NOTE: Wait for deploy
-./${OSH_INFRA_PATH}/tools/deployment/common/wait-for-pods.sh utility
+#Deploy Ceph-Utility
+cd ${CURRENT_DIR}
 helm dependency update charts/ceph-utility
-cd charts
-helm upgrade --install ceph-utility ./ceph-utility \
-  --namespace=utility
+helm upgrade --install ceph-utility ./charts/ceph-utility --namespace=$namespace
 
-#NOTE: Validate Deployment info
-kubectl get -n utility jobs
-kubectl get -n utility secrets
-kubectl get -n utility configmaps
-kubectl get -n utility pods | grep ceph-utility
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
\ No newline at end of file
diff --git a/tools/deployment/utilities/020-compute-utility.sh b/tools/deployment/utilities/020-compute-utility.sh
index a46d772e..8b2e90ab 100755
--- a/tools/deployment/utilities/020-compute-utility.sh
+++ b/tools/deployment/utilities/020-compute-utility.sh
@@ -1,13 +1,10 @@
 #!/bin/bash
 set -xe
-
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
-
+namespace=utility
 helm dependency update charts/compute-utility
-cd charts
-helm  upgrade --install compute-utility ./compute-utility --namespace=utility
+helm  upgrade --install compute-utility ./charts/compute-utility --namespace=$namespace
 
-#NOTE: Validate Deployment info
-kubectl get -n utility jobs
-kubectl get -n utility configmaps
-kubectl get -n utility pods | grep compute-utility
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
\ No newline at end of file
diff --git a/tools/deployment/utilities/030-etcdctl-utility.sh b/tools/deployment/utilities/030-etcdctl-utility.sh
index 86117568..4a470946 100755
--- a/tools/deployment/utilities/030-etcdctl-utility.sh
+++ b/tools/deployment/utilities/030-etcdctl-utility.sh
@@ -1,12 +1,10 @@
 #!/bin/bash
 set -xe
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
-
+namespace=utility
 helm dependency update charts/etcdctl-utility
-cd charts
-helm  upgrade --install etcdctl-utility ./etcdctl-utility --namespace=utility
+helm  upgrade --install etcdctl-utility ./charts/etcdctl-utility --namespace=$namespace
 
-#NOTE: Validate Deployment info
-kubectl get -n utility secrets
-kubectl get -n utility configmaps
-kubectl get pods -n utility | grep etcdctl-utility
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
\ No newline at end of file
diff --git a/tools/deployment/utilities/040-mysqlclient-utility.sh b/tools/deployment/utilities/040-mysqlclient-utility.sh
index 09aa1957..f14f3ced 100755
--- a/tools/deployment/utilities/040-mysqlclient-utility.sh
+++ b/tools/deployment/utilities/040-mysqlclient-utility.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 set -xe
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
+namespace=utility
 helm dependency update charts/mysqlclient-utility
-cd charts
-helm  upgrade --install mysqlclient-utility ./mysqlclient-utility  --namespace=utility
+helm  upgrade --install mysqlclient-utility ./charts/mysqlclient-utility  --namespace=$namespace
 
-#NOTE: Validate Deployment info
-kubectl get pods -n utility | grep mysqlclient-utility
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
\ No newline at end of file
diff --git a/tools/deployment/utilities/050-openstack-utility.sh b/tools/deployment/utilities/050-openstack-utility.sh
index 4f21ac25..1789918c 100755
--- a/tools/deployment/utilities/050-openstack-utility.sh
+++ b/tools/deployment/utilities/050-openstack-utility.sh
@@ -1,14 +1,16 @@
 #!/bin/bash
 set -xe
-
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
+namespace=utility
 helm dependency update charts/openstack-utility
-cd charts
-helm  upgrade --install openstack-utility ./openstack-utility --namespace=utility
+helm  upgrade --install openstack-utility ./charts/openstack-utility --namespace=$namespace
+
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
 
 #NOTE: Validate Deployment info
-kubectl get pods -n utility | grep openstack-utility
 helm status openstack-utility
 export OS_CLOUD=openstack_helm
 sleep 30 #NOTE(portdirect): Wait for ingress controller to update rules and restart Nginx
-openstack endpoint list
+openstack endpoint list
\ No newline at end of file
diff --git a/tools/deployment/utilities/060-postgresql-utility.sh b/tools/deployment/utilities/060-postgresql-utility.sh
index c2fa8416..c000c55f 100755
--- a/tools/deployment/utilities/060-postgresql-utility.sh
+++ b/tools/deployment/utilities/060-postgresql-utility.sh
@@ -1,11 +1,10 @@
 #!/bin/bash
-
 set -xe
-kubectl label nodes --all openstack-helm-node-class=primary --overwrite
+namespace=utility
 helm dependency update charts/postgresql-utility
-cd charts
-helm upgrade --install postgresql-utility ./postgresql-utility --namespace=utility
-sleep 60
+helm upgrade --install postgresql-utility ./charts/postgresql-utility --namespace=$namespace
 
-#NOTE: Validate Deployment info
-kubectl get pods -n utility | grep postgresql-utility
+# Wait for Deployment
+: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
+cd "${OSH_INFRA_PATH}"
+./tools/deployment/common/wait-for-pods.sh $namespace
\ No newline at end of file