# 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)
# 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
}
verify_edgex()
{
set -o xtrace
- cd edgex && source verifyedgex.sh
+ source verifyedgex.sh | tee verifyedgex.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
#
exit 0
fi
+setupPath=`pwd`
+
if [[ $OSPLATFORM = *CentOS* ]]; then
setup_k8smaster_centos
else
sleep 20
verify_edgex
+
+# Installing hawkbit through docker container
+chmod +x hawkbit.sh
+nohup ./hawkbit.sh
+
+# 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"