Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1.85 KB

README.md

File metadata and controls

30 lines (26 loc) · 1.85 KB

Ferris-Bot on Nomad

For running Ferris-Bot on Nomad, you will need a Nomad cluster running. For this example, we will be running our own cluster locally.

Preparation: Local Nomad Cluster

If you have a nomad cluster already, skip this step.

  • Install Nomad by following the provided directions or by using your distrobutions's package manager, along with the podman task driver
  • Start Nomad by running nomad agent -dev -bind 0.0.0.0 -log-level INFO -config [conf_file] -plugin-dir [plugin_dir]
    • [conf_file] can refer to the sample config file we provide, nomad/nomad-server.conf
    • [plugin_dir] refers to the directory the plugins are installed. For example: nomad agent -dev -bind 0.0.0.0 -log-level INFO -config nomad/nomad-server.conf -plugin-dir /usr/lib/nomad/plugins/
  • As nomad logs stream out, check to make sure the podman plugin is picked up. You should see something like this:
...
    2022-10-03T18:45:52.466-0400 [INFO]  agent: detected plugin: name=raw_exec type=driver plugin_version=0.1.0
    2022-10-03T18:45:52.466-0400 [INFO]  agent: detected plugin: name=exec type=driver plugin_version=0.1.0
    2022-10-03T18:45:52.466-0400 [INFO]  agent: detected plugin: name=podman type=driver plugin_version=0.4.0
...
  • Once Nomad starts up, check the Nomad dashboard by visiting localhost:4646

Running on Nomad

Depending on your deployment, you may want to adjust the ferris-bot.nomad file. Specifically, the discord_token should be filled with a value or have a value pulled in from vault (which is preferred).

DISCORD_TOKEN="{{ key "bot-key-name" }}"

With everything set up, deploy the job. This may take some time, but eventually the bot should go online if the token is OK.

  • nomad job run nomad/ferris-bot.nomad