Adgex and hawkbit added 39/3939/3
authorarvindpatel <arvind.patel@huawei.com>
Mon, 30 Nov 2020 12:47:18 +0000 (18:17 +0530)
committerarvindpatel <arvind.patel@huawei.com>
Mon, 30 Nov 2020 15:16:04 +0000 (20:46 +0530)
Signed-off-by: arvindpatel <arvind.patel@huawei.com>
Change-Id: Id12ffd49215ef0e9167d6e2a82e2fe8ef7bddb21

blueprints/iotgateway/playbooks/eliot-all-uninstall.yml
blueprints/iotgateway/playbooks/eliot-all.yml [moved from blueprints/iotgateway/playbooks/eloit-all.yml with 98% similarity]
blueprints/iotgateway/playbooks/roles/el_edgex/files/deploy/edgexonk8s.sh [new file with mode: 0644]
blueprints/iotgateway/playbooks/roles/el_edgex/tasks/install.yml [new file with mode: 0644]
blueprints/iotgateway/playbooks/roles/el_edgex/tasks/main.yml [new file with mode: 0644]
blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/install.yml [new file with mode: 0644]
blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/main.yml [new file with mode: 0644]
blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/uninstall.yml [new file with mode: 0644]

@@ -57,6 +57,7 @@
 
   roles:
     - grafana
+    - el_hawkbit
 
 ### EdgeGallery related ###
 
     - kubeconfig
     - mepkubeconfig
     - cadvisor
+    - el_edgex
 
 ### EdgeGallery related ###
 
diff --git a/blueprints/iotgateway/playbooks/roles/el_edgex/files/deploy/edgexonk8s.sh b/blueprints/iotgateway/playbooks/roles/el_edgex/files/deploy/edgexonk8s.sh
new file mode 100644 (file)
index 0000000..40a69be
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/bash -ex
+#############################################################################
+# Copyright (c) 2019 Huawei Tech and others.                                #
+# All rights reserved. This program and the accompanying materials          #
+# are made available under the terms of the Apache License, Version 2.0     #
+# which accompanies this distribution, and is available at                  # 
+# http://www.apache.org/licenses/LICENSE-2.0                                #
+#############################################################################
+
+#######################################################################################
+# 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`
+git clone https://github.com/edgexfoundry-holding/edgex-kubernetes-support.git
+cd edgex-kubernetes-support/releases/edinburgh/kubernetes
+ls
+kubectl create -k .
+cd ${edgexPath}
+echo "-----------------------------------------------------------"
+echo "Edgex platform PODs"
+kubectl get pod
+echo "-----------------------------------------------------------"
+echo "-----------------------------------------------------------"
+echo "Edge platform Kubernetes Services"
+kubectl get svc
+echo "-----------------------------------------------------------"
+kubectl expose deployment edgex-core-consul --type=NodePort --name=consulnodeport
+kubectl expose deployment edgex-core-command --type=NodePort --name=commandnodeport
+kubectl expose deployment edgex-core-data --type=NodePort --name=datanodeport
+kubectl expose deployment edgex-core-metadata --type=NodePort --name=metadatanodeport
+kubectl expose deployment edgex-support-rulesengine --type=NodePort --name=rulesenginenodeport
+kubectl expose deployment edgex-support-logging --type=NodePort --name=loggingnodeport
+kubectl get svc | grep NodePort
+
+echo "**********************************************************************"
+echo "Edgex Platform Deployment--------------------------------------SUCCESS"
diff --git a/blueprints/iotgateway/playbooks/roles/el_edgex/tasks/install.yml b/blueprints/iotgateway/playbooks/roles/el_edgex/tasks/install.yml
new file mode 100644 (file)
index 0000000..15dd508
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# Copyright 2020 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+---
+
+- name: Doing deployment setup for eliot
+  copy:
+    src: deploy
+    dest: /tmp/el_edgex/
+    mode: 777
+
+- name: Execute edgex script
+  shell:
+    cmd: /tmp/el_edgex/deploy/edgexonk8s.sh
diff --git a/blueprints/iotgateway/playbooks/roles/el_edgex/tasks/main.yml b/blueprints/iotgateway/playbooks/roles/el_edgex/tasks/main.yml
new file mode 100644 (file)
index 0000000..e10d37e
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# Copyright 2020 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+---
+# tasks file for el_edgex
+- include: "install.yml"
+  static: false
+  when: operation == 'install'
diff --git a/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/install.yml b/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/install.yml
new file mode 100644 (file)
index 0000000..b9d2714
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Copyright 2020 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+---
+
+- name: Hawkbit add repo
+  command: helm repo add eclipse-iot https://eclipse.org/packages/charts
+
+- name: Update helm repo
+  command: helm repo update
+
+- name: Install hackbit
+  command: helm install eclipse-hawkbit eclipse-iot/hawkbit
diff --git a/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/main.yml b/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/main.yml
new file mode 100644 (file)
index 0000000..056af82
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Copyright 2020 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+---
+# tasks file for el_hawkbit
+
+- include: "install.yml"
+  static: false
+  when: operation == 'install'
+
+- include: "uninstall.yml"
+  static: false
+  when: operation == 'uninstall'
diff --git a/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/uninstall.yml b/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/uninstall.yml
new file mode 100644 (file)
index 0000000..bec510c
--- /dev/null
@@ -0,0 +1,20 @@
+#
+# Copyright 2020 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+---
+
+- name: Uninstall hawkbit
+  command: helm delete eclipse-hawkbit