From f17fc1353a424b5ac96e1a9d302048c95eff6a37 Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 14:54:49 +0530 Subject: [PATCH 01/14] Added changes needed to install SODA on Ubuntu 20.04 --- ansible/roles/common/tasks/main.yml | 8 +-- .../scenarios/container.yml | 16 +++--- .../scenarios/clean_gelato_ha.yml | 8 +-- ansible/roles/ha-ip-update/tasks/main.yml | 1 - ansible/roles/osdsdb/scenarios/etcd.yml | 11 ++++ .../osdsdock/scenarios/cinder_standalone.yml | 2 +- ansible/script/keystone.sh | 8 +-- ansible/script/ministone.py | 51 ++++++++++--------- 8 files changed, 60 insertions(+), 45 deletions(-) diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml index d71cd9339..4825930ad 100644 --- a/ansible/roles/common/tasks/main.yml +++ b/ansible/roles/common/tasks/main.yml @@ -27,7 +27,7 @@ become: yes - name: run the equivalent of "apt-get update" as a separate step - when: ansible_distribution == "Ubuntu" and (ansible_lsb.major_release|int >=16 and ansible_lsb.major_release|int <=18) + when: ansible_facts['distribution'] == 'Ubuntu' and (ansible_facts['distribution_major_version']|int >=16 and ansible_facts['distribution_major_version']|int <=20) apt: update_cache: yes @@ -38,9 +38,9 @@ with_items: - make - gcc - - python-pip + - python3-pip - open-iscsi - when: ansible_distribution == "Ubuntu" and (ansible_lsb.major_release|int >=16 and ansible_lsb.major_release|int <=18) + when: ansible_facts['distribution'] == 'Ubuntu' and (ansible_facts['distribution_major_version']|int >=16 and ansible_facts['distribution_major_version']|int <=20) - name: Install system packages on CentoS or RHEL when: (ansible_distribution == "CentOS" or ansible_distribution == "RedHat") @@ -63,7 +63,7 @@ with_items: - librados-dev - librbd-dev - when: ansible_distribution == "Ubuntu" and (ansible_lsb.major_release|int >=16 and ansible_lsb.major_release|int <=18) + when: ansible_facts['distribution'] == 'Ubuntu' and (ansible_facts['distribution_major_version']|int >=16 and ansible_facts['distribution_major_version']|int <=20) - name: create opensds work directory if it doesn't exist file: diff --git a/ansible/roles/dashboard-installer/scenarios/container.yml b/ansible/roles/dashboard-installer/scenarios/container.yml index 423843eab..13229e350 100644 --- a/ansible/roles/dashboard-installer/scenarios/container.yml +++ b/ansible/roles/dashboard-installer/scenarios/container.yml @@ -33,10 +33,10 @@ OPENSDS_S3_URL: "http://{{ host_ip }}:8090" OPENSDS_S3_HOST: "{{ host_ip }}" OPENSDS_S3_PORT: "8090" - SODA_PROMETHEUS_PORT: "{{ prometheus_port }}" - SODA_ALERTMANAGER_PORT: "{{ alertmanager_port }}" - SODA_GRAFANA_PORT: "{{ grafana_port }}" - STORAGE_SERVICE_PLAN_ENABLED: "{{ enable_storage_service_plans }}" + SODA_PROMETHEUS_PORT: "{{ prometheus_port|quote }}" + SODA_ALERTMANAGER_PORT: "{{ alertmanager_port|quote }}" + SODA_GRAFANA_PORT: "{{ grafana_port|quote }}" + STORAGE_SERVICE_PLAN_ENABLED: "{{ enable_storage_service_plans|string }}" SODA_ALERTMANAGER_URL: "http://{{ host_ip }}:{{ alertmanager_port }}" when: gelato_ha != true @@ -56,9 +56,9 @@ OPENSDS_S3_URL: "http://{{ gelato_ha_s3_ip }}:{{ gelato_ha_s3_port }}" OPENSDS_S3_HOST: "{{ gelato_ha_s3_ip }}" OPENSDS_S3_PORT: "{{ gelato_ha_s3_port }}" - SODA_PROMETHEUS_PORT: "{{ prometheus_port }}" - SODA_ALERTMANAGER_PORT: "{{ alertmanager_port }}" - SODA_GRAFANA_PORT: "{{ grafana_port }}" - STORAGE_SERVICE_PLAN_ENABLED: "{{ enable_storage_service_plans }}" + SODA_PROMETHEUS_PORT: "{{ prometheus_port|quote }}" + SODA_ALERTMANAGER_PORT: "{{ alertmanager_port|quote}}" + SODA_GRAFANA_PORT: "{{ grafana_port|quote}}" + STORAGE_SERVICE_PLAN_ENABLED: "{{ enable_storage_service_plans|string }}" SODA_ALERTMANAGER_URL: "http://{{ host_ip }}:{{ alertmanager_port }}" when: gelato_ha == true diff --git a/ansible/roles/gelato-ha-uninstaller/scenarios/clean_gelato_ha.yml b/ansible/roles/gelato-ha-uninstaller/scenarios/clean_gelato_ha.yml index cef188262..4af40b439 100644 --- a/ansible/roles/gelato-ha-uninstaller/scenarios/clean_gelato_ha.yml +++ b/ansible/roles/gelato-ha-uninstaller/scenarios/clean_gelato_ha.yml @@ -32,9 +32,9 @@ shell: "{{ item }}" become_user: "{{ k8s_user }}" with_items: - - "kubectl patch pvc mongo-0-pv-claim -p '\''{{patch_param }}'\'' --type=merge -n soda-multi-cloud" - - "kubectl patch pvc mongo-1-pv-claim -p '\''{{patch_param }}'\'' --type=merge -n soda-multi-cloud" - - "kubectl patch pvc mongo-2-pv-claim -p '\''{{patch_param }}'\'' --type=merge -n soda-multi-cloud" + - 'kubectl patch pvc mongo-0-pv-claim -p "\""{{patch_param }}"\"" --type=merge -n soda-multi-cloud' + - 'kubectl patch pvc mongo-1-pv-claim -p "\""{{patch_param }}"\"" --type=merge -n soda-multi-cloud' + - 'kubectl patch pvc mongo-2-pv-claim -p "\""{{patch_param }}"\"" --type=merge -n soda-multi-cloud' ignore_errors: yes - name: Pause for 2 seconds @@ -92,6 +92,6 @@ file: state: absent path: "{{ gelato_work_dir }}/multi-cloud/" - ignore_error: yes + ignore_error: yes become: yes diff --git a/ansible/roles/ha-ip-update/tasks/main.yml b/ansible/roles/ha-ip-update/tasks/main.yml index 271de160d..314fe9800 100644 --- a/ansible/roles/ha-ip-update/tasks/main.yml +++ b/ansible/roles/ha-ip-update/tasks/main.yml @@ -22,7 +22,6 @@ # Same IP is used for both the services. Only Port is different (predefined) - name: replace the gelato_ha_api_ip and gelato_ha_s3_ip in the gelato-ha.yml - hosts: controllers replace: path: "{{ role_path }}/../../group_vars/gelato-ha.yml" regexp: "{{ item.regexp }}" diff --git a/ansible/roles/osdsdb/scenarios/etcd.yml b/ansible/roles/osdsdb/scenarios/etcd.yml index b0f113cbe..72e7b19e0 100644 --- a/ansible/roles/osdsdb/scenarios/etcd.yml +++ b/ansible/roles/osdsdb/scenarios/etcd.yml @@ -74,6 +74,8 @@ Type=notify Restart=always RestartSec=5s + User=root + Group=root LimitNOFILE=40000 TimeoutStartSec=0 @@ -110,6 +112,15 @@ - install_as_systemd == true and ( service_etcd_status.rc != 0 and etcd_service_source_exists.stat.exists is undefined or etcd_service_source_exists.stat.exists == false ) become: true +- name: sleep for 5 seconds and wait for etcd to come up + wait_for: + host: "{{ etcd_host }}" + port: "{{ etcd_port }}" + state: started + delay: 5 + timeout: 120 + when: ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version']|int >=20 + - name: check etcd cluster health shell: ./etcdctl --endpoints http://{{ etcd_host }}:{{ etcd_port }} cluster-health become: true diff --git a/ansible/roles/osdsdock/scenarios/cinder_standalone.yml b/ansible/roles/osdsdock/scenarios/cinder_standalone.yml index f80bcaed5..5900891a7 100644 --- a/ansible/roles/osdsdock/scenarios/cinder_standalone.yml +++ b/ansible/roles/osdsdock/scenarios/cinder_standalone.yml @@ -18,7 +18,7 @@ name: "{{ item }}" state: present with_items: - - python-pip + - python3-pip - lvm2 - thin-provisioning-tools - libffi-dev diff --git a/ansible/script/keystone.sh b/ansible/script/keystone.sh index 59132e918..6352cd7a4 100755 --- a/ansible/script/keystone.sh +++ b/ansible/script/keystone.sh @@ -116,7 +116,7 @@ wait_for_keystone () { do # get a token to check if keystone is working correctly or not. # keystone credentials such as OS_USERNAME must be set before. - python ${TOP_DIR}/ministone.py token_issue + python3 ${TOP_DIR}/ministone.py token_issue if [ "$?" == "0" ]; then return fi @@ -188,7 +188,7 @@ install(){ docker cp "$TOP_DIR/../../conf/keystone.policy.json" opensds-authchecker:/etc/keystone/policy.json keystone_credentials wait_for_keystone - python ${TOP_DIR}/ministone.py endpoint_bulk_update keystone "http://${HOST_IP}/identity" + python3 ${TOP_DIR}/ministone.py endpoint_bulk_update keystone "http://${HOST_IP}/identity" else create_user download_code @@ -227,7 +227,7 @@ config_hotpot() { create_user_and_endpoint_for_hotpot else keystone_credentials - python ${TOP_DIR}/ministone.py endpoint_bulk_update "opensds$OPENSDS_VERSION" "http://${HOST_IP}:50040/$OPENSDS_VERSION/%(tenant_id)s" + python3 ${TOP_DIR}/ministone.py endpoint_bulk_update "opensds$OPENSDS_VERSION" "http://${HOST_IP}:50040/$OPENSDS_VERSION/%(tenant_id)s" fi } @@ -237,7 +237,7 @@ config_gelato() { create_user_and_endpoint_for_gelato else keystone_credentials - python ${TOP_DIR}/ministone.py endpoint_bulk_update "multicloud$MULTICLOUD_VERSION" "http://${HOST_IP}:8089/v1beta/%(tenant_id)s" + python3 ${TOP_DIR}/ministone.py endpoint_bulk_update "multicloud$MULTICLOUD_VERSION" "http://${HOST_IP}:8089/v1beta/%(tenant_id)s" fi } diff --git a/ansible/script/ministone.py b/ansible/script/ministone.py index b0bb9c7bc..02c2f0269 100755 --- a/ansible/script/ministone.py +++ b/ansible/script/ministone.py @@ -20,22 +20,23 @@ import pprint import json + def token_issue(): body = { 'auth': { - 'identity': { 'methods': ['password'], - 'password': { - 'user': { - 'name': OS_USERNAME, - 'domain': { 'name': OS_USER_DOMAIN_NAME }, - 'password': OS_PASSWORD - } - } - }, + 'identity': {'methods': ['password'], + 'password': { + 'user': { + 'name': OS_USERNAME, + 'domain': {'name': OS_USER_DOMAIN_NAME}, + 'password': OS_PASSWORD + } + } + }, 'scope': { 'project': { 'name': OS_PROJECT_NAME, - 'domain': { 'name': OS_USER_DOMAIN_NAME } + 'domain': {'name': OS_USER_DOMAIN_NAME} } } } @@ -59,6 +60,7 @@ def token_issue(): else: return None + def service_list(token): headers = { 'Content-Type': 'application/json', @@ -76,12 +78,13 @@ def service_list(token): result_list = json.loads(r_get.text)['services'] for s in result_list: - result_dict[s['name']] = s['id'] + result_dict[s['name']] = s['id'] except: return None return result_dict + def endpoint_list(token, service): headers = { @@ -95,7 +98,7 @@ def endpoint_list(token, service): print('DEBUG: GET /v3/endpoints - status_code = %s' % (r_get.status_code)) except: - return None + return None if r_get.status_code != 200: return None @@ -113,6 +116,7 @@ def endpoint_list(token, service): return ep_list + def endpoint_bulk_update(token, service, url): headers = { 'Content-Type': 'application/json', @@ -127,7 +131,7 @@ def endpoint_bulk_update(token, service, url): print("DEBUG: ep_list: %s %s" % (ep_list, url)) for ep in ep_list: - body = {"endpoint": { "url": url }} + body = {"endpoint": {"url": url}} endpoint_id = ep[0] if debug: print("DEBUG: %s / %s" % @@ -147,6 +151,7 @@ def endpoint_bulk_update(token, service, url): print('DEBUG: PATCH /endpoints/XXXX - status_code = %s' % (r_patch.status_code)) + # # ministone.py - A simple stupid keystone client with almost no dependencies. # @@ -164,13 +169,13 @@ def endpoint_bulk_update(token, service, url): debug = False - OS_AUTH_URL=os.environ['OS_AUTH_URL'] - OS_PASSWORD=os.environ['OS_PASSWORD'] - OS_PROJECT_DOMAIN_NAME=os.environ['OS_PROJECT_DOMAIN_NAME'] - OS_PROJECT_NAME=os.environ['OS_PROJECT_NAME'] - OS_USERNAME=os.environ['OS_USERNAME'] - OS_USER_DOMAIN_NAME=os.environ['OS_USER_DOMAIN_NAME'] - #OS_USER_DOMAIN_ID=os.environ['OS_USER_DOMAIN_ID'] + OS_AUTH_URL = os.environ['OS_AUTH_URL'] + OS_PASSWORD = os.environ['OS_PASSWORD'] + OS_PROJECT_DOMAIN_NAME = os.environ['OS_PROJECT_DOMAIN_NAME'] + OS_PROJECT_NAME = os.environ['OS_PROJECT_NAME'] + OS_USERNAME = os.environ['OS_USERNAME'] + OS_USER_DOMAIN_NAME = os.environ['OS_USER_DOMAIN_NAME'] + # OS_USER_DOMAIN_ID=os.environ['OS_USER_DOMAIN_ID'] # token_issue # used for keystone process start up check. @@ -178,15 +183,15 @@ def endpoint_bulk_update(token, service, url): if len(sys.argv) == 2 and sys.argv[1] == 'token_issue': token = token_issue() if not token: - sys.exit(1) + sys.exit(1) else: - sys.exit(0) + sys.exit(0) # endpoint_bulk_update # used for overwriting keystone endpoints if not ((len(sys.argv) == 4) and (sys.argv[1] == 'endpoint_bulk_update')): print('Specify service_name and url for bulk update. Exiting...') - sys.exit(1) + sys.exit(1) token = token_issue() if not token: From 062db4c897c2f035613bdee73d6764ff08375759 Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 15:02:54 +0530 Subject: [PATCH 02/14] Updated the CI to reflect changes in the branch --- .github/workflows/ci_pull_request.yml | 7 ++++++- .github/workflows/ci_push.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_pull_request.yml b/.github/workflows/ci_pull_request.yml index c86e03636..186bbaa06 100644 --- a/.github/workflows/ci_pull_request.yml +++ b/.github/workflows/ci_pull_request.yml @@ -5,7 +5,12 @@ name: SODA Installer CI # Controls when the action will run. # Triggers the workflow on push or pull request events but only for the main branch # Allows you to run this workflow manually from the Actions tab -on: [pull_request, workflow_dispatch] +on: + pull_request: + branches: + - main + - feat/ubuntu2004 + workflow_dispatch: jobs: # This workflow contains a single job called "build" diff --git a/.github/workflows/ci_push.yml b/.github/workflows/ci_push.yml index e543c7bc5..d03b88db2 100644 --- a/.github/workflows/ci_push.yml +++ b/.github/workflows/ci_push.yml @@ -5,8 +5,12 @@ name: SODA Installer CI # Controls when the action will run. # Triggers the workflow on push or pull request events but only for the main branch # Allows you to run this workflow manually from the Actions tab -on: [push, workflow_dispatch] - +on: + push: + branches: + - main + - feat/ubuntu2004 + workflow_dispatch: jobs: # This workflow contains a single job called "build" build: From 4f1d0b9750fef81ed891acfa12decc4f26050e9b Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 15:55:46 +0530 Subject: [PATCH 03/14] Updated the CI. Added ubuntu20.04 runner. removed ansible changes made in ubuntu18.04 --- .github/workflows/ci_pull_request.yml | 10 ++-------- .github/workflows/ci_push.yml | 8 +------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci_pull_request.yml b/.github/workflows/ci_pull_request.yml index 186bbaa06..d4fb18963 100644 --- a/.github/workflows/ci_pull_request.yml +++ b/.github/workflows/ci_pull_request.yml @@ -21,7 +21,7 @@ jobs: strategy: matrix: go-version: [1.13.x] - os: [ubuntu-18.04] + os: [ubuntu-20.04] # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -41,13 +41,7 @@ jobs: run: | echo "Installed Ansible Version in Runtime: " ansible --version - - - name: Remove latest ansible on Ubuntu 18.04 - run: | - echo "uninstall with pipx" - pipx uninstall ansible-core - if: ${{ matrix.os == 'ubuntu-18.04' }} - + # Change the permissions of the ansible installer - name: 'Make ansible installer executable and run install ansible on OS: ${{ matrix.os }}' run: | diff --git a/.github/workflows/ci_push.yml b/.github/workflows/ci_push.yml index d03b88db2..8553deb02 100644 --- a/.github/workflows/ci_push.yml +++ b/.github/workflows/ci_push.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: go-version: [1.13.x] - os: [ubuntu-18.04] + os: [ubuntu-20.04] # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -41,12 +41,6 @@ jobs: echo "Installed Ansible Version in Runtime: " ansible --version - - name: Remove latest ansible on Ubuntu 18.04 - run: | - echo "uninstall with pipx" - pipx uninstall ansible-core - if: ${{ matrix.os == 'ubuntu-18.04'}} - # Change the permissions of the ansible installer - name: 'Make ansible installer executable and run install ansible on OS: ${{ matrix.os }}' run: | From fa49914d875740c92eecd7885eaa31df0b38f8be Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 16:11:50 +0530 Subject: [PATCH 04/14] Added ignore error to wait for etcd --- ansible/roles/osdsdb/scenarios/etcd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/osdsdb/scenarios/etcd.yml b/ansible/roles/osdsdb/scenarios/etcd.yml index 72e7b19e0..fb2197c37 100644 --- a/ansible/roles/osdsdb/scenarios/etcd.yml +++ b/ansible/roles/osdsdb/scenarios/etcd.yml @@ -119,6 +119,7 @@ state: started delay: 5 timeout: 120 + ignore_errors: true when: ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version']|int >=20 - name: check etcd cluster health From 33a0c5a371396dcf2b76faa20872bb061803af17 Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 16:17:53 +0530 Subject: [PATCH 05/14] Added ignore error to wait for etcd --- ansible/roles/osdsdb/scenarios/etcd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/osdsdb/scenarios/etcd.yml b/ansible/roles/osdsdb/scenarios/etcd.yml index fb2197c37..93588d76c 100644 --- a/ansible/roles/osdsdb/scenarios/etcd.yml +++ b/ansible/roles/osdsdb/scenarios/etcd.yml @@ -119,7 +119,7 @@ state: started delay: 5 timeout: 120 - ignore_errors: true + ignore_errors: true when: ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version']|int >=20 - name: check etcd cluster health From 13dcbfbd2043045f344b4a025cf028c0b6f9a9e5 Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 18:45:10 +0530 Subject: [PATCH 06/14] Added install_etcd_as_systemd variable to enable etcd installation separately as a systemd process. --- ansible/group_vars/common.yml | 5 +++++ ansible/roles/cleaner/tasks/main.yml | 8 ++++---- ansible/roles/osdsdb/scenarios/etcd.yml | 14 +++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ansible/group_vars/common.yml b/ansible/group_vars/common.yml index 37e3f8f07..f3269f3e4 100644 --- a/ansible/group_vars/common.yml +++ b/ansible/group_vars/common.yml @@ -54,6 +54,11 @@ ansible_os_family: Debian # false: Will install api, dock, controller and etcd as standalone processes. Recommended for development use. install_as_systemd: true +# Install etcd as systemd process or standalone application: true / false +# true: Will install etcd as a systemd service and enable it. Recommended for production use +# false: Will install etcd as standalone process. Recommended for development use and on Ubuntu 20.04. +install_etcd_as_systemd: false + # delete all source packages source_purge: true diff --git a/ansible/roles/cleaner/tasks/main.yml b/ansible/roles/cleaner/tasks/main.yml index d28add895..b2245f601 100644 --- a/ansible/roles/cleaner/tasks/main.yml +++ b/ansible/roles/cleaner/tasks/main.yml @@ -24,7 +24,7 @@ # Kill all the systemd processes and disable services - name: kill osdslet and osdsdock and osdsapiserver etcd daemon service shell: killall osdslet osdsdock osdsapiserver etcd - when: install_from != "container" and install_as_systemd == false + when: install_from != "container" and install_as_systemd == false and install_etcd_as_systemd == false ignore_errors: true become: true tags: hotpot @@ -32,7 +32,7 @@ # Kill all the systemd processes and disable services - name: kill osdslet and osdsdock and osdsapiserver etcd daemon service shell: killall osdslet osdsdock osdsapiserver etcd - when: install_from != "container" and install_as_systemd == true + when: install_from != "container" and install_as_systemd == true and install_etcd_as_systemd == true notify: - Stop Controller service - Disable Controller service @@ -79,7 +79,7 @@ state: absent force: yes ignore_errors: yes - when: install_as_systemd == false and ( database_purge is undefined or database_purge == true ) + when: install_etcd_as_systemd == false and ( database_purge is undefined or database_purge == true ) tags: hotpot - name: clean etcd db @@ -88,7 +88,7 @@ state: absent force: yes ignore_errors: yes - when: install_as_systemd == false and ( database_purge is undefined or database_purge == true ) + when: install_etcd_as_systemd == false and ( database_purge is undefined or database_purge == true ) tags: hotpot - name: stop all gelato services diff --git a/ansible/roles/osdsdb/scenarios/etcd.yml b/ansible/roles/osdsdb/scenarios/etcd.yml index 93588d76c..47082c979 100644 --- a/ansible/roles/osdsdb/scenarios/etcd.yml +++ b/ansible/roles/osdsdb/scenarios/etcd.yml @@ -47,20 +47,20 @@ become: true args: chdir: "{{ etcd_dir }}" - when: install_as_systemd == false and service_etcd_status.rc != 0 + when: install_etcd_as_systemd == false and service_etcd_status.rc != 0 # Enable etcd service as systemd process - name: check for etcd service source file existed stat: path: "{{ etcd_dir }}/soda-etcd.service" register: etcd_service_source_exists - when: install_as_systemd == true + when: install_etcd_as_systemd == true - name: Check if etcd service source file exists debug: var: etcd_service_source_exists verbosity: 2 - when: install_as_systemd == true + when: install_etcd_as_systemd == true - name: Create the etcd service file copy: @@ -84,20 +84,20 @@ [Install] WantedBy=multi-user.target when: - - install_as_systemd == true and ( service_etcd_status.rc != 0 and etcd_service_source_exists.stat.exists is undefined or etcd_service_source_exists.stat.exists == false ) + - install_etcd_as_systemd == true and ( service_etcd_status.rc != 0 and etcd_service_source_exists.stat.exists is undefined or etcd_service_source_exists.stat.exists == false ) become: true - name: check for etcd service file existed stat: path: "/etc/systemd/system/soda-etcd.service" register: etcd_service_exists - when: install_as_systemd == true + when: install_etcd_as_systemd == true - name: Check if etcd service file exists at systemd debug: var: etcd_service_exists verbosity: 2 - when: install_as_systemd == true + when: install_etcd_as_systemd == true - name: Copy etcd service file to systemd copy: @@ -109,7 +109,7 @@ - Reload daemon - Start etcd service when: - - install_as_systemd == true and ( service_etcd_status.rc != 0 and etcd_service_source_exists.stat.exists is undefined or etcd_service_source_exists.stat.exists == false ) + - install_etcd_as_systemd == true and ( service_etcd_status.rc != 0 and etcd_service_source_exists.stat.exists is undefined or etcd_service_source_exists.stat.exists == false ) become: true - name: sleep for 5 seconds and wait for etcd to come up From ef7d66dcbc825df9de329019a5f72e095278ff70 Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 21:45:14 +0530 Subject: [PATCH 07/14] Updated the rabbitMQ installation for latest version of ansible. --- ansible/roles/delfin-installer/scenarios/rabbitmq.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ansible/roles/delfin-installer/scenarios/rabbitmq.yml b/ansible/roles/delfin-installer/scenarios/rabbitmq.yml index 04afe6415..18c7fbb3c 100644 --- a/ansible/roles/delfin-installer/scenarios/rabbitmq.yml +++ b/ansible/roles/delfin-installer/scenarios/rabbitmq.yml @@ -82,14 +82,12 @@ - name: Install RabbitMQ package apt: - name: "{{ item }}" + name: ['apt-transport-https', 'rabbitmq-server'] update_cache: yes install_recommends: yes allow_unauthenticated: yes state: present - with_items: - - apt-transport-https - - rabbitmq-server + dpkg_options: 'fix-missing' become: yes when: - rabbitmqservice.stat.exists is undefined or rabbitmqservice.stat.exists == false From eeca559e6c4846a8abbf967bc0babd0ac59c93df Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Tue, 4 Jan 2022 22:04:34 +0530 Subject: [PATCH 08/14] Updated the rabbitMQ installation for latest version of ansible. --- ansible/roles/delfin-installer/scenarios/rabbitmq.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/roles/delfin-installer/scenarios/rabbitmq.yml b/ansible/roles/delfin-installer/scenarios/rabbitmq.yml index 18c7fbb3c..9bdd7a1a4 100644 --- a/ansible/roles/delfin-installer/scenarios/rabbitmq.yml +++ b/ansible/roles/delfin-installer/scenarios/rabbitmq.yml @@ -82,12 +82,11 @@ - name: Install RabbitMQ package apt: - name: ['apt-transport-https', 'rabbitmq-server'] + name: ['erlang-base', 'erlang-asn1', 'erlang-crypto', 'erlang-eldap', 'erlang-ftp', 'erlang-inets', 'erlang-mnesia', 'erlang-os-mon', 'erlang-parsetools', 'erlang-public-key', 'erlang-runtime-tools', 'erlang-snmp', 'erlang-ssl', 'erlang-syntax-tools', 'erlang-tftp', 'erlang-tools', 'erlang-xmerl', 'apt-transport-https', 'rabbitmq-server'] update_cache: yes install_recommends: yes allow_unauthenticated: yes state: present - dpkg_options: 'fix-missing' become: yes when: - rabbitmqservice.stat.exists is undefined or rabbitmqservice.stat.exists == false From 4120d5085b7befed90ff22fa55c2e3c8ed8cda2b Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Wed, 5 Jan 2022 08:35:19 +0530 Subject: [PATCH 09/14] Updated the CI to remove latest ansible version. --- .github/workflows/ci_pull_request.yml | 6 ++++++ .github/workflows/ci_push.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci_pull_request.yml b/.github/workflows/ci_pull_request.yml index d4fb18963..021945f52 100644 --- a/.github/workflows/ci_pull_request.yml +++ b/.github/workflows/ci_pull_request.yml @@ -42,6 +42,12 @@ jobs: echo "Installed Ansible Version in Runtime: " ansible --version + - name: Remove latest ansible on Ubuntu 20.04 + run: | + echo "uninstall with pipx" + pipx uninstall ansible-core + if: ${{ matrix.os == 'ubuntu-20.04' }} + # Change the permissions of the ansible installer - name: 'Make ansible installer executable and run install ansible on OS: ${{ matrix.os }}' run: | diff --git a/.github/workflows/ci_push.yml b/.github/workflows/ci_push.yml index 8553deb02..c662fde8f 100644 --- a/.github/workflows/ci_push.yml +++ b/.github/workflows/ci_push.yml @@ -40,6 +40,12 @@ jobs: run: | echo "Installed Ansible Version in Runtime: " ansible --version + + - name: Remove latest ansible on Ubuntu 20.04 + run: | + echo "uninstall with pipx" + pipx uninstall ansible-core + if: ${{ matrix.os == 'ubuntu-20.04' }} # Change the permissions of the ansible installer - name: 'Make ansible installer executable and run install ansible on OS: ${{ matrix.os }}' From 28585575f5d7133d9f7975cfaeda104f5faa765f Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Wed, 5 Jan 2022 10:43:28 +0530 Subject: [PATCH 10/14] Updated the install_as_systemd value to false. --- ansible/group_vars/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/group_vars/common.yml b/ansible/group_vars/common.yml index f3269f3e4..4ee3889dc 100644 --- a/ansible/group_vars/common.yml +++ b/ansible/group_vars/common.yml @@ -52,7 +52,7 @@ ansible_os_family: Debian # Install as systemd process or standalone application: true / false # true: Will install api, dock, controller and etcd processes as a systemd services and enable them. Recommended for production use # false: Will install api, dock, controller and etcd as standalone processes. Recommended for development use. -install_as_systemd: true +install_as_systemd: false # Install etcd as systemd process or standalone application: true / false # true: Will install etcd as a systemd service and enable it. Recommended for production use From 4b1b3d592af136631510f5f81efec7b8297711e4 Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Wed, 5 Jan 2022 16:04:51 +0530 Subject: [PATCH 11/14] Removed CI for install from repository --- .github/workflows/ci_pull_request.yml | 11 +---------- .github/workflows/ci_push.yml | 9 --------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/ci_pull_request.yml b/.github/workflows/ci_pull_request.yml index 021945f52..f98b3a1a9 100644 --- a/.github/workflows/ci_pull_request.yml +++ b/.github/workflows/ci_pull_request.yml @@ -67,16 +67,7 @@ jobs: GOPATH: "/home/runner/work/installer/" if: ${{ always() }} - - name: 'Make the CI check executable and initiate the testing with SODA repository' - run: | - sudo chmod +x ./ci/ci_check.sh - ./ci/ci_check.sh repository - shell: bash - env: - GOPATH: "/home/runner/work/installer/" - if: ${{ always() }} - - - name: 'Make the CI check executable and initiate the testing with SODA release' + - name: 'Make the CI check executable and initiate the testing with SODA release' run: | sudo chmod +x ./ci/ci_check.sh ./ci/ci_check.sh release diff --git a/.github/workflows/ci_push.yml b/.github/workflows/ci_push.yml index c662fde8f..5a5b288a7 100644 --- a/.github/workflows/ci_push.yml +++ b/.github/workflows/ci_push.yml @@ -66,15 +66,6 @@ jobs: GOPATH: "/home/runner/work/installer/" if: ${{ always() }} - - name: 'Make the CI check executable and initiate the testing with SODA repository' - run: | - sudo chmod +x ./ci/ci_check.sh - ./ci/ci_check.sh repository - shell: bash - env: - GOPATH: "/home/runner/work/installer/" - if: ${{ always() }} - - name: 'Make the CI check executable and initiate the testing with SODA release' run: | sudo chmod +x ./ci/ci_check.sh From be29a21b4e37df91af71b7cceefd3930bdc8b8cd Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Wed, 5 Jan 2022 16:16:56 +0530 Subject: [PATCH 12/14] Removed CI for install from repository --- .github/workflows/ci_pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_pull_request.yml b/.github/workflows/ci_pull_request.yml index f98b3a1a9..441f552db 100644 --- a/.github/workflows/ci_pull_request.yml +++ b/.github/workflows/ci_pull_request.yml @@ -67,7 +67,7 @@ jobs: GOPATH: "/home/runner/work/installer/" if: ${{ always() }} - - name: 'Make the CI check executable and initiate the testing with SODA release' + - name: 'Make the CI check executable and initiate the testing with SODA release' run: | sudo chmod +x ./ci/ci_check.sh ./ci/ci_check.sh release From 9e22832b414e6c0bd8f8129c694fc0fcf72b5624 Mon Sep 17 00:00:00 2001 From: Anvith KS Date: Wed, 5 Jan 2022 16:18:16 +0530 Subject: [PATCH 13/14] Changed target branch to ubuntu2004-experimental --- .github/workflows/ci_pull_request.yml | 2 +- .github/workflows/ci_push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_pull_request.yml b/.github/workflows/ci_pull_request.yml index 441f552db..7e3f20bd3 100644 --- a/.github/workflows/ci_pull_request.yml +++ b/.github/workflows/ci_pull_request.yml @@ -9,7 +9,7 @@ on: pull_request: branches: - main - - feat/ubuntu2004 + - ubuntu2004-experimental workflow_dispatch: jobs: diff --git a/.github/workflows/ci_push.yml b/.github/workflows/ci_push.yml index 5a5b288a7..c8d36c609 100644 --- a/.github/workflows/ci_push.yml +++ b/.github/workflows/ci_push.yml @@ -9,7 +9,7 @@ on: push: branches: - main - - feat/ubuntu2004 + - ubuntu2004-experimental workflow_dispatch: jobs: # This workflow contains a single job called "build" From 1f04db690f2d193274ecef05fa2f9db94d4a626c Mon Sep 17 00:00:00 2001 From: Joseph Vazhappilly Date: Wed, 5 Jan 2022 16:46:19 +0530 Subject: [PATCH 14/14] Update SODA Projects tags for L v1.6.0 release --- ansible/group_vars/common.yml | 8 ++++---- charts/opensds/values.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/group_vars/common.yml b/ansible/group_vars/common.yml index 37e3f8f07..1e4013090 100644 --- a/ansible/group_vars/common.yml +++ b/ansible/group_vars/common.yml @@ -43,7 +43,7 @@ install_gelato_ha_from: release # These fields below will specify the tag based on install_from type repo_branch: master -release_version: v1.5.2 +release_version: v1.6.0 # This field indicates which os family the system will be running, currently # support 'Debian' and 'RedHat' @@ -69,11 +69,11 @@ opensds_conf_file: /etc/opensds/opensds.conf api_release_version: v1.1.0 controller_release_version: v1.1.0 dock_release_version: v1.3.0 -dashboard_release_version: v1.5.1 -gelato_release_version: v1.5.1 +dashboard_release_version: v1.6.0 +gelato_release_version: v1.6.0 sushi_release_version: v1.4.0 orchestration_release_version: v0.13.0 -delfin_release_version: v1.4.1 +delfin_release_version: v1.5.0 ################# # URLs, Environment Variables, IP addresses and Ports list diff --git a/charts/opensds/values.yaml b/charts/opensds/values.yaml index 08b3a0ccb..5b9f14a2c 100644 --- a/charts/opensds/values.yaml +++ b/charts/opensds/values.yaml @@ -101,7 +101,7 @@ osdsdashboard: name: dashboard replicaCount: 1 - image: sodafoundation/dashboard:v1.5.1 + image: sodafoundation/dashboard:v1.6.0 # ImagePullPolicy: valid values are "IfNotPresent", "Never", and "Always" imagePullPolicy: IfNotPresent