mirror of https://gitlab.crans.org/nounous/nixos
enable monitor
parent
e2dfe2aa86
commit
4ac21e0d4c
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Ceph
|
||||||
|
|
||||||
|
Ce fichier explique les tests et etapes effectue avec ceph.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
+ Déployer une conf minimal avec ceph et `services.ceph.global` deploye.
|
||||||
|
+ Creer une clé pour le cluster
|
||||||
|
```bash
|
||||||
|
sudo ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
|
||||||
|
```
|
||||||
|
+ Creer un client admin
|
||||||
|
```bash
|
||||||
|
sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
|
||||||
|
```
|
||||||
|
+ Creer un bootstrap osd
|
||||||
|
```bash
|
||||||
|
sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd' --cap mgr 'allow r'
|
||||||
|
```
|
||||||
|
+ On ajoute les cle generer au keyring
|
||||||
|
```bash
|
||||||
|
sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
|
||||||
|
sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||||
|
```
|
||||||
|
(ca copie juste les deux clé précédente dans `/tmp/ceph.mon.keyring`)
|
||||||
|
+ on donne le keyring a l'user ceph
|
||||||
|
```bash
|
||||||
|
sudo chown ceph:ceph /tmp/ceph.mon.keyring
|
||||||
|
```
|
||||||
|
+ Créer une monitor map
|
||||||
|
```bash
|
||||||
|
monmaptool --create --add {hostname} {ip-address} --fsid {uuid} /tmp/monmap
|
||||||
|
```
|
||||||
|
+ Créer un dossier pour le monitor
|
||||||
|
```bash
|
||||||
|
sudo mkdir /var/lib/ceph/mon/{cluster-name}-{hostname}
|
||||||
|
```
|
||||||
|
+ On ajoute la monitor map et le keyring au monitor
|
||||||
|
```bash
|
||||||
|
sudo -u ceph ceph-mon [--cluster {cluster-name}] --mkfs -i {hostname} --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
|
||||||
|
```
|
||||||
|
|
@ -17,12 +17,12 @@
|
||||||
|
|
||||||
# monitor
|
# monitor
|
||||||
mon = {
|
mon = {
|
||||||
enable = false;
|
enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
"mon host" = "172.16.6.3";
|
"mon host" = "172.16.6.3";
|
||||||
"mon initial members" = "cephiroth";
|
"mon initial members" = "cephiroth";
|
||||||
};
|
};
|
||||||
daemons = ["1"];
|
daemons = ["cephiroth"];
|
||||||
};
|
};
|
||||||
|
|
||||||
global = {
|
global = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue