Added some lines for more readiblity of logs 50/1950/1
authorAbhijit Dasgupta <abhijit.das.gupta@huawei.com>
Mon, 11 Nov 2019 08:52:03 +0000 (08:52 +0000)
committerAbhijit Dasgupta <abhijit.das.gupta@huawei.com>
Mon, 11 Nov 2019 08:52:03 +0000 (08:52 +0000)
Modified script
1. edgexonk8s.sh
2. verifyedgex.sh - to test edgex platform deployment on iot gateway node
3. setup.sh -- integrated testing of edgex platform in iot gateway platform.

Signed-off-by: Abhijit Dasgupta <abhijit.das.gupta@huawei.com>
Change-Id: I10b86475b132db25bd555be8749ea23aae6bf01d

blueprints/iotgateway/scripts/edgex/edgexonk8s.sh
blueprints/iotgateway/scripts/edgex/verifyedgex.sh
blueprints/iotgateway/scripts/setup.sh

index 2043b75..f7171e1 100755 (executable)
 #######################################################################################
 
 
-
+echo "Deploying Edgex Platform on IOT-Gateway Edge Node"
 git clone https://github.com/edgexfoundry-holding/edgex-kubernetes-support.git
 cd edgex-kubernetes-support/releases/edinburgh/kubernetes
 ls
 kubectl create -k .
+echo "-----------------------------------------------------------"
+echo "Edgex platform PODs"
 kubectl get pod
+echo "-----------------------------------------------------------"
+echo "-----------------------------------------------------------"
+echo "Edge platform Kubernetes Services"
 kubectl get svc
+echo "-----------------------------------------------------------"
 kubectl expose deployment edgex-core-consul --type=NodePort --name=consulnodeport
 kubectl expose deployment edgex-core-command --type=NodePort --name=commandnodeport
 kubectl expose deployment edgex-core-data --type=NodePort --name=datanodeport
index b1af3af..95fea1f 100644 (file)
@@ -28,7 +28,7 @@ retrytimes=20
 while [ $retrytimes -gt 0 ]
 do
  if [ 12 == "$(kubectl get pods | grep edgex | grep Running | wc -l)" ]; then
-    echo "Edgex Platform is successfully deployed on ELIOT !!!!"
+    echo "Edgex Platform is successfully integrated  on ELIOT IOT-Gateway!!!!"
     break
  fi
  ((retrytimes-=1))
index 9b2a695..52459b8 100755 (executable)
@@ -56,9 +56,9 @@ setup_k8sworkers()
   # Install Docker on ELIOT Node
   SETUP_WORKER_COMMON="sudo rm -rf ~/eliot &&\
                        git clone ${ELIOT_REPO} &&\
-                       cd eliot/scripts/ && source common.sh"
+                       cd eliot/blueprints/iotgteway/scripts/ && source common.sh"
   #SETUP_WORKER_COMMON="cd eliot/scripts/ && source common.sh"
-  SETUP_WORKER="cd eliot/scripts/ && source k8sworker.sh"
+  SETUP_WORKER="cd eliot/blueprints/iotgateway/scripts/ && source k8sworker.sh"
 
   KUBEADM_TOKEN=$(kubeadm token create --print-join-command)
   KUBEADM_JOIN="sudo ${KUBEADM_TOKEN}"
@@ -100,7 +100,7 @@ setup_k8sworkers_centos()
 
   SETUP_WORKER_COMMON_CENTOS="sudo rm -rf ~/eliot &&\
                               git clone ${ELIOT_REPO} &&\
-                              cd eliot/scripts/ && source common_centos.sh"
+                              cd eliot/blueprints/iotgateway/scripts/ && source common_centos.sh"
 
   # SETUP_WORKER_COMMON_CENTOS="cd /root/eliot/scripts/ && source common_centos.sh"
 
@@ -132,9 +132,18 @@ install_edgex(){
  cd edgex && source edgexonk8s.sh
 }
 
+# verify installation of edgex platform 
+verify_edgex()
+{
+ set -o xtrace
+ source verifyedgex.sh
+
+}
+
+
 install_cadvisor_edge(){
  set -o xtrace
- SETUP_CADVISOR_ATEDGE="cd eliot/scripts/ && source cadvisorsetup.sh"
+ SETUP_CADVISOR_ATEDGE="cd eliot/blueprints/iotgateway/scripts/ && source cadvisorsetup.sh"
  while read line
  do
      nodeinfo="${line}"
@@ -175,9 +184,10 @@ sudo docker ps | grep prometheus
 
 install_edgex
 sleep 20
+verify_edgex
 
 # Removing the taint from master node
 kubectl taint nodes --all node-role.kubernetes.io/master- || true
 
-echo "ELIOT Setup execution is Completed..."
+echo "ELIOT IOT-Gateway Platform is Successfully Deployed !!!"