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

     1  # Openstack Cinder CSI-Plugin
     2  
     3  ## Requirements
     4  
     5  The containers that run the Node/Controller applications require a cloud-config file be mounted in the containers and the path specified in the containers `args`.
     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. However, other methods, such as using the [`artifact`](https://www.nomadproject.io/docs/job-specification/artifact) stanza, will work as well for delivering the `cloud.conf` file to the CSI drivers.
     8  
     9  ### Example cloud.conf
    10  
    11  ```ini
    12  [Global]
    13  username = openstack-user
    14  password =  superSecret123
    15  domain-name = default
    16  auth-url = https://service01a-c2.example.com:5001/
    17  tenant-id = 5sd6f4s5df6sd6fs5ds65fd4f65s
    18  region = RegionOne
    19  ```
    20  
    21  ### Docker Privileged Mode
    22  
    23  The Cinder 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.
    24  
    25  ## Container Arguments
    26  
    27  - `--endpoint=unix:///csi/csi.sock`
    28  
    29    - This option must match the `mount_dir` specified in the `csi_plugin` stanza for the task.
    30  
    31  - `--cloud-config=/etc/config/cloud.conf`
    32    
    33    - The location that the cloud.conf file was mounted inside the container
    34    
    35  - `--nodeid=${node.unique.name}`
    36  
    37    - A unique ID for the node the task is running on. Recommend using `${node.unique.name}`
    38  
    39  - `--cluster=${NOMAD_DC}`
    40  
    41    - The cluster the Controller/Node is a part of. Recommend using `${NOMAD_DC}`
    42  
    43  ## Deployment
    44  
    45  ### Plugin
    46  
    47  ```bash
    48  export NOMAD_ADDR=https://nomad.example.com:4646
    49  export NOMAD_TOKEN=34534-3sdf3-szfdsafsdf3423-zxdfsd3
    50  nomad job run cinder-csi-plugin.hcl
    51  ```
    52  
    53  ### Volume Registration
    54  
    55  ```bash
    56  export NOMAD_ADDR=https://nomad.example.com:4646
    57  export NOMAD_TOKEN=34534-3sdf3-szfdsafsdf3423-zxdfsd3
    58  nomad volume register example_volume.hcl
    59  ```
    60  
    61  ## Cinder CSI Driver Source
    62  
    63  - https://github.com/kubernetes/cloud-provider-openstack/tree/master/pkg/csi/cinder