Merge "eg_mecm-mepm install playbook image teg added"
authorGaurav Agrawal <gaurav.agrawal@huawei.com>
Mon, 2 Nov 2020 05:36:45 +0000 (05:36 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Mon, 2 Nov 2020 05:36:45 +0000 (05:36 +0000)
ocd/infra/playbooks/roles/eg_appstore/tasks/install.yml
ocd/infra/playbooks/roles/eg_developer/tasks/install.yml
ocd/infra/playbooks/roles/eg_mecm-fe/tasks/install.yml
ocd/infra/playbooks/roles/eg_pre_require/tasks/install.yml [new file with mode: 0644]
ocd/infra/playbooks/roles/eg_pre_require/tasks/main.yml [new file with mode: 0644]
ocd/infra/playbooks/roles/eg_set-helm-repo/tasks/install.yml [new file with mode: 0644]
ocd/infra/playbooks/roles/eg_set-helm-repo/tasks/main.yml [new file with mode: 0644]

index a40ca98..57c21af 100644 (file)
@@ -1,10 +1,28 @@
+#
+# 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: Import vars
   include_vars:
   # yamllint disable rule:line-length
-      file: /root/edgeakraino/jenkins/work/workspace/ealt-edge-deploy-virtual-daily-master/ocd/infra/playbooks/config.yml
+      file: ../../../config.yml
   # yamllint disable rule:line-length
       name: vardata
 
 - name: Pull helm chart appstore
   # yamllint disable rule:line-length
-  command: helm install appstore-edgegallery edgegallery/appstore --set global.oauth2.authServerAddress=https://{{vardata.authServerMecm.name}}:30067 --set global.ssl.enabled=true --set global.ssl.secretName=edgegallery-ssl-secret
+  command: helm install -- wait appstore-edgegallery edgegallery/appstore --set global.oauth2.authServerAddress=https://{{vardata.centernodeip.name}}:30067 --set images.appstoreFe.tag={{vardata.appstorefeimagetag.name}} --set images.appstoreBe.tag={{vardata.appstorebeimagetag.name}} --set global.ssl.enabled=true --set global.ssl.secretName=edgegallery-ssl-secret
index 840ab7b..7ddadd9 100644 (file)
@@ -16,7 +16,7 @@
 
 ---
 
-- name: Import vars
+- name: Import config file
   include_vars:
   # yamllint disable rule:line-length
     file: ../../../config.yml
@@ -25,4 +25,4 @@
 
 - name: Developer chart installing
   # yamllint disable rule:line-length
-  command: helm install developer-edgegallery edgegallery/developer --set global.oauth2.authServerAddress=https://{{vardata.authServerMecm.name}}:30067 --set global.ssl.enabled=true --set global.ssl.secretName=edgegallery-ssl-secret
+  command: helm install --wait developer-edgegallery edgegallery/developer --set global.oauth2.authServerAddress=https://{{vardata.centernodeip.name}}:30067 --set images.developerFe.tag={{vardata.developerfeimagetag.name}} --set images.developerBe.tag={{vardata.developerbeimagetag.name}} --set images.toolChain.tag={{vardata.toolchainimagetag.name}} --set global.ssl.enabled=true --set global.ssl.secretName=edgegallery-ssl-secret
index b6373a6..9a62619 100644 (file)
@@ -21,6 +21,6 @@
       file: ../../../config.yml
       name: vardata
 
-- name: Pulling repo mecm-fe
+- name: Mecm-fe chart install and image pull
   # yamllint disable rule:line-length
-  command: helm install mecm-fe-edgegallery edgegallery/mecm-fe --set global.oauth2.authServerAddress=https://{{vardata.authServer.name}}:30067 --set global.ssl.enabled=true --set global.ssl.secretName=edgegallery-ssl-secret
+  command: helm install --wait mecm-fe-edgegallery edgegallery/mecm-fe --set global.oauth2.authServerAddress=https://{{vardata.centernodeip.name}}:30067 --set images.mecmFe.tag={{vardata.imagetag.name}} --set global.ssl.enabled=true --set global.ssl.secretName=edgegallery-ssl-secret
diff --git a/ocd/infra/playbooks/roles/eg_pre_require/tasks/install.yml b/ocd/infra/playbooks/roles/eg_pre_require/tasks/install.yml
new file mode 100644 (file)
index 0000000..0871f84
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# 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: Import config file
+  include_vars:
+      file: ../../../config.yml
+      name: vardata
+
+- synchronize:
+      src: /tmp/.mep_tmp_cer
+      dest: /tmp/
+
+- name: Docker login
+  # yamllint disable rule:line-length
+  command: docker login -u {{ vardata.dockerusername.name}} -p {{ vardata.dockerpass.name}} swr.ap-southeast-1.myhuaweicloud.com
+  # yamllint disable rule:line-length
+
+- name: Setting pull image swr path
+  # yamllint disable rule:line-length
+  command: kubectl create secret docker-registry swrregcred --docker-server=https://swr.ap-southeast-1.myhuaweicloud.com/v2/ --docker-username={{ vardata.swrusr.name}} --docker-password={{ vardata.swrpass.name}}
diff --git a/ocd/infra/playbooks/roles/eg_pre_require/tasks/main.yml b/ocd/infra/playbooks/roles/eg_pre_require/tasks/main.yml
new file mode 100644 (file)
index 0000000..bf4c98a
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# 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 eg_comm
+- include: "install.yml"
+  static: false
+  when: operation == 'install'
diff --git a/ocd/infra/playbooks/roles/eg_set-helm-repo/tasks/install.yml b/ocd/infra/playbooks/roles/eg_set-helm-repo/tasks/install.yml
new file mode 100644 (file)
index 0000000..bc779fc
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# 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: Import config file
+  include_vars:
+    file: ../../../config.yml
+    name: vardata
+
+- name: Add adgegallery repo in private IP
+  # yamllint disable rule:line-length
+  command: helm repo add edgegallery http://{{ vardata.helmrepoip.name}}:8080/edgegallery
+
+- name: Add stable repo in private IP
+  command: helm repo add stable http://{{ vardata.helmrepoip.name}}:8080/stable
diff --git a/ocd/infra/playbooks/roles/eg_set-helm-repo/tasks/main.yml b/ocd/infra/playbooks/roles/eg_set-helm-repo/tasks/main.yml
new file mode 100644 (file)
index 0000000..2c506fb
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# 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 eg_set-helm-repo
+- include: "install.yml"
+  static: false
+  when: operation == 'install'