From 30e4f7960ed740c8423d5fdcca969f2fafd37d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Wed, 5 Jun 2024 09:14:19 -0400 Subject: [PATCH 1/2] Allow user to specify ceph version or release name --- README.md | 6 +++++- site/profile/manifests/ceph.pp | 13 +++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c11f2dfe1..10f1f6af2 100644 --- a/README.md +++ b/README.md @@ -290,7 +290,7 @@ that provides object storage, block storage, and file storage built on a common cluster foundation. [reference](https://en.wikipedia.org/wiki/Ceph_(software)) -This class install Ceph packages, and configure and mount a CephFS share. +This class installs the Ceph packages, and configure and mount a CephFS share. ### parameters @@ -334,6 +334,10 @@ profile::ceph::client::binds_fcontext_equivalence: '/home' ``` +## profile::ceph::client::install + +This class only installs the Ceph packages. + ## `profile::consul` > [Consul](https://www.consul.io/) is a service networking platform developed by HashiCorp. diff --git a/site/profile/manifests/ceph.pp b/site/profile/manifests/ceph.pp index 68016604b..8522c009a 100644 --- a/site/profile/manifests/ceph.pp +++ b/site/profile/manifests/ceph.pp @@ -34,13 +34,22 @@ ensure_resources(profile::ceph::client::share, $shares, { 'mon_host' => $mon_host, 'bind_mounts' => [] }) } -class profile::ceph::client::install { +class profile::ceph::client::install ( + String $release = 'reef', + Optional[String] $version = undef, +) { include epel + if $version != undef and $version != '' { + $repo = "rpm-${version}" + } else { + $repo = "rpm-${release}" + } + yumrepo { 'ceph-stable': ensure => present, enabled => true, - baseurl => "https://download.ceph.com/rpm-nautilus/el${$::facts['os']['release']['major']}/${::facts['architecture']}/", + baseurl => "https://download.ceph.com/${repo}/el${$::facts['os']['release']['major']}/${::facts['architecture']}/", gpgcheck => 1, gpgkey => 'https://download.ceph.com/keys/release.asc', repo_gpgcheck => 0, From 4ac2b4eea384ee6439c2cbcdad55f0948ee956ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Wed, 5 Jun 2024 09:21:42 -0400 Subject: [PATCH 2/2] Start updating cephfs documentation --- README.md | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 10f1f6af2..4e596ea1b 100644 --- a/README.md +++ b/README.md @@ -290,47 +290,28 @@ that provides object storage, block storage, and file storage built on a common cluster foundation. [reference](https://en.wikipedia.org/wiki/Ceph_(software)) -This class installs the Ceph packages, and configure and mount a CephFS share. +This class installs the Ceph packages, and configure and mount CephFS shares. ### parameters -| Variable | Description | Type | -| :--------------------------- | :---------------------------------------------------------- | ------------- | -| `share_name` | CEPH share name | String | -| `access_key` | CEPH share access key | String | -| `export_path` | Path of the share as exported by the monitors | String | -| `mon_host` | List of CEPH monitor hostnames | Array[String] | -| `mount_binds` | List of CEPH share folders that will bind mounted under `/` | Array[String] | -| `mount_name` | Name to give to the CEPH share once mounted under `/mnt` | String | -| `binds_fcontext_equivalence` | SELinux file context equivalence for the CEPH share | String | - -
-default values - -```yaml -profile::ceph::client::mount_binds: [] -profile::ceph::client::mount_name: 'cephfs01' -profile::ceph::client::binds_fcontext_equivalence: '/home' -``` -
+| Variable | Description | Type | +| :------------ | :---------------------------------------------------------- | -------------------- | +| `mon_host` | List of Ceph monitor hostnames | Array[String] | +| `shares` | List of Ceph share structures | Hash[String, CephFS] |
example ```yaml -profile::ceph::client::share_name: "your-project-shared-fs" -profile::ceph::client::access_key: "MTIzNDU2Nzg5cHJvZmlsZTo6Y2VwaDo6Y2xpZW50OjphY2Nlc3Nfa2V5" -profile::ceph::client::export_path: "/volumes/_nogroup/" profile::ceph::client::mon_host: - 192.168.1.3:6789 - 192.168.2.3:6789 - 192.168.3.3:6789 -profile::ceph::client::mount_binds: - - home - - project - - software -profile::ceph::client::mount_name: 'cephfs' -profile::ceph::client::binds_fcontext_equivalence: '/home' +profile::ceph::client::shares: + home: + + project: + ```