From: arvindpatel Date: Mon, 30 Nov 2020 12:47:18 +0000 (+0530) Subject: Adgex and hawkbit added X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=f75c64c6e0356812802c13fcce14b3d4c7569d47;p=eliot.git Adgex and hawkbit added Signed-off-by: arvindpatel Change-Id: Id12ffd49215ef0e9167d6e2a82e2fe8ef7bddb21 --- diff --git a/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml b/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml index b58890e..4b5f671 100644 --- a/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml +++ b/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml @@ -59,6 +59,7 @@ roles: - grafana + - el_hawkbit ### Pre-Requisites ### diff --git a/blueprints/iotgateway/playbooks/eloit-all.yml b/blueprints/iotgateway/playbooks/eliot-all.yml similarity index 98% rename from blueprints/iotgateway/playbooks/eloit-all.yml rename to blueprints/iotgateway/playbooks/eliot-all.yml index 2ea2dec..294a138 100644 --- a/blueprints/iotgateway/playbooks/eloit-all.yml +++ b/blueprints/iotgateway/playbooks/eliot-all.yml @@ -57,6 +57,7 @@ roles: - grafana + - el_hawkbit ### EdgeGallery related ### @@ -115,6 +116,7 @@ - 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 index 0000000..40a69be --- /dev/null +++ b/blueprints/iotgateway/playbooks/roles/el_edgex/files/deploy/edgexonk8s.sh @@ -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 index 0000000..15dd508 --- /dev/null +++ b/blueprints/iotgateway/playbooks/roles/el_edgex/tasks/install.yml @@ -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 index 0000000..e10d37e --- /dev/null +++ b/blueprints/iotgateway/playbooks/roles/el_edgex/tasks/main.yml @@ -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 index 0000000..b9d2714 --- /dev/null +++ b/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/install.yml @@ -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 index 0000000..056af82 --- /dev/null +++ b/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/main.yml @@ -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 index 0000000..bec510c --- /dev/null +++ b/blueprints/iotgateway/playbooks/roles/el_hawkbit/tasks/uninstall.yml @@ -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