This example will deploy Lychee photo-management tool using CephFS as the storage backend through Ceph CSI.
The first thing we need to configure is the CSI CephFS plugin. You will find an example configuration file that can be modified for your environment in kubernetes/common/ceph-csi-configmap.yaml
Additionally we need to configure a Kubernetes StorageClass. For this to work in your environment you will need to modify the following files:
- kubernetes/common/ceph-conf.yaml with your
ceph.conf
- kubernetes/common/ceph-cephfs-secrets.yaml with the relevant Keyrings
- kubernetes/common/ceph-cephfs-sc.yaml with the Ceph pool to use
All the files mentioned above are templates that are getting the variables from
ansible/inventory/group_vars/all.yaml. You can modify all the common_*
and
lychee_*
variables to match your environment:
common_ceph_*
: Details from your Ceph cluster to configure Ceph CSI usingcephfs
. These include: List of your monitor IP addresses, ceph.conf file contents, cluster ID, users (and keys) to use, and the Pool to use.lychee_domain_name
: A domain pointing to the public IP of your Kubernetes cluster.- 'letsencrypt_email': The email used to register your SSL certs with Let's Encrypt.
The Ingress to this service is configured with SSL certificates automatically
generated by Let's Encrypt. For this to work, we will need to install
cert-manager
first into the Kubernetes cluster.
The rest of the files the kubernetes/lychee
folder will deploy MariaDB
and the Lychee service itself, with the necessary Persistent Volume Claims.
To simplify the deployment of the service and dependencies, you can run the
following Ansible playbook from the ansible/
folder:
ansible-playbook -i inventory/hosts deploy_lychee_kubernetes.yaml