From 2a63751414e6cface102bcdfef45fb06fe1942b9 Mon Sep 17 00:00:00 2001 From: arvindpatel Date: Fri, 4 Dec 2020 07:22:21 +0530 Subject: [PATCH] Influxdb and openebs code Signed-off-by: arvindpatel Change-Id: I477318d9b1c344cd6326d77fc0359dfa989f5555 --- ocd/infra/playbooks/ealt-all-uninstall.yml | 2 ++ ocd/infra/playbooks/ealt-all.yml | 2 ++ .../playbooks/roles/influxdb/tasks/install.yml | 25 ++++++++++++++++ ocd/infra/playbooks/roles/influxdb/tasks/main.yml | 26 +++++++++++++++++ .../playbooks/roles/influxdb/tasks/uninstall.yml | 21 ++++++++++++++ .../playbooks/roles/openebsrole/tasks/install.yml | 33 ++++++++++++++++++++++ .../playbooks/roles/openebsrole/tasks/main.yml | 27 ++++++++++++++++++ .../roles/openebsrole/tasks/uninstall.yml | 21 ++++++++++++++ 8 files changed, 157 insertions(+) create mode 100644 ocd/infra/playbooks/roles/influxdb/tasks/install.yml create mode 100644 ocd/infra/playbooks/roles/influxdb/tasks/main.yml create mode 100644 ocd/infra/playbooks/roles/influxdb/tasks/uninstall.yml create mode 100644 ocd/infra/playbooks/roles/openebsrole/tasks/install.yml create mode 100644 ocd/infra/playbooks/roles/openebsrole/tasks/main.yml create mode 100644 ocd/infra/playbooks/roles/openebsrole/tasks/uninstall.yml diff --git a/ocd/infra/playbooks/ealt-all-uninstall.yml b/ocd/infra/playbooks/ealt-all-uninstall.yml index f3e24f2..71f0d44 100644 --- a/ocd/infra/playbooks/ealt-all-uninstall.yml +++ b/ocd/infra/playbooks/ealt-all-uninstall.yml @@ -101,6 +101,8 @@ - kubeconfig - mepkubeconfig - cadvisor + - influxdb + - openebsrole ### Pre-Requisites ### diff --git a/ocd/infra/playbooks/ealt-all.yml b/ocd/infra/playbooks/ealt-all.yml index bfcb3dd..2a9c588 100644 --- a/ocd/infra/playbooks/ealt-all.yml +++ b/ocd/infra/playbooks/ealt-all.yml @@ -115,6 +115,8 @@ - kubeconfig - mepkubeconfig - cadvisor + - influxdb + - openebsrole ### EdgeGallery related ### diff --git a/ocd/infra/playbooks/roles/influxdb/tasks/install.yml b/ocd/infra/playbooks/roles/influxdb/tasks/install.yml new file mode 100644 index 0000000..bdffd3b --- /dev/null +++ b/ocd/infra/playbooks/roles/influxdb/tasks/install.yml @@ -0,0 +1,25 @@ +# +# 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: "INSTALL: Install influxdata by helm charts" + shell: + cmd: helm repo add influxdata https://influxdata.github.io/helm-charts + +- name: "INSTALL: Deploye influxdata" + shell: + cmd: helm upgrade -i influxdb influxdata/influxdb --set image.tag=1.8.0 diff --git a/ocd/infra/playbooks/roles/influxdb/tasks/main.yml b/ocd/infra/playbooks/roles/influxdb/tasks/main.yml new file mode 100644 index 0000000..ddbcf0b --- /dev/null +++ b/ocd/infra/playbooks/roles/influxdb/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 influxdb + +- include: "install.yml" + static: false + when: operation == 'install' + +- include: "uninstall.yml" + static: false + when: operation == 'uninstall' diff --git a/ocd/infra/playbooks/roles/influxdb/tasks/uninstall.yml b/ocd/infra/playbooks/roles/influxdb/tasks/uninstall.yml new file mode 100644 index 0000000..94aa886 --- /dev/null +++ b/ocd/infra/playbooks/roles/influxdb/tasks/uninstall.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. +# + +--- + +- name: Uninstalling influxdb + shell: + cmd: helm uninstall influxdb diff --git a/ocd/infra/playbooks/roles/openebsrole/tasks/install.yml b/ocd/infra/playbooks/roles/openebsrole/tasks/install.yml new file mode 100644 index 0000000..6a15fab --- /dev/null +++ b/ocd/infra/playbooks/roles/openebsrole/tasks/install.yml @@ -0,0 +1,33 @@ +# +# 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: "create namespace openebs" + shell: + cmd: kubectl create ns openebs + +- name: "INSTALL: add helm repo add aarch64" + shell: + cmd: helm repo add openebs https://openebs.github.io/charts + +- name: "INSTALL: helm repo update aarch64" + shell: + cmd: helm repo update + +- name: "INSTALL: Install on Openebs aarch64" + shell: + cmd: helm install --namespace openebs --generate-name openebs --version 2.3.0 diff --git a/ocd/infra/playbooks/roles/openebsrole/tasks/main.yml b/ocd/infra/playbooks/roles/openebsrole/tasks/main.yml new file mode 100644 index 0000000..51b1c39 --- /dev/null +++ b/ocd/infra/playbooks/roles/openebsrole/tasks/main.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. +# + +--- + +# tasks file for sample-rolename + +- include: "install.yml" + static: false + when: operation == 'install' + +- include: "uninstall.yml" + static: false + when: operation == 'uninstall' diff --git a/ocd/infra/playbooks/roles/openebsrole/tasks/uninstall.yml b/ocd/infra/playbooks/roles/openebsrole/tasks/uninstall.yml new file mode 100644 index 0000000..5d8ef9a --- /dev/null +++ b/ocd/infra/playbooks/roles/openebsrole/tasks/uninstall.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. +# + +--- + +- name: Uninstall openebs + shell: + cmd: kubectl delete ns openebs -- 2.16.6