Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to specify CephFS version #380

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 14 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,50 +290,35 @@ 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 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 |

<details>
<summary>default values</summary>

```yaml
profile::ceph::client::mount_binds: []
profile::ceph::client::mount_name: 'cephfs01'
profile::ceph::client::binds_fcontext_equivalence: '/home'
```
</details>
| Variable | Description | Type |
| :------------ | :---------------------------------------------------------- | -------------------- |
| `mon_host` | List of Ceph monitor hostnames | Array[String] |
| `shares` | List of Ceph share structures | Hash[String, CephFS] |

<details>
<summary>example</summary>

```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:

```
</details>

## 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.
Expand Down
13 changes: 11 additions & 2 deletions site/profile/manifests/ceph.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading