From ec1dce21256d4bc4451beb74a8939bdae8667892 Mon Sep 17 00:00:00 2001 From: Seena Fallah Date: Wed, 15 Sep 2021 17:23:04 +0430 Subject: [PATCH] cephadm: install cephadm from repository Signed-off-by: Seena Fallah --- infrastructure-playbooks/cephadm.yml | 32 +++++++++++++++---------- tests/functional/cephadm/group_vars/all | 2 +- tox-cephadm.ini | 1 + 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/infrastructure-playbooks/cephadm.yml b/infrastructure-playbooks/cephadm.yml index 396ee844b..95b7feefc 100644 --- a/infrastructure-playbooks/cephadm.yml +++ b/infrastructure-playbooks/cephadm.yml @@ -102,24 +102,32 @@ tasks_from: registry.yml when: ceph_docker_registry_auth | bool + - name: configure repository for installing cephadm + vars: + ceph_origin: repository + ceph_repository: community + block: + - name: validate repository variables + import_role: + name: ceph-validate + tasks_from: check_repository.yml + + - name: configure repository + import_role: + name: ceph-common + tasks_from: "configure_repository.yml" + - name: install cephadm requirements package: name: ['python3', 'lvm2'] register: result until: result is succeeded - - name: create a cephadm container - command: "{{ container_binary }} create --name cephadm {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" - changed_when: false - - - name: cp the cephadm cli file - command: "{{ container_binary }} cp cephadm:/usr/sbin/cephadm /usr/sbin/cephadm" - args: - creates: /usr/sbin/cephadm - - - name: remove the cephadm container - command: "{{ container_binary }} rm cephadm" - changed_when: false + - name: install cephadm + package: + name: cephadm + register: result + until: result is succeeded - name: set_fact cephadm_cmd set_fact: diff --git a/tests/functional/cephadm/group_vars/all b/tests/functional/cephadm/group_vars/all index 4c6765cf9..befb220e7 100644 --- a/tests/functional/cephadm/group_vars/all +++ b/tests/functional/cephadm/group_vars/all @@ -6,4 +6,4 @@ dashboard_admin_password: $sX!cD$rYU6qR^B! ceph_docker_registry: quay.ceph.io ceph_docker_image: ceph-ci/daemon-base ceph_docker_image_tag: latest-master-devel -containerized_deployment: true \ No newline at end of file +containerized_deployment: true diff --git a/tox-cephadm.ini b/tox-cephadm.ini index cf4ac6635..b4c814e87 100644 --- a/tox-cephadm.ini +++ b/tox-cephadm.ini @@ -35,6 +35,7 @@ commands= ceph_docker_registry_auth=True \ ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ + ceph_repository=dev \ " vagrant destroy -f