update docker registry

master
lub 2 years ago
parent bdd7245cb7
commit cb13227886

@ -5,40 +5,40 @@ docker network create --attachable --driver overlay --opt encrypted --subnet=10.
#mon
ip='10.13.37.2'
docker run -d --rm --net=ceph --hostname $(hostname) -v /ceph/mon/etc/ceph:/etc/ceph -v /ceph/mon/var/lib/ceph:/var/lib/ceph --ip "$ip" -e MON_IP="$ip" -e CEPH_PUBLIC_NETWORK=10.13.37.0/23 -e CEPH_CLUSTER_NETWORK=10.13.37.0/23 --name ceph_mon docker.io/ceph/daemon:latest-octopus mon
docker run -d --rm --net=ceph --hostname $(hostname) -v /ceph/mon/etc/ceph:/etc/ceph -v /ceph/mon/var/lib/ceph:/var/lib/ceph --ip "$ip" -e MON_IP="$ip" -e CEPH_PUBLIC_NETWORK=10.13.37.0/23 -e CEPH_CLUSTER_NETWORK=10.13.37.0/23 --name ceph_mon quay.io/ceph/daemon:latest-octopus mon
#mgr
mkdir -p /ceph/mgr/etc/ceph/
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/mgr/etc/ceph/ceph.conf
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-octopus 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 quay.io/ceph/daemon:latest-octopus mgr
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-octopus mgr
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 quay.io/ceph/daemon:latest-octopus mgr
#osd
mkdir -p /ceph/osd_sdb/etc/ceph/ /ceph/osd_sdb/var/lib/ceph/bootstrap-osd /ceph/osd_sdb/var/lib/ceph/osd
(docker exec ceph_mon ceph auth get client.bootstrap-osd) > /ceph/osd_sdb/var/lib/ceph/bootstrap-osd/ceph.keyring
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/osd_sdb/etc/ceph/ceph.conf
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-octopus lvm prepare --bluestore --dmcrypt --data /dev/sdb
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 quay.io/ceph/daemon:latest-octopus lvm prepare --bluestore --dmcrypt --data /dev/sdb
rm /ceph/osd_sdb/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
(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-octopus lvm prepare --bluestore --dmcrypt --data /dev/sdc
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 quay.io/ceph/daemon:latest-octopus 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/osd00/etc/ceph:/etc/ceph -v /ceph/osd00/var/lib/ceph:/var/lib/ceph -v /dev:/dev -e OSD_ID=0 --name ceph_osd00 docker.io/ceph/daemon:latest-octopus osd_ceph_volume_activate
docker run -d --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd01/etc/ceph:/etc/ceph -v /ceph/osd01/var/lib/ceph:/var/lib/ceph -v /dev:/dev -e OSD_ID=1 --name ceph_osd01 docker.io/ceph/daemon:latest-octopus osd_ceph_volume_activate
docker run -d --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd00/etc/ceph:/etc/ceph -v /ceph/osd00/var/lib/ceph:/var/lib/ceph -v /dev:/dev -e OSD_ID=0 --name ceph_osd00 quay.io/ceph/daemon:latest-octopus osd_ceph_volume_activate
docker run -d --rm --net=ceph --hostname $(hostname) --privileged -v /ceph/osd01/etc/ceph:/etc/ceph -v /ceph/osd01/var/lib/ceph:/var/lib/ceph -v /dev:/dev -e OSD_ID=1 --name ceph_osd01 quay.io/ceph/daemon:latest-octopus osd_ceph_volume_activate
#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
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-octopus 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 quay.io/ceph/daemon:latest-octopus mds
#client
@ -46,7 +46,7 @@ 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) / rws) > /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-octopus /cephfs -f --id $(hostname)
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 quay.io/ceph/daemon:latest-octopus /cephfs -f --id $(hostname)
#set cephfs autoscaling

@ -2,7 +2,7 @@ version: "3.0"
services:
ceph_client:
container_name: ceph_client
image: docker.io/ceph/daemon:latest-octopus
image: quay.io/ceph/daemon:latest-octopus
devices:
- /dev/fuse
volumes:

