Skip to content

Commit

Permalink
DNM - Test - Bump to Squid
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Pantano <[email protected]>
  • Loading branch information
fmount committed Nov 29, 2024
1 parent b794aa2 commit d8f7377
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 22 deletions.
7 changes: 6 additions & 1 deletion roles/cifmw_cephadm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cifmw_cephadm_config_home_container: "/var/lib/ceph/{{ cifmw_cephadm_fsid }}/con
cifmw_cephadm_verbose: false
cifmw_cephadm_container_ns: "quay.io/ceph"
cifmw_cephadm_container_image: "ceph"
cifmw_cephadm_container_tag: "v18" # this tag always points to latest-reef
cifmw_cephadm_container_tag: "v19" # this tag always points to latest-squid
cifmw_cephadm_container_cli: "podman"
cifmw_cephadm_container_options: "--net=host --ipc=host"
cifmw_cephadm_registry_password: ''
Expand Down Expand Up @@ -140,3 +140,8 @@ cifmw_cephadm_update_log_commands:
cmd: "log last cephadm"
cifmw_cephadm_wait_for_dashboard_retries: 10
cifmw_cephadm_wait_for_dashboard_delay: 20
# Repository parameters
cifmw_cephadm_repository_override: false
# we usually support N+1 Ceph version: Adding Squid here because Reef is the
# default version installed in a greenfield scenario
cifmw_cephadm_version: "squid"
54 changes: 54 additions & 0 deletions roles/cifmw_cephadm/tasks/install_cephadm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# Copyright 2024 Red Hat, Inc.
# All Rights Reserved.
#
# 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: Enabled ceph Tools Repository
when:
- cifmw_cephadm_repository_override | bool
become: true
ansible.builtin.dnf:
name: centos-release-ceph-{{ cifmw_cephadm_version }}
state: present

- name: Install cephadm package
become: true
when:
- cifmw_cephadm_predeployed | bool or
cifmw_cephadm_repository_override | bool
ansible.builtin.dnf:
name: cephadm
state: present

- name: Stat cephadm file
ansible.builtin.stat:
path: "{{ cifmw_cephadm_bin }}"
register: stat_cephadm
become: true
ignore_errors: true # noqa: ignore-errors

- name: Fail if cephadm is not available
when:
- not stat_cephadm.stat.exists
ansible.builtin.fail:
msg: "{{ cifmw_cephadm_bin }} does not exist"

- name: Check cephadm version
become: true
ansible.builtin.command: cephadm version
register: cephadm_version

- name: Print cephadm version
ansible.builtin.debug:
msg: "{{ cephadm_version.stdout }}"
23 changes: 2 additions & 21 deletions roles/cifmw_cephadm/tasks/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,8 @@
tags:
- always

- name: Install cephadm package # noqa: package-latest
become: true
when:
- cifmw_cephadm_predeployed | bool
ansible.builtin.package:
name: cephadm
state: latest
releasever: "{{ ansible_facts['distribution_major_version'] }}"

- name: Stat cephadm file
ansible.builtin.stat:
path: "{{ cifmw_cephadm_bin }}"
register: stat_cephadm
become: true
ignore_errors: true # noqa: ignore-errors

- name: Fail if cephadm is not available
when:
- not stat_cephadm.stat.exists
ansible.builtin.fail:
msg: "{{ cifmw_cephadm_bin }} does not exist"
- name: Install cephadm package
ansible.builtin.include_tasks: install_cephadm.yml

- name: List Ceph daemon instances on this host
ansible.builtin.command:
Expand Down
8 changes: 8 additions & 0 deletions zuul.d/edpm_multinode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@
dashboard_enabled: true
cephfs_enabled: true
ceph_nfs_enabled: true
# Override the Ceph container image and deploy Squid
cifmw_cephadm_container_ns: "quay.io/ceph"
cifmw_cephadm_container_image: "ceph"
cifmw_cephadm_container_tag: "v19.1"
# Override the Ceph Tools repo and install cephadm Squid
cifmw_cephadm_repository_override: true
cifmw_cephadm_version: "squid"

files:
- ^hooks/playbooks/control_plane_ceph_backends.yml
- ^hooks/playbooks/control_plane_hci_pre_deploy.yml
Expand Down

0 comments on commit d8f7377

Please sign in to comment.