Skip to content

Commit

Permalink
cephadm: install cephadm from repository
Browse files Browse the repository at this point in the history
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
  • Loading branch information
clwluvw authored and guits committed Oct 8, 2021
1 parent 339212a commit 5822936
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
32 changes: 20 additions & 12 deletions infrastructure-playbooks/cephadm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cephadm/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -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
containerized_deployment: true
1 change: 1 addition & 0 deletions tox-cephadm.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5822936

Please sign in to comment.