Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Nomad runner install CPU and memory flags #4798

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/4798.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
runnerinstall/nomad: Add CLI flags for setting custom CPU and memory resources.
```
12 changes: 12 additions & 0 deletions internal/runnerinstall/nomad.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ func (i *NomadRunnerInstaller) InstallFlags(set *flag.Set) {
Default: defaultRunnerImage,
})

set.StringVar(&flag.StringVar{
Name: "nomad-runner-cpu",
Target: &i.Config.RunnerResourcesCPU,
Usage: "CPU required to run the runner task in MHz.",
})

set.StringVar(&flag.StringVar{
Name: "nomad-runner-memory",
Target: &i.Config.RunnerResourcesMemory,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, did we accidentally delete these install flags or something? Looks like the target var already existed.

Usage: "MB of Memory to allocate to the runner job task.",
})

set.StringVar(&flag.StringVar{
Name: "nomad-host-volume",
Target: &i.Config.HostVolume,
Expand Down
2 changes: 2 additions & 0 deletions website/content/commands/runner-install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ the install, the command would be:

- `-nomad-dc=<string>` - Datacenters to install to for Nomad. The default is dc1.
- `-nomad-runner-image=<string>` - Docker image for the Waypoint runner. The default is hashicorp/waypoint.
- `-nomad-runner-cpu=<string>` - CPU required to run the runner task in MHz.
- `-nomad-runner-memory=<string>` - MB of Memory to allocate to the runner job task.
- `-nomad-host-volume=<string>` - Nomad host volume name.
- `-nomad-csi-volume-plugin-id=<string>` - The ID of the CSI plugin that manages the volume, required for volume type 'csi'.
- `-nomad-csi-volume-provider=<string>` - Nomad CSI volume provider, required for volume type 'csi'.
Expand Down