cloudinit

14
CLOUD INIT Sri Rajan

Upload: sriramrajan

Post on 29-Jul-2015

38 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Cloudinit

CLOUD INITSri Rajan

Page 2: Cloudinit

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)

Page 3: Cloudinit

Intro

• No install required*• Cloud Platform support required

• Works on most common Linux distros

Page 4: Cloudinit

Windows?

• CloudBaseInit• Windows agents (Apache license)• Similar functionality• Next Time…

Page 5: Cloudinit

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)

Page 6: Cloudinit

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/

Page 7: Cloudinit

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

Page 8: Cloudinit

Data Source – Config Drive

• Like a USB stick attached to the server

• Cloud provider metadata

• User data provided via YAML and MIME encoded files

Page 9: Cloudinit

Data Source – Vmware

• Similar to config drive (but more arcane?)

• cloud-init searches for a CDROM on boot

• ISO images which contain user data

Page 10: Cloudinit

Modules

• Add users• Create files• Run arbitrary commands• Bootstrap Chef/Puppet• More…Write your own…etc

• Configuration management? (not really)

Page 11: Cloudinit

Demo/Examples

https://github.com/srirajan/cloudinit-demo

Page 12: Cloudinit

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}

Page 13: Cloudinit

Links etc…

• https://cloudinit.readthedocs.org

• https://github.com/cloudbase/cloudbase-init

Page 14: Cloudinit

THANK YOU