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

WatchTask for Nomad Task Launcher #3797

Merged
merged 11 commits into from
Sep 7, 2022
Merged

WatchTask for Nomad Task Launcher #3797

merged 11 commits into from
Sep 7, 2022

Conversation

paladin-devops
Copy link
Contributor

@paladin-devops paladin-devops commented Sep 1, 2022

Closes #3714.

The task launcher Nomad plugin will use the Nomad API to stream logs from the Nomad allocation which is running the Waypoint on-demand runner container. These logs will be available in the log output of the static runner. This means that long after the ODR job is purged from Nomad, the ODR's logs are consumable from the static runner, which runs indefinitely, making troubleshooting of remote operations easier since previously, the ODR logs were unavailable (unless the operator quickly got the ODR's logs with nomad logs or in the Nomad UI before it was purged).

task := tg.Tasks[0]

// We'll give the ODR 5 minutes to start up
// TODO: Make this configurable
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hadn't planned on including this in the PR, but will give it a try!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add in future PR!

builtin/nomad/task.go Outdated Show resolved Hide resolved
@krantzinator krantzinator requested review from a team and briancain September 6, 2022 14:09
.changelog/3797.txt Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
Co-authored-by: Brian Cain <[email protected]>
Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

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

Code looks pretty good now! I've got some suggestions for making the logging fit hclog's key=>value param style, otherwise I think the code makes sense! 🎉

builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
builtin/nomad/task.go Outdated Show resolved Hide resolved
Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

@paladin-devops paladin-devops merged commit 346a934 into main Sep 7, 2022
@paladin-devops paladin-devops deleted the f-nomad-watch-task branch September 7, 2022 15:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement WatchTask for Nomad
3 participants