]> git.proxmox.com Git - ceph.git/blob - ceph/doc/cephadm/custom-container.rst
bump version to 16.2.6-pve2
[ceph.git] / ceph / doc / cephadm / custom-container.rst
1 ========================
2 Custom Container Service
3 ========================
4
5 The orchestrator enables custom containers to be deployed using a YAML file.
6 A corresponding :ref:`orchestrator-cli-service-spec` must look like:
7
8 .. code-block:: yaml
9
10 service_type: container
11 service_id: foo
12 placement:
13 ...
14 image: docker.io/library/foo:latest
15 entrypoint: /usr/bin/foo
16 uid: 1000
17 gid: 1000
18 args:
19 - "--net=host"
20 - "--cpus=2"
21 ports:
22 - 8080
23 - 8443
24 envs:
25 - SECRET=mypassword
26 - PORT=8080
27 - PUID=1000
28 - PGID=1000
29 volume_mounts:
30 CONFIG_DIR: /etc/foo
31 bind_mounts:
32 - ['type=bind', 'source=lib/modules', 'destination=/lib/modules', 'ro=true']
33 dirs:
34 - CONFIG_DIR
35 files:
36 CONFIG_DIR/foo.conf:
37 - refresh=true
38 - username=xyz
39 - "port: 1234"
40
41 where the properties of a service specification are:
42
43 * ``service_id``
44 A unique name of the service.
45 * ``image``
46 The name of the Docker image.
47 * ``uid``
48 The UID to use when creating directories and files in the host system.
49 * ``gid``
50 The GID to use when creating directories and files in the host system.
51 * ``entrypoint``
52 Overwrite the default ENTRYPOINT of the image.
53 * ``args``
54 A list of additional Podman/Docker command line arguments.
55 * ``ports``
56 A list of TCP ports to open in the host firewall.
57 * ``envs``
58 A list of environment variables.
59 * ``bind_mounts``
60 When you use a bind mount, a file or directory on the host machine
61 is mounted into the container. Relative `source=...` paths will be
62 located below `/var/lib/ceph/<cluster-fsid>/<daemon-name>`.
63 * ``volume_mounts``
64 When you use a volume mount, a new directory is created within
65 Docker’s storage directory on the host machine, and Docker manages
66 that directory’s contents. Relative source paths will be located below
67 `/var/lib/ceph/<cluster-fsid>/<daemon-name>`.
68 * ``dirs``
69 A list of directories that are created below
70 `/var/lib/ceph/<cluster-fsid>/<daemon-name>`.
71 * ``files``
72 A dictionary, where the key is the relative path of the file and the
73 value the file content. The content must be double quoted when using
74 a string. Use '\\n' for line breaks in that case. Otherwise define
75 multi-line content as list of strings. The given files will be created
76 below the directory `/var/lib/ceph/<cluster-fsid>/<daemon-name>`.
77 The absolute path of the directory where the file will be created must
78 exist. Use the `dirs` property to create them if necessary.