-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update agents.mdx #29
base: main
Are you sure you want to change the base?
Conversation
Adding use case for agent single execution mode when runs are queued from the UI
@darrell-fashun is attempting to deploy a commit to the HashiCorp Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this PR @darrell-fashun ! For context this is the slack thread that lead to this PR.
Darrell contributed this PR after noticing the docs opportunity as a TF support engineer. It would be great if someone from the main docs team could review this and ship it using the appropriate process.
You can also configure the agent to run in single-execution mode, which ensures that the agent only runs a single workload, then terminates. You can use this configuration in combination with Docker and a process supervisor to ensure a clean working environment for every Terraform run. Agents in single -execution mode perform one operation at a time. Plan and apply are separate operations and would require an agent per operation. | ||
|
||
~>**Important:** When an agent is placed in Single-Execution Mode, if the plan and apply operation is queued from the UI, after the plan has completed its part the agent (placed in single-execution mode) will exit, leaving the apply operation without a agent to process against. The apply operation will then enter in a queued state until an agent process is available. This is the expected behavior as agents in single mode perform one operation at a time. | ||
|
||
~>To get around this you’d need to create two distinct agents in single execution mode, under the same agent pool that is configured for the associated workspace execution mode to work through a whole queue plan and apply run operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also configure the agent to run in single-execution mode, which ensures that the agent only runs a single workload, then terminates. You can use this configuration in combination with Docker and a process supervisor to ensure a clean working environment for every Terraform run. Agents in single -execution mode perform one operation at a time. Plan and apply are separate operations and would require an agent per operation. | |
~>**Important:** When an agent is placed in Single-Execution Mode, if the plan and apply operation is queued from the UI, after the plan has completed its part the agent (placed in single-execution mode) will exit, leaving the apply operation without a agent to process against. The apply operation will then enter in a queued state until an agent process is available. This is the expected behavior as agents in single mode perform one operation at a time. | |
~>To get around this you’d need to create two distinct agents in single execution mode, under the same agent pool that is configured for the associated workspace execution mode to work through a whole queue plan and apply run operation. | |
You can also configure the agent to run in single-execution mode, which ensures that the agent only runs a single workload, then terminates. You can use this configuration in combination with Docker and a process supervisor to ensure a clean working environment for every Terraform run. | |
Agents in single-execution mode perform one operation at a time. Plan and apply are separate operations, so they each require an agent. When you queue a plan and apply from the Terraform Cloud UI, agents in single-execution mode exit after the plan is complete. The apply operation then remains in a queued state until an agent process is available. | |
To change this behavior, create two agents in single-execution mode and add them to the same agent pool. Then, you configure the agent pool to handle the entire plan and apply run within workspaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this suggestion needs to be merged in prior to merging the PR 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you so much for contributing to our docs! :)
I made a few edits to make things flow, and I am trying taking out the yellow bit. We really try to reserve those for like EMERGENCIES in the docs/times when we really need to grab users' attention. I'm hoping that the way it's written now will help users without the callout box. But let me know if you disagree!
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@darrell-fashun - here's a screenshot of the current preview, without my changes. The formatting for the yellow boxes isn't quite right, but you can actually see how it might all look as text! I can show you another preview once you add the changes in, if that's helpful. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to see Laura's suggestion implemented, then I'd be ready to ✅
You can also configure the agent to run in single-execution mode, which ensures that the agent only runs a single workload, then terminates. You can use this configuration in combination with Docker and a process supervisor to ensure a clean working environment for every Terraform run. Agents in single -execution mode perform one operation at a time. Plan and apply are separate operations and would require an agent per operation. | ||
|
||
~>**Important:** When an agent is placed in Single-Execution Mode, if the plan and apply operation is queued from the UI, after the plan has completed its part the agent (placed in single-execution mode) will exit, leaving the apply operation without a agent to process against. The apply operation will then enter in a queued state until an agent process is available. This is the expected behavior as agents in single mode perform one operation at a time. | ||
|
||
~>To get around this you’d need to create two distinct agents in single execution mode, under the same agent pool that is configured for the associated workspace execution mode to work through a whole queue plan and apply run operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this suggestion needs to be merged in prior to merging the PR 👌
Adding use case for agent single execution mode when runs are queued from the UI
What
Why
Screenshots
Merge Checklist
If items do not apply to your changes, add (N/A) and mark them as complete.
Pull Request
Content
terraform-website
repositoryredirects.next.js
file.Reviews