Signed-off-by: Srinivasan Selvam <srinivasan.s.n@huawei.com>
Change-Id: I49538490ce1a378423339570df80478e3c9e4330
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+echo "***********************************************************************"
+echo "cadvisor installation-------------------------------------------STARTED"
+
HOSTNAME=`hostname`
sudo docker run \
--volume=/:/rootfs:ro \
HOSTNAME=`hostname`
sudo docker run \
--volume=/:/rootfs:ro \
--name=cadvisor-${HOSTNAME} \
google/cadvisor:latest
--name=cadvisor-${HOSTNAME} \
google/cadvisor:latest
+echo "cadvisor setup--------------------------------------------------SUCCESS"
+echo "***********************************************************************"
+
# The script is to setup the Edgex Foundry application as POD in Kubernetes. #
#######################################################################################
# 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`
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
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
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))
break
fi
((retrytimes-=1))
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+echo "**********************************************************************"
+echo "Kubeedge-v1.1.0 Installation------------------------------------------STARTED"
+
# constants
VERSION="v1.1.0"
# constants
VERSION="v1.1.0"
initialize_k8s_cluster()
{
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
echo "exec_edge started"
sshpass -p ${EDGENODEPASSWORD} \
echo "exec_edge started"
sshpass -p ${EDGENODEPASSWORD} \
scp -r $KUBEEDGE_ETC \
${EDGENODEUSR}@${EDGENODEIP}:/etc
scp -r $KUBEEDGE_ETC \
${EDGENODEUSR}@${EDGENODEIP}:/etc
apply_node_json()
{
echo "apply_node_json started"
apply_node_json()
{
echo "apply_node_json started"
+ echo $(pwd)
+ cd ${PATH_OF_KUBEEDGE}
kubectl apply -f node.json
echo "apply_node_json ended"
}
kubectl apply -f node.json
echo "apply_node_json ended"
}
# sleep added for k8s kube-system pods to be up
# sleep added for k8s kube-system pods to be up
-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
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
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
-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. #
########################################################################################
# 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)
# 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
# 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"