]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
doc: rewrite configure ceph-csi to "conf. nomad"
authorZac Dover <zac.dover@gmail.com>
Tue, 17 Aug 2021 05:07:26 +0000 (15:07 +1000)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 24 Aug 2021 14:55:30 +0000 (16:55 +0200)
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 <zac.dover@gmail.com>
doc/rbd/rbd-nomad.rst

index 427b2c6fa1146b3d434c881516a28aada7f9fa7f..9132e95e338facbe39791590a5fdd72412dd9f49 100644 (file)
@@ -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