add client scripts

master
lub 5 years ago
parent 0d4090fc0a
commit db98049763

@ -40,6 +40,15 @@ mkdir -p /ceph/mds/etc/ceph/ /ceph/mds/var/lib/ceph/bootstrap-mds
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 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
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 fs authorize cephfs client.$(hostname) / rw) > /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)
#set cephfs autoscaling #set cephfs autoscaling
docker exec ceph_mon ceph mgr module enable pg_autoscaler docker exec ceph_mon ceph mgr module enable pg_autoscaler
docker exec ceph_mon ceph fs set cephfs max_mds 2 docker exec ceph_mon ceph fs set cephfs max_mds 2

@ -46,5 +46,13 @@ 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 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
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 fs authorize cephfs client.$(hostname) / rw) > /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
docker exec ceph_mon ceph status docker exec ceph_mon ceph status