Ian Fijolek d19dca6a47
All checks were successful
continuous-integration/drone/push Build is passing
Update readme
2025-03-06 10:13:12 -08:00
2024-01-04 08:39:59 -08:00
2024-01-04 04:39:47 +00:00
2024-01-03 21:23:12 -08:00
2024-01-04 04:39:47 +00:00
2024-01-06 15:30:41 -08:00
2024-01-06 15:30:41 -08:00
2024-01-03 21:29:26 -08:00
2024-01-03 21:23:12 -08:00
2024-01-04 04:39:47 +00:00
2025-03-06 10:13:12 -08:00
2024-01-06 15:30:41 -08:00
2025-03-06 10:13:12 -08:00

Nomad Var DirSync

Nomad Var DirSync is a command-line tool designed to synchronize directories with Nomad variables. It allows you to write the contents of a directory to Nomad variables and read Nomad variables back into a directory.

Installation

To install Nomad Var DirSync, you need to have Go installed on your machine. You can download and install Go from the official website.

Once you have Go installed, you can install Nomad Var DirSync by running the following command:

go install git.iamthefij.com/iamthefij/nomad-var-dirsync@latest

Usage

Nomad Var DirSync provides two main actions: write and read.

Write Directory to Nomad Variables

To write the contents of a directory to Nomad variables, use the write action:

nomad-var-dirsync -root-var=<root-variable-path> write <source-directory>
  • -root-var: The root path for the Nomad variable.
  • <destination-directory>: The path to the directory you want to write to Nomad variables.

Read Nomad Variables to Directory

To read Nomad variables back into a directory, use the read action:

nomad-var-dirsync -root-var=<root-variable-path> -dir-perms=<permissions> read <target-directory>
  • -root-var: The root path for the Nomad variable.
  • -dir-perms: (Optional) Default permissions for new directories (default: 0o777).
  • <target-directory>: The path to the directory where you want to read the Nomad variables.

Environment Variables

  • NOMAD_ADDR: The address of the Nomad server (default: http://localhost:4646).
  • NOMAD_TOKEN: The secret ID token for authenticating with the Nomad API.

This should also support the same environment variables as the official Nomad CLI.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Description
Sync a directory with Nomad Variables
Readme MIT 53 KiB
v0.0.2 Latest
2024-01-04 17:11:02 +00:00
Languages
Go 51.9%
Makefile 34.8%
Dockerfile 13.3%