Adgex and hawkbit added
[eliot.git] / blueprints / iotgateway / playbooks / roles / el_edgex / files / deploy / edgexonk8s.sh
1 #!/bin/bash -ex
2 #############################################################################
3 # Copyright (c) 2019 Huawei Tech and others.                                #
4 # All rights reserved. This program and the accompanying materials          #
5 # are made available under the terms of the Apache License, Version 2.0     #
6 # which accompanies this distribution, and is available at                  # 
7 # http://www.apache.org/licenses/LICENSE-2.0                                #
8 #############################################################################
9
10 #######################################################################################
11 # The script is to setup the Edgex Foundry application as POD in Kubernetes.          #
12 #######################################################################################
13
14 echo "**********************************************************************"
15 echo "Edgex Platform Deployment--------------------------------------STARTED"
16
17 echo "Deploying Edgex Platform on IOT-Gateway Edge Node"
18 edgexPath=`pwd`
19 git clone https://github.com/edgexfoundry-holding/edgex-kubernetes-support.git
20 cd edgex-kubernetes-support/releases/edinburgh/kubernetes
21 ls
22 kubectl create -k .
23 cd ${edgexPath}
24 echo "-----------------------------------------------------------"
25 echo "Edgex platform PODs"
26 kubectl get pod
27 echo "-----------------------------------------------------------"
28 echo "-----------------------------------------------------------"
29 echo "Edge platform Kubernetes Services"
30 kubectl get svc
31 echo "-----------------------------------------------------------"
32 kubectl expose deployment edgex-core-consul --type=NodePort --name=consulnodeport
33 kubectl expose deployment edgex-core-command --type=NodePort --name=commandnodeport
34 kubectl expose deployment edgex-core-data --type=NodePort --name=datanodeport
35 kubectl expose deployment edgex-core-metadata --type=NodePort --name=metadatanodeport
36 kubectl expose deployment edgex-support-rulesengine --type=NodePort --name=rulesenginenodeport
37 kubectl expose deployment edgex-support-logging --type=NodePort --name=loggingnodeport
38 kubectl get svc | grep NodePort
39
40 echo "**********************************************************************"
41 echo "Edgex Platform Deployment--------------------------------------SUCCESS"