Questions tagged [cloud-init]

CloudInit is a set of python scripts and utilities that handles initialization and configuration of cloud instances. It is installed in the Ubuntu Cloud Images and also in the official Ubuntu images available on EC2.

CloudInit is a set of python scripts and utilities that handles initialization and configuration of cloud instances. It is installed in the Ubuntu Cloud Images and also in the official Ubuntu images available on EC2.

387 questions
2
votes
1 answer

Safely setup Ubuntu vm with Terraform and Cloud-init

For personal use (and fun) I'm trying to setup a VM on which I want to host my website (Nginx, Django and Postgres running in docker containers). I'm trying to learn how to setup the server using Terraform and Cloud init in a safe manner. My current…
Yorian
  • 2,002
  • 5
  • 34
  • 60
2
votes
1 answer

Is it possible to concurrently run commands in cloud-init

As part of my cloud-init, I need to download a large file (ie. a 6GB toolchain / SDK). This step is executed through runcmd and takes 3-5 minutes, which is about half of the time of the initialization process. Is it possible to at least start the…
Adam Lee
  • 2,983
  • 7
  • 35
  • 47
2
votes
0 answers

Terraform template_cloudinit_config multiple part execution order is wrong

I am using the terraform to build my ec2-instances as part of instance bootstrap, added cloud-init config to run multiple userdata scripts. but the content_type = "text/x-shellscript" always executed first. I verified the cat…
Balamurugan
  • 63
  • 1
  • 1
  • 4
2
votes
1 answer

cloud-init won't update ubuntu packages at the end of autoinstall

I am trying to make auto install with PXE boot, the boot no problem but i use cloud-init to preform the automatic installation and run in to some problems one of them is that i want a fully upgraded machine after the auto install so i added…
2
votes
1 answer

What are appropriate scenarios to use userdata, cloud init directives and metadata

Please may I have some advice on when to use these settings appropriately? userdata, metadata and cloud-init directives all seem to accomplish the same goal. Following the AWS documentation, when using userdata I can set up a lamp server in this…
2
votes
2 answers

cloud-init - I am trying to copy files to Windows EC2 instance through cloud init by passing it through user data

I am trying to copy files to Windows EC2 instance through cloud init by passing it through user data, the cloud init template runs, it creates a folder but doesnot copy the files, can you help me understand what I am doing wrong in my code. this…
2
votes
1 answer

cloud-init: Can write_files be merged?

Can write_files be merged? I can't seem to get the merge_how syntax correct. Only files in the last write_files are being created. Thanks
Charles
  • 81
  • 8
2
votes
1 answer

Cloud-init to configure an Ubuntu docker container?

Is it possible to use a cloud-init configuration file to define commands to be executed when a docker container is started? I'd like to test the provisioning of an Ubuntu virtual machine using a docker container. My idea is to provide the same…
Ynnckth
  • 95
  • 9
2
votes
1 answer

what is the linux file location where the cloud-init user-data is passed to?

what is the linux file location where the cloud-init user-data is passed to? And how does cloud init use that, is it passed as kernel parameter for proc commandline? Can explain in atleast level 2? How cloudinit works on bare eSXI?
kapata rajesh
  • 29
  • 1
  • 3
2
votes
2 answers

Instances created recently by AWS ECS do not have ssh authorized_keys configured

We are using Amazon Elastic Compute Services to spin up a cluster with autoscaling groups. Until very recently, this has been working fine, and generally it is still working fine... Except that we are no longer able to connect to the underlying EC2…
Eric Schoen
  • 668
  • 9
  • 16
2
votes
2 answers

How to track the progress of unattended-upgrades or cloud-init?

I am looking to use Packer (builds images) and Ansible (provisioner) to provision an Ubuntu AMI. "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", I am having difficulties because some of the tasks try to install packages using apt, but…
Slackware
  • 960
  • 1
  • 13
  • 29
2
votes
1 answer

How to make a custom GID in groupadd cloud-init?

Is it possible to create group with specify ID example in cloud-init: groupadd -g 1234 sapsys #cloud-config groups: - sapsys
unixdisk
  • 23
  • 3
2
votes
1 answer

Terraform Cloud-Init AWS

I have a Terraform script for make a deploy of Ubuntu. resource "aws_instance" "runner" { instance_type = "${var.instance_type}" ami = "${var.ami}" user_data = "${data.template_file.deploy.rendered}" } data "template_file" "deploy" { …
Brygom
  • 818
  • 1
  • 12
  • 31
2
votes
1 answer

Static network configuration of Ubuntu 18.04 with cloud-init through Terraform

I am deploying Ubuntu 18.04 VMs on VMware vSphere using Terraform, and I need to apply some basic configurations so I'm using cloud-init. Most of the things are working correctly (setting the hostname, adding users, running commands) but I'm totally…
Luke404
  • 10,282
  • 3
  • 25
  • 31
2
votes
1 answer

cloud-init: Unable to render networking

I'm trying to deploy a 'Fedora-AtomicHost-29-20190219' image (qcow2) using 'NoCloud' to provide userdata, hostname and network settings (non dhcp). Configuring Userdata and hostname succeeds configuring network fails. The log tells my provided data…
kstieger
  • 133
  • 1
  • 5