X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2Fiotgateway%2Fscripts%2Fsetup.sh;h=4e06b3ae1a2ed5bb85c22330fb9833095048f182;hb=f239fca03c305dd5f76a346cb657f9f6a889d184;hp=2d8af77250e56acc669060e04d43f736fb4898aa;hpb=79ff6a92d8d1b103ee4387065327047faccbcfa7;p=eliot.git diff --git a/blueprints/iotgateway/scripts/setup.sh b/blueprints/iotgateway/scripts/setup.sh index 2d8af77..4e06b3a 100755 --- a/blueprints/iotgateway/scripts/setup.sh +++ b/blueprints/iotgateway/scripts/setup.sh @@ -18,6 +18,9 @@ # sshpass needs to be installed before executing this script. # ######################################################################################## +echo "**********************************************************************" +echo "ELIOT IOT-Gateway Platform Deployment--------------------------STARTED" + # constants OSPLATFORM=$(awk -F= '/^NAME/{print $2}' /etc/os-release) @@ -87,8 +90,7 @@ setup_k8smaster_centos() # Setup ELIOT Node setup_k8sworkers_centos - kubectl apply -f cni/calico/rbac.yaml - kubectl apply -f cni/calico/calico.yaml + kubectl apply -f cni/calico/v38/calico.yaml } @@ -136,7 +138,7 @@ install_edgex(){ verify_edgex() { set -o xtrace - source verifyedgex.sh + source verifyedgex.sh | tee verifyedgex.log } @@ -152,11 +154,27 @@ install_cadvisor_edge(){ nodepaswd=$(echo ${nodeinfo} | cut -d"|" -f3) sshpass -p ${nodepaswd} ssh ${nodeusr}@${nodeip} ${SETUP_CADVISOR_ATEDGE} < /dev/null done < nodelist > /dev/null 2>&1 + echo "CADVISOR Installed in all the ELIOT IOT-GATEWAY Nodes" } install_prometheus(){ -set -o xtrace -source prometheus.sh | tee install_prometheus.log + set -o xtrace + source prometheus.sh | tee install_prometheus.log + echo "Prometheus deployed successfully on ELIOT Manager Node and integrated with CAdvisor running on IOT-Gateway Nodes " +} + +install_opcua_centos(){ + set -o xtrace + INSTALL_OPCUA_ATEDGE="cd eliot/blueprints/iotgateway/scripts/opc-ua/ && source install.sh" + while read line + do + nodeinfo="${line}" + nodeusr=$(echo ${nodeinfo} | cut -d"|" -f1) + nodeip=$(echo ${nodeinfo} | cut -d"|" -f2) + nodepaswd=$(echo ${nodeinfo} | cut -d"|" -f3) + sshpass -p ${nodepaswd} ssh ${nodeusr}@${nodeip} ${INSTALL_OPCUA_ATEDGE} < /dev/null + done < nodelist > /dev/null 2>&1 + echo " OPC-UA Server and Client are successfully Deployed on all IOT-Gateway Nodes" } # Start @@ -168,6 +186,8 @@ then exit 0 fi +setupPath=`pwd` + if [[ $OSPLATFORM = *CentOS* ]]; then setup_k8smaster_centos else @@ -186,8 +206,16 @@ install_edgex sleep 20 verify_edgex +# Installing OPC-UA on IOT Gateway Node + +cd ${setupPath} +if [[ $OSPLATFORM = *CentOS* ]]; then + install_opcua_centos +fi + # Removing the taint from master node kubectl taint nodes --all node-role.kubernetes.io/master- || true -echo "ELIOT IOT-Gateway Platform is Successfully Deployed !!!" +echo "**********************************************************************" +echo "ELIOT IOT-Gateway Platform Deployment--------------------------SUCCESS"