CEPH: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
| Zeile 68: | Zeile 68: | ||
*ceph-deploy osd activate omar:/dev/sdb1 | *ceph-deploy osd activate omar:/dev/sdb1 | ||
==Kopieren der Admin-keyrings== | ==Kopieren der Admin-keyrings== | ||
| + | *sudo chmod 644 /etc/ceph/ceph.client.admin.keyring | ||
*ceph-deploy admin kekistan bay nelson oma | *ceph-deploy admin kekistan bay nelson oma | ||
Version vom 18. Mai 2017, 15:43 Uhr
Aufbau
Storage-Node
- omar
- nelson
- bay
Admin-Node
- kekistan
Vorbreitung
Installation von ssh und ntp
Auf allen Nodes
- sudo apt -y install ntp ssh
- wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
- echo deb http://download.ceph.com/debian-luminous/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list
- apt-get update
ssh-key auf allen nodes
ssh-keygen
- root@kekistand:~# ssh-keygen
ssh-copy-id
- root@kekistand:~# ssh-copy-id nelson
- root@kekistand:~# ssh-copy-id bay
- root@kekistand:~# ssh-copy-id omar
Hilfskript
- cat /usr/local/sbin/root-all-nodes
#!/bin/bash echo localhost $* LIST="bay omar nelson" for k in $LIST do echo $k ssh k $* done
Anlegen des Users cephadmin und keyhandling
- root-all-nodes useradd -s /bin/bash -m cephadmin
- sudo -u cephadmin ssh-keygen -q
- root-all-nodes mkdir /home/cephadmin/.ssh
- root-all-nodes chown cephadmin.cephadmin /home/cephadmin/.ssh
- root-all-nodes chmod 700 /home/cephadmin/.ssh
- scp /home/cephadmin/.ssh/id_rsa.pub /tmp
- scp /home/cephadmin/.ssh/id_rsa.pub bay:/tmp
- scp /home/cephadmin/.ssh/id_rsa.pub nelson:/tmp
- scp /home/cephadmin/.ssh/id_rsa.pub omar:/tmp
- root-all-nodes cat /tmp/id_rsa.pub > /home/cephadmin/.ssh/authorized_keys"
Install
- apt install ceph-deploy
- su - cephadmin
- mkdir my-first-ceph-cluster
- cd my-first-ceph-cluster
- ceph-deploy new bay nelson omar
- echo "public network 10.0.0.0/8 >> ceph.conf
- echo "osd pool default size = 2" >> ceph.conf
- ceph-deploy install kekistan bay nelson omar
- ceph-deploy mon create-initial
Vorbereiten der Storages
- ceph-deploy osd prepare bay:/dev/vdb
- ceph-deploy osd prepare nelson:/dev/vda
- ceph-deploy osd prepare omar:/dev/sdb
Aktivieren der Storages
- ceph-deploy osd activate bay:/dev/vdb1
- ceph-deploy osd activate nelson:/dev/vda1
- ceph-deploy osd activate omar:/dev/sdb1
Kopieren der Admin-keyrings
- sudo chmod 644 /etc/ceph/ceph.client.admin.keyring
- ceph-deploy admin kekistan bay nelson oma