Open mvisonneau opened 6 years ago
@mvisonneau Can you give more detailed steps? Where do you add multiple user data?
👋 I pass a mime-multipart archive as my cloud-config
file. I personally use the Terraform template_cloudinit_config data resource in order to build it :
data "template_cloudinit_config" "cloudinit" {
gzip = true
base64_encode = true
part {
content_type = "text/cloud-config"
content = <<EOF
hostname: foo
EOF
}
part {
content_type = "text/cloud-config"
content = <<EOF
locale: en_US.UTF-8
timezone: UTC
EOF
}
}
@mvisonneau Thank you for your feedback @niusmallnan We do not currently support mime-multipart archive. I launch a ubuntu instance on aws and set user-data:
Content-Type: multipart/mixed; boundary="==BOUNDARY=="
MIME-Version: 1.0
--==BOUNDARY==
Content-Type: text/cloud-boothook; charset="us-ascii"
#!/bin/bash
echo "test1" >> /opt/test1.config
--==BOUNDARY==
Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
echo "test2" >> /opt/test2.config
--==BOUNDARY==--
Then I login to the instance to view the /opt directory, I can view test1.config and test2.config. But if I use the same steps to launch rancheros v1.4.1, the /opt directory is empty.
The rancher quickstart repo for AWS (https://github.com/rancher/quickstart/tree/master/aws) uses the multi-part cloud-init configuration in terraform. It uses Ubuntu 18.04.
Ideally we would be able to swap it out with just the rancheros ami, but the error above prevents us from using that type of userdata.
It seems that cloud-init-execute doesn't support multi-parted cloud-config files :
RancherOS Version: (ros os version)
1.3.0
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
AWS