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

Run cloud-init cloud-config yaml file

How do I run, for development purposes, cloud-init yaml file that will be normally run via user-data? I know how I can re-run cloud-init, but I want to develop complicated cloud-init file and to do that it is rather difficult to continually build…
Jacek Perry
  • 393
  • 6
  • 16
2
votes
1 answer

Using cloud-init as custom_data with ansible

I deploy a VM using an ansible playbook, similar to this demo. - name: Create VM azure_rm_virtualmachine: resource_group: myResourceGroup name: myVM ... custom_data: cloud-init.yml Now I also want to install some packages and do…
Roelant
  • 4,508
  • 1
  • 32
  • 62
2
votes
2 answers

installing oh-my-zsh for a different user as root in cloud-init script

I'm attempting to bootstrap my AWS EC2 ubuntu server with oh-my-zsh installed for the ubuntu user. I have a cloud-init script (more info here) that runs as the root user (with sudo). So, in my script I run the oh-my-zsh installation as the ubuntu…
Corey Cole
  • 2,262
  • 1
  • 26
  • 43
2
votes
0 answers

Does cloud-init service in OpenStack VM fetches UserData on every instance reboot

I would like to understand how does cloud-init service in OpenStack VM fetches the UserData content on every reboot ? I believe it fetches through OpenStack Metadata server but does this happen on every instance reboot ? Because I see the below list…
Jayaprakash
  • 703
  • 6
  • 15
2
votes
1 answer

how to create a user with a random password?

I installed cloud-init in openstack's image(centos-7),so how can I create a user with random password after instance launched (public key will also inject in this user)? I wold not prefer copy script in instance launching panel, thank you all...
mrco
  • 1,995
  • 1
  • 10
  • 7
2
votes
0 answers

Google compute engine - how to customize user home directory?

I want to automate customizing a user home directory when running GCE instance - like ~/.profile, ~/.vimrc, add some files into ~/.vim directory... Seems to be very basic, but somehow I cannot figure out how to do this. --startup-script parameter…
2
votes
1 answer

How to pass cloud-init file locally?

I have been working on windows bash and tried to pass the cloud init file, unfortunately i can not access the app through web, below is the reference.. "https://learn.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-automate-vm-deployment"
user8286671
2
votes
1 answer

can't find /var/log/cloud-init-output.log on redhat ec2 instance

I usually work on amazon linux ec2 instance and i check /var/log/cloud-init-output.log to see if my cloudformation user data script is working or not. I can't find cloud-init-output.log on redhat ec2 instance and i am not sure where to check the…
Nani
  • 117
  • 1
  • 12
2
votes
1 answer

Format and Mount AWS Instance Store with Cloud-Init

I am trying to use terraform to create a r3.large instance in AWS. Here's a snippet of my AMI definition in terraform. resource "aws_instance" "centos-server" { ephemeral_block_device { device_name = "/dev/xvdf" virtual_name =…
grbonk
  • 609
  • 6
  • 22
2
votes
0 answers

cloud-init error apt-get lock during boot

I have the following issue running cloud-init ip-10-211-207-121 login: [ 28.947931] cloud-init[1220]: Cloud-init v. 0.7.9 running 'modules:config' at Tue, 30 Jan 2018 15:48:57 +0000. Up 22.17 seconds. [ 52.606593] cloud-init[1917]: Hit:1…
Mazzy
  • 13,354
  • 43
  • 126
  • 207
2
votes
0 answers

Define systemd units in cloud-init

There is a way to define systemd units in cloud-init? I was thinking to define the files then write them under /etc/system/systemd dir. The issue is that I'm not sure if the system run them or I should run them manually in the runcmd section. Not…
Mazzy
  • 13,354
  • 43
  • 126
  • 207
2
votes
0 answers

AWS EC2 user-data rendered but not executed via terraform

I'm using terraform to automate creating an EC2 instance and installing LAMP stack. I'm using cloud-init for user data. AWS console shows the user data is rendered. However, the system log shows the commands are not executed. The system log shows…
2
votes
1 answer

Using cloud-init to clone git repo when launching AWS EC2 instance

Is there a best practice or standarized way to clone a git repository (currently using CloudCommit to make permissions easier) into an EC2 instance on startup? I'm using the userdata section with a cloud-init script that has: runcmd: - git clone…
tbox
  • 199
  • 1
  • 11
2
votes
1 answer

Cloud-init: how to install it from the source code?

I have a Ubuntu 1604 VM on Azure, which by default has cloud-init installed. To debug a cloud-init issue, I removed the default cloud-init (apt remove cloud-init) and cloned the source code from https://git.launchpad.net/cloud-init/ and want to…
Howard Shane
  • 926
  • 13
  • 28
2
votes
2 answers

cloud-init not working for NoCloud DataSource

I am trying to boot the instance with NoCloud datasource. But everytime the instance comes up it is try to connect to the network and metadata service. logs: 2015-08-17 15:48:58,115 - url_helper.py[WARNING]: Calling…