refactor: AWS cloud-init files#839
Conversation
| version = "~> 1.0" | ||
|
|
||
| agent_id = coder_agent.dev[0].id | ||
| agent_name = "dev" |
There was a problem hiding this comment.
I want to mention that when I ran terraform init, the agent_name variable did not exist. So in my template, I removed agent_name.
There was a problem hiding this comment.
do you mean you removed agent_name during your testing?
Oh, my mistake. I wrote closes, but this PR is for the aws-linux template. I only refactored the code that runs the init script in the AWS VM. I know coder/coder#22664 added a check script, but I made this PR because I think using a cloud-init file is a better way to run the init script in the AWS VM |
|
Hey @phorcys420, do you think this refactor PR is still useful, or should I close it? |
phorcys420
left a comment
There was a problem hiding this comment.
Thank you for the contribution!
Apologies for the delay, i was on leave for a month and just recently came back :)
I'll test your changes soon!
| - systemctl enable coder-agent | ||
| - systemctl start coder-agent No newline at end of file |
There was a problem hiding this comment.
| - systemctl enable coder-agent | |
| - systemctl start coder-agent | |
| - systemctl enable coder-agent --now |
There was a problem hiding this comment.
(^ Seems like I'll want to edit the other templates to do this as well)
| #!/bin/bash | ||
| sudo -u '${linux_user}' sh -c '${init_script}' | ||
| # sudo -u '${linux_user}' sh -c '${init_script}' |
There was a problem hiding this comment.
i think you can just delete the file
| version = "~> 1.0" | ||
|
|
||
| agent_id = coder_agent.dev[0].id | ||
| agent_name = "dev" |
There was a problem hiding this comment.
do you mean you removed agent_name during your testing?
|
I was involved in a bike accident, and I'm on bed rest. |
Oh no! I am sorry to hear about your accident! We hope your recovery goes well, and no worries on this PR we can finish it up separately or wait until you are recovered to continue work on this. Regardless, I wish you the best! @Harsh9485 |
oh.. :( |
#723
Description
Refactored AWS Linux template to use cloud-init for agent initialization, bringing it to parity with the Azure template pattern.
Key Changes:
startup_scriptto cloud-init configurationcloud_final_moduleswithalwaysfrequency to ensure agent starts on every workspace bootType of Change
Template Information
Path:
registry/coder/templates/aws-linuxTesting & Validation
bun test)bun fmt)Screenshots