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
5
votes
2 answers

cloud-init: delay disk_setup and fs_setup

I have a cloud-init file that sets up all requirements for our AWS instances, and part of those requirements is formating and mounting an EBS volume. The issue is that on some instances volume attachment occurs after the instance is up, so when…
Christian Rodriguez
  • 630
  • 1
  • 8
  • 24
5
votes
1 answer

Activating conda environment with cloud-init

We are trying to run batch scripts on load on a AWS EC2 instance using userdata (which I understand is based off of cloud-init). Since the code runs in a conda environment, we are trying to activate it prior to running the Python/Pandas code. We…
5
votes
3 answers

Create systemd unit in cloud-init and enable it

I've created the following systemd unit in the cloud-init file: - path: /etc/systemd/system/multi-user.target.wants/docker-compose.service owner: root:root permissions: '0755' content: | [Unit] Description=Docker Compose Boot Up …
Mazzy
  • 13,354
  • 43
  • 126
  • 207
5
votes
1 answer

Failed to start cloud-init at startup after upgrading to Python 3.6

I've installed Python 3.6 instead of the default 3.5 release on a new cloud server (Ubuntu 16.04). After I restarted the server, I found that it failed to execute cloud-init at startup with the following errors in the syslog. Sep 20 16:16:14…
micmia
  • 1,371
  • 1
  • 14
  • 29
5
votes
0 answers

Cloud init cannot raise network interfaces in Ubuntu 16.04 with Static IP Configuration

I have been experimenting with cloud-init and qemu. This is how I start my VM: qemu-system-x86_64 \ --enable-kvm \ -nographic \ -m 2G -smp 4 \ -drive file=/disks/mustafa.img,if=virtio \ -cdrom /disks/my-seed.img \ -device…
Mustafa
  • 10,013
  • 10
  • 70
  • 116
5
votes
2 answers

HOWTO deploy a docker container on aws without using elastic beanstalk or ec2 container service

I'd like to use docker containers without having to use elastic beanstalk or ec2 container service. I'd like to upload a .zip file describing the container (like you do with elastic beanstalk) and have a generic ec2 instance run it using…
4
votes
1 answer

Send cloud-init script to gcp with terraform

How do I send cloud-init script to a gcp instance using terraform? Documentation is very sparse around this topic.
Sparkler
  • 2,581
  • 1
  • 22
  • 41
4
votes
0 answers

Cannot login to vm using qemu nocloud cloud-init on macOS with Ubuntu cloud image

I cannot login to an Ubuntu cloud image based VM started with qemu / nocloud. I had it working before---really, I did---but I cannot get it to work now ... I'm stumped! Please let me know what I'm doing wrong, or better, how I can debug these kinds…
jra
  • 49
  • 2
4
votes
2 answers

What is difference between repo_upgrade and package_upgrade and apt_upgrade on cloud-init?

In an example from AWS EC2 manual shows that we can perform apt update and upgrade by putting: repo_update: true repo_upgrade: true But I can't find exactly same commands in cloud-init official documentation, so I keep looking for the similiar…
Lisbeth
  • 161
  • 1
  • 8
4
votes
3 answers

KVM with Terraform: SSH permission denied (Cloud-Init)

I have a KVM host. I'm using Terraform to create some virtual servers using KVM provider. Here's the relevant section of the Terraform file: provider "libvirt" { uri = "qemu+ssh://root@192.168.60.7" } resource "libvirt_volume" "ubuntu-qcow2" { …
wiwa1978
  • 2,317
  • 3
  • 31
  • 67
4
votes
1 answer

How can i use cloud-init to load a datadisk on an ubuntu VM in azure

I have been trying use cloud-init to partition and mount a datadisk on a Ubuntu VM in azure. Most of the online examples show how to do that for the temporary disk but not for data disk. I tried dabbling around with it with out much luck. Please let…
Teja
  • 57
  • 1
  • 6
4
votes
1 answer

Cloud-init runcmd syntx of a command that adding a line to file

I'm trying do this simple command but it keeps failing: echo "secret_backend_command: /home/ec2-user/dd-get-secrets.py" >> /etc/datadog-agent/datadog.yaml" I tried all the following: - [ sh, -c, echo "secret_backend_command:…
user181452
  • 545
  • 10
  • 25
4
votes
2 answers

AWS EC2 cloud-init script run as ec2-user

I am baking an image on top of Amazon linux image. I need to run a service as ec2-user. Is it possible to run a launch script of any kind as user other than root?
Łukasz
  • 1,980
  • 6
  • 32
  • 52
4
votes
2 answers

How does cloud-init work?

cloud-init is package performing various configurations on a virtual machine on first boot. You have to configure a file with your config, and throw it at your VM then you virtualize it. But how exactly does it work ? How is the user data sent to…
Nakrule
  • 511
  • 8
  • 24
4
votes
4 answers

How To Use Cloud Init To mount an unformatted EBS volume

Context I am using the https://wiki.jenkins.io/display/JENKINS/Amazon+EC2+Plugin for jenkins which allows me to dynamically provision new cloud instances as build slaves in AWS EC2. I am launching ami-d834aba1 (Amazon Linux 2017.09.1). The plugin…
David
  • 7,652
  • 21
  • 60
  • 98