Command-Line Interface

The command-line interface (CLI) for Jobson, jobson, contains commands aimed at day-to-day development and administration of Jobson. The CLI is available once jobson has been installed.

Running the CLI via a Docker Container

The jobson CLI can be used from outside a container by first entering the workspace (cd /home/jobson) then executing the commands. For example, adding a basic auth user via a container:

docker start jobson-container
docker exec -ti jobson-container sh -c "cd /home/jobson && jobson users add config.yml -p PASSWORD USERNAME"

Viewing Help with --help

Pass the --help argument to jobson to view the help documentation for a particular command.

$ jobson --help
usage: java -jar jobson-0.0.11.jar
       [-h] [-v] {server,check,new,generate,users,validate,run} ...

positional arguments:
                         available commands

optional arguments:
  -h, --help             show this help message and exit
  -v, --version          show the application version and exit

The --help argument also works with the other subcommands:

$ jobson new --help
usage: java -jar jobson-0.0.11.jar
       new [--demo] [-h]

generate a new jobson deployment in the current working directory

optional arguments:
  --demo                 Generate application with a demo spec (default: false)
  -h, --help             show this help message and exit

Adding a new User (basic auth)

If Jobson is configured to use basic authentication in the server config :

# config.yml
  type: basic

The users subcommand can be used to add new users to the system:

$ jobson users add config.yml -p PASSWORD USERNAME

This command appends an entry to the file pointed at by the users.file setting in the server config (config.yml). The entry is hashed in a similar way to how Linux passwords are hashed, preventing the password from being read:

$ cat users