github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/demo/csi/ceph-csi-plugin/README.md (about)

     1  # Openstack Ceph-CSI Plugin
     2  
     3  The configuration here is for the Ceph RBD driver, migrated from the k8s config [documentation](https://github.com/ceph/ceph-csi/blob/master/docs/deploy-rbd.md). It can be easily modified for the CephFS Driver, as used [here](https://github.com/ceph/ceph-csi/blob/master/docs/deploy-cephfs.md).
     4  
     5  ## Requirements
     6  
     7  The example plugin job creates a file at `local/cloud.conf` using a [`template`](https://www.nomadproject.io/docs/job-specification/template) stanza which pulls the necessary credentials from a [Vault kv-v2](https://www.vaultproject.io/docs/secrets/kv/kv-v2) secrets store. 
     8  
     9  
    10  ### Docker Privileged Mode
    11  
    12  The Ceph CSI Node task requires that [`privileged = true`](https://www.nomadproject.io/docs/drivers/docker#privileged) be set. This is not needed for the Controller task.
    13  
    14  ## Container Arguments
    15   
    16  Refer to the official plugin [guide](https://github.com/ceph/ceph-csi/blob/master/docs/deploy-rbd.md).
    17   
    18  - `--type=rbd`
    19   
    20    - Driver type `rbd` (or alternately `cephfs`)
    21  
    22  - `--endpoint=unix:///csi/csi.sock`
    23  
    24    - This option must match the `mount_dir` specified in the `csi_plugin` stanza for the task.
    25  
    26  - `--nodeid=${node.unique.name}`
    27  
    28    - A unique ID for the node the task is running on. Recommend using `${node.unique.name}`
    29  
    30  - `--cluster=${NOMAD_DC}`
    31  
    32    - The cluster the Controller/Node is a part of. Recommend using `${NOMAD_DC}`
    33  
    34  - `--instanceid=${attr.unique.platform.aws.instance-id}`
    35    
    36    - Unique ID distinguishing this instance of Ceph CSI among other instances, when sharing Ceph clusters across CSI instances for provisioning. Used for topology-aware deployments.
    37  
    38  ## Deployment
    39  
    40  ### Plugin
    41  
    42  ```bash
    43  export NOMAD_ADDR=https://nomad.example.com:4646
    44  export NOMAD_TOKEN=34534-3sdf3-szfdsafsdf3423-zxdfsd3
    45  nomad job run ceph-csi-plugin.hcl
    46  ```
    47  
    48  ### Volume Registration
    49  
    50  The `external_id` value for the volume must be strictly formatted, see `ceph_csi.tf`. Based on [Ceph-CSI ID Format](https://github.com/ceph/ceph-csi/blob/71ddf51544be498eee03734573b765eb04480bb9/internal/util/volid.go#L27), see [examples](https://github.com/ceph/ceph-csi/blob/71ddf51544be498eee03734573b765eb04480bb9/internal/util/volid_test.go#L33).
    51  
    52  The `secrets` block will be populated with values pulled from `/etc/ceph/ceph.client.<user>.keyring`, e.g.
    53  ```
    54  userid = "<user>"
    55  userkey = "AWBg/BtfJInSFBATOrrnCh6UGE3QB3nYakdF+g=="
    56  ```
    57  
    58  ```bash
    59  export NOMAD_ADDR=https://nomad.example.com:4646
    60  export NOMAD_TOKEN=34534-3sdf3-szfdsafsdf3423-zxdfsd3
    61  nomad volume register example_volume.hcl
    62  ```
    63  
    64  ## Ceph CSI Driver Source
    65  
    66  - https://github.com/ceph/ceph-csi