A Juju operator for proxying exported Ceph filesystems.
The CephFS server proxy operator enable CephFS client operators to mount exported Ceph filesystems on Ceph clusters not managed by Juju. This proxy operator enables Juju users to manually set a CephFS endpoint that their CephFS client operators need to mount.
First, launch a virtual machine using LXD:
$ snap install lxd
$ lxd init --auto
$ lxc launch ubuntu:22.04 cephfs-server --vm
$ lxc shell cephfs-serverInside the LXD virtual machine, set up Microceph to export a Ceph filesystem.
ln -s /bin/true /usr/local/bin/udevadm
apt-get -y update
apt-get -y install ceph-common jq
snap install microceph
microceph cluster bootstrap
microceph disk add loop,2G,3
microceph.ceph osd pool create cephfs_data
microceph.ceph osd pool create cephfs_metadata
microceph.ceph fs new cephfs cephfs_metadata cephfs_data
microceph.ceph fs authorize cephfs client.fs-client / rw # Creates a new `fs-client` user.You can verify if the CephFS server is working correctly by using the command
microceph.ceph fs status cephfswhile inside the LXD virtual machine.
To mount a Ceph filesystem, you'll require some information that you can get with a couple of commands:
export HOST=$(hostname -I | tr -d '[:space:]'):6789
export FSID=$(microceph.ceph -s -f json | jq -r '.fsid')
export CLIENT_KEY=$(microceph.ceph auth print-key client.fs-client)Print the required information for reference and then exit the current shell session:
echo $HOST
echo $FSID
echo $CLIENT_KEY
exitNow deploy the CephFS server proxy operator with a CephFS client operator and principal charm:
juju add-model ceph
juju deploy cephfs-server-proxy --channel latest/edge \
--config fsid=<FSID> \
--config sharepoint=cephfs:/ \
--config monitor-hosts=<HOST> \
--config auth-info=fs-client:<CLIENT_KEY>
juju deploy ubuntu --base ubuntu@22.04 --constraints virt-type=virtual-machine
juju deploy cephfs-client data --channel latest/edge --config mountpoint=/data
juju integrate data:juju-info ubuntu:juju-info
juju integrate data:cephfs-share cephfs-server-proxy:cephfs-shareThe CephFS server proxy operator is a project of the Ubuntu High-Performance Computing community. It is an open source project that is welcome to community involvement, contributions, suggestions, fixes, and constructive feedback. Interested in being involved with the development of the CephFS server proxy operator? Check out these links below:
The CephFS server proxy operator is free software, distributed under the Apache Software License, version 2.0. See the LICENSE file for more information.