|
|
@ -19,31 +19,23 @@ mkdir -p /ceph/mgr/etc/ceph/
|
|
|
|
cp -a /ceph/mon/etc/ceph/ceph.client.admin.keyring /ceph/mgr/etc/ceph/
|
|
|
|
cp -a /ceph/mon/etc/ceph/ceph.client.admin.keyring /ceph/mgr/etc/ceph/
|
|
|
|
docker run --rm --net=ceph --hostname $(hostname) -v /ceph/mgr/etc/ceph:/etc/ceph -v /ceph/mgr/var/lib/ceph:/var/lib/ceph --name ceph_mgr docker.io/ceph/daemon:latest-nautilus mgr
|
|
|
|
docker run --rm --net=ceph --hostname $(hostname) -v /ceph/mgr/etc/ceph:/etc/ceph -v /ceph/mgr/var/lib/ceph:/var/lib/ceph --name ceph_mgr docker.io/ceph/daemon:latest-nautilus mgr
|
|
|
|
rm /ceph/mgr/etc/ceph/ceph.client.admin.keyring
|
|
|
|
rm /ceph/mgr/etc/ceph/ceph.client.admin.keyring
|
|
|
|
docker run -d --rm --net=ceph --hostname $(hostname) -v /ceph/mgr/etc/ceph:/etc/ceph -v /ceph/mgr/var/lib/ceph:/var/lib/ceph --name ceph_mgr docker.io/ceph/daemon:latest-nautilus mgr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#osd
|
|
|
|
#osd
|
|
|
|
mkdir -p /ceph/osd_sdb/etc/ceph/ /ceph/osd_sdb/var/lib/ceph/bootstrap-osd /ceph/osd_sdb/var/lib/ceph/osd
|
|
|
|
device='nvme0n1'
|
|
|
|
(docker exec ceph_mon ceph auth get client.bootstrap-osd) > /ceph/osd_sdb/var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
mkdir -p /ceph/osd_$device/etc/ceph/ /ceph/osd_$device/var/lib/ceph/bootstrap-osd /ceph/osd_$device/var/lib/ceph/osd
|
|
|
|
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/osd_sdb/etc/ceph/ceph.conf
|
|
|
|
(docker exec ceph_mon ceph auth get client.bootstrap-osd) > /ceph/osd_$device/var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
docker run --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd_sdb/etc/ceph:/etc/ceph -v /ceph/osd_sdb/var/lib/ceph:/var/lib/ceph -v /dev:/dev --entrypoint ceph-volume docker.io/ceph/daemon:latest-nautilus lvm prepare --bluestore --dmcrypt --data /dev/sdb
|
|
|
|
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/osd_$device/etc/ceph/ceph.conf
|
|
|
|
rm /ceph/osd_sdb/var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
docker run --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd_$device/etc/ceph:/etc/ceph -v /ceph/osd_$device/var/lib/ceph:/var/lib/ceph -v /dev:/dev --entrypoint ceph-volume docker.io/ceph/daemon:latest-nautilus lvm prepare --bluestore --dmcrypt --data /dev/$device
|
|
|
|
|
|
|
|
rm /ceph/osd_$device/var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p /ceph/osd_sdc/etc/ceph/ /ceph/osd_sdc/var/lib/ceph/bootstrap-osd /ceph/osd_sdc/var/lib/ceph/osd
|
|
|
|
mv /ceph/osd_$device /ceph/osd_<id>
|
|
|
|
(docker exec ceph_mon ceph auth get client.bootstrap-osd) > /ceph/osd_sdc/var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
|
|
|
|
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/osd_sdc/etc/ceph/ceph.conf
|
|
|
|
|
|
|
|
docker run --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd_sdc/etc/ceph:/etc/ceph -v /ceph/osd_sdc/var/lib/ceph:/var/lib/ceph -v /dev:/dev --entrypoint ceph-volume docker.io/ceph/daemon:latest-nautilus lvm prepare --bluestore --dmcrypt --data /dev/sdc
|
|
|
|
|
|
|
|
rm /ceph/osd_sdc/var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker run -d --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd04/etc/ceph:/etc/ceph -v /ceph/osd04/var/lib/ceph:/var/lib/ceph -v /dev:/dev -e OSD_ID=4 --name ceph_osd04 docker.io/ceph/daemon:latest-nautilus osd_ceph_volume_activate
|
|
|
|
|
|
|
|
docker run -d --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd05/etc/ceph:/etc/ceph -v /ceph/osd05/var/lib/ceph:/var/lib/ceph -v /dev:/dev -e OSD_ID=5 --name ceph_osd05 docker.io/ceph/daemon:latest-nautilus osd_ceph_volume_activate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#mds
|
|
|
|
#mds
|
|
|
|
mkdir -p /ceph/mds/etc/ceph/ /ceph/mds/var/lib/ceph/bootstrap-mds
|
|
|
|
mkdir -p /ceph/mds/etc/ceph/ /ceph/mds/var/lib/ceph/bootstrap-mds
|
|
|
|
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/mds/etc/ceph/ceph.conf
|
|
|
|
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/mds/etc/ceph/ceph.conf
|
|
|
|
cp -a /ceph/mon/etc/ceph/ceph.client.admin.keyring /ceph/mds/etc/ceph/
|
|
|
|
cp -a /ceph/mon/etc/ceph/ceph.client.admin.keyring /ceph/mds/etc/ceph/
|
|
|
|
docker run -d --rm --net=ceph --hostname $(hostname) -v /ceph/mds/etc/ceph:/etc/ceph -v /ceph/mds/var/lib/ceph:/var/lib/ceph -e CEPHFS_CREATE=1 --name ceph_mds docker.io/ceph/daemon:latest-nautilus mds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#client
|
|
|
|
#client
|
|
|
@ -51,7 +43,6 @@ mkdir -p /ceph/client/etc/ceph
|
|
|
|
docker exec ceph_mon ceph config generate-minimal-conf > /ceph/client/etc/ceph/ceph.conf
|
|
|
|
docker exec ceph_mon ceph config generate-minimal-conf > /ceph/client/etc/ceph/ceph.conf
|
|
|
|
(docker exec ceph_mon ceph fs authorize cephfs client.$(hostname) / rw) > /ceph/client/etc/ceph/keyring
|
|
|
|
(docker exec ceph_mon ceph fs authorize cephfs client.$(hostname) / rw) > /ceph/client/etc/ceph/keyring
|
|
|
|
chmod 600 /ceph/client/etc/ceph/keyring
|
|
|
|
chmod 600 /ceph/client/etc/ceph/keyring
|
|
|
|
docker run -d --rm --net=ceph -v /cephfs:/cephfs:shared -v /ceph/client/etc/ceph:/etc/ceph --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --name ceph_client --entrypoint ceph-fuse docker.io/ceph/daemon:latest-nautilus /cephfs -f --id $(hostname)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#status
|
|
|
|
#status
|
|
|
|