nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests

README (1223B)


      1 NFS CSI DRIVER
      2 --------------
      3 
      4 Run stateful workloads with the NFS CSI driver:
      5 - https://learn.hashicorp.com/tutorials/nomad/stateful-workloads-csi-volumes
      6 - https://github.com/kubernetes-csi/csi-driver-nfs
      7 
      8 ON NOMAD
      9 --------
     10 
     11 Start development agent with client.hcl file:
     12 
     13 $ sudo nomad agent -dev -bind 0.0.0.0 -log-level INFO -config=client.hcl
     14 
     15 Install the plugin on the controllers and nodes:
     16 $ nomad job run plugin-nfs-controller.nomad
     17 $ nomad job run plugin-nfs-nodes.nomad
     18 
     19 Register the volume:
     20 $ nomad volume register nfs-volume.hcl
     21 
     22 Deploy a test job:
     23 $ nomad job run testjob.nomad
     24 
     25 ON THE SERVER
     26 --------------
     27 
     28 Spin up a Docker development NFS server (see "docker-compose.yaml"):
     29 
     30 $ docker-compose up -d
     31 
     32 Create the export:
     33 $ docker exec nfs mkdir /data/csi-test
     34 
     35 If external NFS server (not the docker-compose example here), don't forget to:
     36 - add export in /etc/exports
     37 - exportfs -ar
     38 
     39 Otherwise, you will encounter the following error message:
     40 
     41 > Error message on the server when the server directory for the export does not exist:
     42 >   rpc.mountd[6073]: can't stat exported dir /srv/nfs/csi-test: No such file or directory
     43 
     44 TEST
     45 ----
     46 
     47 $ nomad alloc exec 737b86a3 /bin/sh
     48 / # echo "hello world" > /mnt/test/hi