@ -2,7 +2,7 @@ version: "3.0"
services:
ceph_mds:
container_name: ceph_mds
image: docker.io/ceph/daemon:latest-octopus
image: quay.io/ceph/daemon:latest-octopus
#copy hostname of the host to avoid confusion in e.g. `ceph status`
hostname: ${HOSTNAME}
environment:

@ -2,7 +2,7 @@ version: "3.0"
services:
ceph_mgr:
container_name: ceph_mgr
image: docker.io/ceph/daemon:latest-octopus
image: quay.io/ceph/daemon:latest-octopus
#copy hostname of the host to avoid confusion in e.g. `ceph status`
hostname: ${HOSTNAME}
volumes:

@ -7,7 +7,7 @@ version: "3.0"
services:
ceph_mon:
container_name: ceph_mon
image: docker.io/ceph/daemon:latest-octopus
image: quay.io/ceph/daemon:latest-octopus
#copy hostname of the host to avoid confusion in e.g. `ceph status`
hostname: ${HOSTNAME}
environment:

@ -10,14 +10,14 @@ cat /ceph/mon/etc/ceph/ceph.client.admin.keyring
mkdir -p /ceph/mon/etc/ceph
chmod 600 /ceph/mon/etc/ceph/ceph.mon.keyring /ceph/mon/etc/ceph/ceph.client.admin.keyring
ip='10.13.37.4'
docker run -d --rm --net=ceph --hostname $(hostname) -v /ceph/mon/etc/ceph:/etc/ceph -v /ceph/mon/var/lib/ceph:/var/lib/ceph --ip "$ip" -e MON_IP="$ip" -e CEPH_PUBLIC_NETWORK=10.13.37.0/23 -e CEPH_CLUSTER_NETWORK=10.13.37.0/23 --name ceph_mon docker.io/ceph/daemon:latest-octopus mon
docker run -d --rm --net=ceph --hostname $(hostname) -v /ceph/mon/etc/ceph:/etc/ceph -v /ceph/mon/var/lib/ceph:/var/lib/ceph --ip "$ip" -e MON_IP="$ip" -e CEPH_PUBLIC_NETWORK=10.13.37.0/23 -e CEPH_CLUSTER_NETWORK=10.13.37.0/23 --name ceph_mon quay.io/ceph/daemon:latest-octopus mon
#mgr
mkdir -p /ceph/mgr/etc/ceph/
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/mgr/etc/ceph/ceph.conf
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-octopus 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 quay.io/ceph/daemon:latest-octopus mgr
rm /ceph/mgr/etc/ceph/ceph.client.admin.keyring
@ -28,7 +28,7 @@ mkdir -p /ceph/osd_$device/etc/ceph/ /ceph/osd_$device/var/lib/ceph/bootstrap-os
(docker exec ceph_mon ceph config generate-minimal-conf) > /ceph/osd_$device/etc/ceph/ceph.conf
echo -e '\tbdev_enable_discard = true' >> /ceph/osd_$device/etc/ceph/ceph.conf
echo -e '\tbdev_async_discard = true' >> /ceph/osd_$device/etc/ceph/ceph.conf
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-octopus lvm prepare --bluestore --dmcrypt --data /dev/$device
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 quay.io/ceph/daemon:latest-octopus lvm prepare --bluestore --dmcrypt --data /dev/$device
rm /ceph/osd_$device/var/lib/ceph/bootstrap-osd/ceph.keyring
mv /ceph/osd_$device /ceph/osd_<id>

@ -5,7 +5,7 @@ version: "3.0"
services:
ceph_osd_%OSD_ID%:
container_name: ceph_osd_%OSD_ID%
image: docker.io/ceph/daemon:latest-octopus
image: quay.io/ceph/daemon:latest-octopus
#copy hostname of the host to correctly calculate CRUSH map positions
hostname: ${HOSTNAME}
environment:

@ -1,6 +1,6 @@
#!/bin/bash -e
docker pull docker.io/ceph/daemon:latest-octopus
docker pull quay.io/ceph/daemon:latest-octopus
#start client
cd client