Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[LXD-1337] Microcloud demo folder #366
base: main
Are you sure you want to change the base?
[LXD-1337] Microcloud demo folder #366
Changes from 1 commit
a0930f9
f11e64b
ea47d6c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
There already is a
2.3.0
.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!
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.
Any reason for not using the built-in
remote-exec
provisioner from Terraform directly? https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-execThere 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.
this was a opentofu requirement - I can switch back to the terraform built-in - what do you think?
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.
Can't the MicroCloud preseed file also be included in the cloud init? You can then use
runcmd
to execute themicrocloud init --preseed
command.This way you won't need either SSH or the provisioner (and a key pair) to connect to the machine and to run the command.
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 could still use the templating engine from Terraform to generate the
preseed.yml
.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.
yes - it can be included - the issue is that cloud-init is going to run on all three nodes, so you're writing the file out on all three unnecessarily. The issue is without some custom logic in cloud-init, there's no way to decide to pick a 'leader' to run the init phase of this, so I'm not sure what we'd be saving here - do you have some way which we could remove the ssh remote exec and only run init on the leader via cloud-init?
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.
After #383 is being merged, you would need to put the preseed file on all of the nodes anyway.
Also a initiator/leader has to be picked as part of crafting the preseed file (see https://github.com/canonical/microcloud/pull/383/files#diff-14d3c025154c62cbd2816232e7d56a1d80c9389b77d2eebdac004c646af8783d for reference).
With cloud-init you would then run
microcloud preseed
on all nodes and MicroCloud will pick the selected initiator/leader automatically.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.
To cleanup the template, it would be worth removing the comments from the official docs together with any unsused keys.
If you want to learn more about the keys, you can always consult the official docs.
Maybe having a link to the docs at the beginning of the file would be enough.
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.
makes sense
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.
Required newline at the beginning of the file?
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.
removed
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.
Please can you derive it in this PR if possible?