Menu
  • HOME
  • TAGS

How do I set up cloud-init on custom AMIs in AWS? (CentOS)

amazon-web-services,centos,ami,cloud-init

cloud-init is a very powerful, but very undocumented tool. Even once it's installed, there are lot of modules active by default that overwrite things you may have already defined on your AMI. Here are instructions for a minimal setup from scratch: Instructions Install cloud-init from a standard repository. If you're...

What to bake into an AWS AMI and what to provision using cloud-init?

amazon-web-services,amazon-cloudformation,ami,packer,cloud-init

I like to separate out machine provisioning from environment provisioning. In general, I use the following as a guide: Build Phase Build a Base Machine Image with something like Packer, including all software required to run your application. Create an AMI out of this. Install the application(s) onto the Base...

How to script changing the node name of a client in chef from the client without knife

chef,knife,cloud-init

Look at the example I showed you last time. Thats exactly what it is for. The AMI has Chef pre-installed and has the validation certificate. At boot time, cloud-init runs the script I showed you which generates the client config and initial run list, and then registers with the chef...

How to run cloud-init manually?

amazon-ec2,cloud-init

You can just run it like this: /usr/bin/cloud-init -d init This runs the cloud init setup with the initial modules. (The -d option is for debug) If want to run all the modules you have to run: /usr/bin/cloud-init -d modules Keep in mind that the second time you run these...

Cloud Init Fails to Install Packages on CentOS 7 in EC2

amazon-ec2,centos7,cloud-init

Evidently there was a bug fixed with later versions of the image. If this is happening to you, it may be a legitimate bug in Cloud-Init or your servers implementation of it. A package upgrade may fix the problem, also an update to the image will fix it globally.

When is cloud-init run and how does it find its data?

cloud-init,coreos

CoreOS runs cloudinit a few times during the boot process. Right now this happens at each boot, but that functionality may change in the future. The first pass is the OEM cloud-init, which is baked into the image to set up networking and other features required for that provider. This...