This document is for a development version of Ceph.
Custom Container Service¶
The orchestrator enables custom containers to be deployed using a YAML file. A corresponding Service Specification must look like:
service_type: container service_id: foo placement: ... image: docker.io/library/foo:latest entrypoint: /usr/bin/foo uid: 1000 gid: 1000 args: - "--net=host" - "--cpus=2" ports: - 8080 - 8443 envs: - SECRET=mypassword - PORT=8080 - PUID=1000 - PGID=1000 volume_mounts: CONFIG_DIR: /etc/foo bind_mounts: - ['type=bind', 'source=lib/modules', 'destination=/lib/modules', 'ro=true'] dirs: - CONFIG_DIR files: CONFIG_DIR/foo.conf: - refresh=true - username=xyz - "port: 1234"
where the properties of a service specification are:
A unique name of the service.
The name of the Docker image.
The UID to use when creating directories and files in the host system.
The GID to use when creating directories and files in the host system.
Overwrite the default ENTRYPOINT of the image.
A list of additional Podman/Docker command line arguments.
A list of TCP ports to open in the host firewall.
A list of environment variables.
When you use a bind mount, a file or directory on the host machine is mounted into the container. Relative source=… paths will be located below /var/lib/ceph/<cluster-fsid>/<daemon-name>.
When you use a volume mount, a new directory is created within Docker’s storage directory on the host machine, and Docker manages that directory’s contents. Relative source paths will be located below /var/lib/ceph/<cluster-fsid>/<daemon-name>.
A list of directories that are created below /var/lib/ceph/<cluster-fsid>/<daemon-name>.
A dictionary, where the key is the relative path of the file and the value the file content. The content must be double quoted when using a string. Use ‘\n’ for line breaks in that case. Otherwise define multi-line content as list of strings. The given files will be created below the directory /var/lib/ceph/<cluster-fsid>/<daemon-name>. The absolute path of the directory where the file will be created must exist. Use the dirs property to create them if necessary.