Skip to content

Instantly share code, notes, and snippets.

@larsks
Created July 31, 2013 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsks/6124919 to your computer and use it in GitHub Desktop.
Save larsks/6124919 to your computer and use it in GitHub Desktop.
I booted the instance using this command line:
nova boot --image ubuntu-precise-x86_64 \
--user_data ~/tmp/userdata.sh \
--flavor m1.small lars-ubuntu-test
And `~/tmp/userdata` contained:
#!/bin/sh
echo This is a test. > /var/log/userdata.log
And upon booting it worked correctly (it created
`/var/log/userdata.log`), and in `/var/log/cloud-init.log` I see:
2013-07-31 18:43:16,046 - cloud-init[INFO]: cloud-init start-local running: Wed, 31 Jul 2013 18:43:16 +0000. up 8.18 seconds
2013-07-31 18:43:16,701 - __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
2013-07-31 18:43:16,800 - __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceConfigDrive', 'DataSourceOVF']
2013-07-31 18:43:17,049 - cloud-init[INFO]: cloud-init start running: Wed, 31 Jul 2013 18:43:17 +0000. up 9.17 seconds
2013-07-31 18:43:17,083 - __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloudNet', 'DataSourceConfigDriveNet', 'DataSourceOVFNet', 'DataSourceMAAS', 'DataSourceEc2']
2013-07-31 18:43:17,193 - DataSourceEc2.py[DEBUG]: removed the following from metadata urls: ['http://instance-data:8773']
2013-07-31 18:43:17,452 - DataSourceEc2.py[DEBUG]: Using metadata source: 'http://169.254.169.254'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment