nomad

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

README (1336B)


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