# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+echo "***********************************************************************"
+echo "cadvisor installation-------------------------------------------STARTED"
+
HOSTNAME=`hostname`
sudo docker run \
--volume=/:/rootfs:ro \
--name=cadvisor-${HOSTNAME} \
google/cadvisor:latest
+echo "cadvisor setup--------------------------------------------------SUCCESS"
+echo "***********************************************************************"
+
# The script is to setup the Edgex Foundry application as POD in Kubernetes. #
#######################################################################################
+echo "**********************************************************************"
+echo "Edgex Platform Deployment--------------------------------------STARTED"
echo "Deploying Edgex Platform on IOT-Gateway Edge Node"
edgexPath=`pwd`
kubectl expose deployment edgex-support-logging --type=NodePort --name=loggingnodeport
kubectl get svc | grep NodePort
-
+echo "**********************************************************************"
+echo "Edgex Platform Deployment--------------------------------------SUCCESS"
while [ $retrytimes -gt 0 ]
do
if [ 12 == "$(kubectl get pods | grep edgex | grep Running | wc -l)" ]; then
- echo "Edgex Platform is successfully integrated on ELIOT IOT-Gateway!!!!"
+ echo "Edgex Platform Deployment integration on IOT Gateway---------------------SUCCESS"
break
fi
((retrytimes-=1))
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+echo "**********************************************************************"
+echo "Kubeedge-v1.1.0 Installation------------------------------------------STARTED"
+
# constants
VERSION="v1.1.0"
initialize_k8s_cluster()
{
- source common.sh
- source k8smaster.sh
+ #cd ../
+ #./setup.sh
+ cp /etc/kubernetes/admin.conf /root/.kube/config
+ #source common.sh
+ #source k8smaster.sh
}
kubeedge_tar_untar()
echo "exec_edge started"
sshpass -p ${EDGENODEPASSWORD} \
-
scp -r $KUBEEDGE_ETC \
${EDGENODEUSR}@${EDGENODEIP}:/etc
apply_node_json()
{
echo "apply_node_json started"
+ echo $(pwd)
+ cd ${PATH_OF_KUBEEDGE}
kubectl apply -f node.json
echo "apply_node_json ended"
}
# sleep added for k8s kube-system pods to be up
-sleep 240
+#sleep 240
kubeedge_tar_untar
apply_node_json
-echo "Kubeedge-v1.1.0 installation completed"
+echo "Kubeedge-v1.1.0 Installation------------------------------------------SUCCESS"
+echo "************************************************************************"
PROMETHEUS_HOST_PORT="9090"
PROMETHEUS_CONTAINTER_PORT="9090"
#cp ci_management/prometheus.yml $HOME
+
+echo "**********************************************************************"
+echo "Prometheus setup ----------------------------------------------STARTED"
+
+
source generatePromeyml.sh
if [ ! -d "/etc/prometheus" ]; then
sudo mkdir /etc/prometheus
-v ~/prometheus.yml:/etc/prometheus/prometheus.yml \
-d prom/prometheus \
--config.file=/etc/prometheus/prometheus.yml
+
+echo "Prometheus setup ----------------------------------------------SUCCESS"
+echo "**********************************************************************"
# 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)
# 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"