cloudinit
TRANSCRIPT
CLOUD INITSri Rajan
Intro
• The defacto multi-distribution package that handles early initialization of a cloud instance– As described by Ubuntu
• Early stage configuration of servers (think rc.local)
Intro
• No install required*• Cloud Platform support required
• Works on most common Linux distros
Windows?
• CloudBaseInit• Windows agents (Apache license)• Similar functionality• Next Time…
How does it work?• Cloud Server
• Data Source• EC2 (magic ip)• Metadata service (OpenStack)• Config Drive• OVF (new)• More(Nebula, CloudStack, Atl Cloud…)
• Cloud Init Modules (bunch of Python scripts)
Data Source
• meta-data(from cloud platform)• Server name, IP etc
• user-data• What you want it do do, scripts etc
• Saved to /var/lib/cloud/
Data Source – Metadata Service
• Metadata service as part of OpenStack• http://169.254.169.254/latest/meta-data (user-data)
• NAT rules make this work
• Provided by nova-api or neutron-metadata-proxy
Data Source – Config Drive
• Like a USB stick attached to the server
• Cloud provider metadata
• User data provided via YAML and MIME encoded files
Data Source – Vmware
• Similar to config drive (but more arcane?)
• cloud-init searches for a CDROM on boot
• ISO images which contain user data
Modules
• Add users• Create files• Run arbitrary commands• Bootstrap Chef/Puppet• More…Write your own…etc
• Configuration management? (not really)
Demo/Examples
https://github.com/srirajan/cloudinit-demo
Troubleshooting
• /var/log/cloud-init.log (verbose logs)
• /var/lib/cloud/ (data, files etc from the metadata service or config drive
• cloudinit [h] [version] [file FILES] [debug] [-force] {query,init,modules,single}
Links etc…
• https://cloudinit.readthedocs.org
• https://github.com/cloudbase/cloudbase-init
THANK YOU