Skip to content

Commit

Permalink
Merge pull request #380 from ComputeCanada/cephfs
Browse files Browse the repository at this point in the history
Allow user to specify CephFS version
  • Loading branch information
cmd-ntrf committed Sep 20, 2024
2 parents 901dc14 + 4ac2b4e commit d3c20f5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 31 deletions.
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

0 comments on commit d3c20f5

Please sign in to comment.