cloud-init team mailing list archive
-
cloud-init team
-
Mailing list archive
-
Message #00273
Re: cloud-init configuration userdata for Debian Buster - Terraform - AWS
Hi Cauã,
Thanks for reaching out!
On Thu, May 14, 2020 at 01:21:30AM +0000, Cauã Siqueira wrote:
> I am migration from CoreOS to Debian Buster inside AWS. I use
> terraform for IaaC and i'm using userdata like
> https://github.com/sztupy/doclusterdemo/blob/master/terraform/1/web.conf,
> but I can't use with Debian. How can i use with Debian Buster ?
I don't have much experience with either Terraform or CoreOS, so
apologies if my answer misses the mark. It looks to me like this
configuration is starting some systemd units, and writing out and
starting others.
cloud-init doesn't have a direct parallel to the `units` configuration
key, unfortunately, so you'll have to put the things it does together
yourself.
I think you'll want to look at `write_files`[0] for writing out the
systemd units and `runcmd`[1] for executing the systemctl commands to
load the service files and start them.
It also looks to me like this configuration assumes that the packages
that provide etcd2.service, fleet.service, and /usr/bin/docker will
already be installed. If you aren't taking care of this in your Debian
image build process, you'll probably also want to look at
`package_update_upgrade_install`[2] to do that for you.
I hope this helps!
Dan
[0] https://cloudinit.readthedocs.io/en/latest/topics/modules.html#write-files
[1] https://cloudinit.readthedocs.io/en/latest/topics/modules.html#runcmd
[2] https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install
Attachment:
signature.asc
Description: PGP signature
Follow ups
References