/srv/irclogs.ubuntu.com/2014/04/17/#cloud-init.txt

=== zz_gondoi is now known as gondoi
=== gondoi is now known as zz_gondoi
=== harlowja is now known as harlowja_away
Sonia_Hi , need help in cloud-init ?07:54
kwadronautSonia_: please state your question and stick around.08:01
kwadronautformulating your question often already helps understanding the problem08:02
kwadronautand people are not always behind their keyboards, so asking for the question, doesn't mean people stick around until it is there.08:02
=== shardy is now known as shardy_afk
Sonia_sorry , yesterday I put my question and got no response till today morning, hence realized if there is no one in the chat , and if time is out , question gets deleted 09:57
Sonia_my question on cloud-init is , how we can re-run cloud-init without rebooting the VM .....and in the same process give another user-data to it. (not the one initially executed by cloud-init)09:58
kwadronautah i see it now if i scroll up...., you could add any local data in /var/lib/cloud/?10:02
Sonia_I was doing following steps to re-run cloud-init :10:09
Sonia_1. rm -rf /var/lib/cloud/insance*10:10
Sonia_2. run cloud-init init , cloud-init modules --mode init/config/final10:10
Sonia_these will run it with the same user-data which I supplied at the time of VM provisioning10:10
Sonia_but in between if I try to give my own, doenst work10:28
harmwyou could also fetch the userdata using curl, just to make sure it got updated properly on the infra-side (beeit openstack or whatever platform you're running)10:53
Sonia_I used config-drive here ,and user-data gets to the VM successfully and gets executed.11:48
Sonia_when i re-run cloud-init , it again gets the user-data from config-drive 11:48
=== zz_gondoi is now known as gondoi
=== gondoi is now known as zz_gondoi
kwadronauti see a typo in your rm -rf, a t has gone missing in the instance12:47
kwadronautwell, if you want to use different data/source, that needs to be changed too of course?12:48
=== zz_gondoi is now known as gondoi
smoserSonia_, you can use 'ci-tool' as a friendly-ish way to "seed" data.13:43
smoserhttp://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool13:44
smoserit also has 'reset' which will clean out the state in /var/lib/cloud13:44
smoserSonia_, also, if you're just wanting to quickly iterate on testing things... lxc can provide a really nice way to do that.13:45
smoserhttp://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool13:45
smoseroops.13:45
smoserhttp://ubuntu-smoser.blogspot.com/2013/08/lxc-with-fast-cloning-via-overlayfs-and.html13:45
=== gondoi is now known as zz_gondoi
=== zz_gondoi is now known as gondoi
Sonia_thanks smoser for the link , I will certainly look at the tool14:14
Sonia_my use case is that , initially coud-init will work with user-data supplied during provisioning time 14:14
Sonia_just that at later point of time , want to re-run cloud-init without rebooting the VM with a different user-data script.14:15
Sonia_kwadronaut , sorry for the typo in the chat , during testing , 't' is there 14:15
smoserSonia_, why do you want to do that ?14:16
smoserci-tool would help you accomplish it, but curious.14:16
Sonia_kwadronaut , so if I want a different data source after the VM is provisioned, can  I change it later point of time ?14:16
Sonia_well , I dont want VM to do all the initial configurations .....running them again may wipe out many settings done14:17
Sonia_smoser , shouldnt these steps work too ? 14:19
Sonia_1. clean out /var/lib/cloud 2. run cloud-init init 3.  replace the user-data script with out own in the instance/ directory 4. run cloud-init modules --mode init/config/final14:20
smoserno. it probably wont work.14:21
smoseri'm sorry, i can't really help now.14:21
Sonia_no problem , I will try ci-tool14:21
Sonia_smoser , is there a way to change the data source also ?14:23
smosersure. its configurable.14:24
smoserin ubuntu 'dpkg-reconfigure cloud-init'14:24
smoserdpkg-reconfigure or ci-toolw ill adjust etc/cloud/cloud.cfg.d/90_dpkg.cfg14:25
Sonia_ok , I am on RHEL14:27
Sonia_hope I can still change the configurations.14:30
kwadronautsmoser: awwww. that lxc link is promising!16:57
smoserkwadronaut, yeah, its nice.16:58
smoseron ubuntu, you can also snapshot quickly with btrfs (or lvm if you wanted).16:58
smoserthe big feature really was the "clone hook" to allow you to pass in user-data on the clone rather than create.16:58
=== harlowja_away is now known as harlowja
saucesmoser you the man18:27
smoserthanks18:27
smoser:)18:27
Sonia_smoser , I may need help with ci-tool 20:24
Sonia_so first i ran ci-tool reset , which removed instance and instances/ directory for me.20:26
Sonia_post that , I am trying to seed data using the command , "ci-tool seed -s nocloud /opt/my-user-data"20:45
Sonia_then I run cloud init again by "ci-tool run"20:56
Sonia_correcting my earlier command : "ci-tool seed /opt/SJuser-data"20:57
Sonia_running ci-tool again doesnt execute the new user-data file , any mistake I am doing here in using the tool ?20:57
=== gondoi is now known as zz_gondoi

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!