From: Zac Dover Date: Tue, 17 Aug 2021 05:07:26 +0000 (+1000) Subject: doc: rewrite configure ceph-csi to "conf. nomad" X-Git-Tag: v17.1.0~1026^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=795877cd49cd8a5952eac0e9408b4687b1c8cef0;p=ceph-ci.git doc: rewrite configure ceph-csi to "conf. nomad" This PR rewrites the sections - Configure Ceph-CSI - Configure Nomad in the rbd-nomad.rst Chapter of the RBD Guide. Signed-off-by: Zac Dover --- diff --git a/doc/rbd/rbd-nomad.rst b/doc/rbd/rbd-nomad.rst index 427b2c6fa11..9132e95e338 100644 --- a/doc/rbd/rbd-nomad.rst +++ b/doc/rbd/rbd-nomad.rst @@ -73,39 +73,58 @@ Configure ceph-csi Setup Ceph Client Authentication -------------------------------- -Create a new user for nomad and `ceph-csi`. Execute the following and -record the generated key:: +Create a new user for nomad and `ceph-csi`. Execute the following command and +record the generated key: - $ ceph auth get-or-create client.nomad mon 'profile rbd' osd 'profile rbd pool=nomad' mgr 'profile rbd pool=nomad' - [client.nomad] - key = AQAlh9Rgg2vrDxAARy25T7KHabs6iskSHpAEAQ== +.. code-block:: console + $ ceph auth get-or-create client.nomad mon 'profile rbd' osd 'profile rbd pool=nomad' mgr 'profile rbd pool=nomad' + [client.nomad] + key = AQAlh9Rgg2vrDxAARy25T7KHabs6iskSHpAEAQ== -Configure Nomad + +Configure Nomad --------------- -By default Nomad doesn't allow containers to use privileged mode. -Edit the nomad configuration file by adding this configuration block to `/etc/nomad.d/nomad.hcl`:: +Configuring Nomad to Allow Containers to Use Privileged Mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default, Nomad doesn't allow containers to use privileged mode. We must +configure Nomad so that it allows containers to use privileged mode. Edit the +Nomad configuration file by adding the following configuration block to +`/etc/nomad.d/nomad.hcl`:: plugin "docker" { - config { + config { allow_privileged = true - } + } } +Loading the rbd module +~~~~~~~~~~~~~~~~~~~~~~ + +Nomad must have the `rbd` module loaded. Run the following command to confirm that the `rbd` module is loaded: + +.. code-block:: console + + $ lsmod | grep rbd + rbd 94208 2 + libceph 364544 1 rbd + +If the `rbd` module is not loaded, load it: -Nomad must have `rbd` module loaded, check if it's the case.:: +.. prompt:: bash $ - $ lsmod |grep rbd - rbd 94208 2 - libceph 364544 1 rbd + sudo modprobe rbd -If it's not the case, load it.:: +Restarting Nomad +~~~~~~~~~~~~~~~~ - $ sudo modprobe rbd +Restart Nomad: -And restart Nomad. +.. prompt:: bash $ + sudo systemctl restart nomad Create ceph-csi controller and plugin nodes @@ -428,4 +447,4 @@ It will reuse the same RBD image. .. _CRUSH tunables: ../../rados/operations/crush-map/#tunables .. _RBD image features: ../rbd-config-ref/#image-features .. _nomad sateful: https://learn.hashicorp.com/tutorials/nomad/stateful-workloads-csi-volumes?in=nomad/stateful-workloads#create-the-job-file -.. _ceph-csi release: https://github.com/ceph/ceph-csi#ceph-csi-container-images-and-release-compatibility \ No newline at end of file +.. _ceph-csi release: https://github.com/ceph/ceph-csi#ceph-csi-container-images-and-release-compatibility