/srv/irclogs.ubuntu.com/2017/01/19/#cloud-init.txt

=== StoneTable is now known as aisrael
=== shardy_afk is now known as shardy
Raboohi11:33
Rabooi'm having troubles with cloud init, it fails with my configuration11:33
Rabooi've created a file in /etc/cloud/cloud.cfg.d with following content http://pastebin.com/c4ZP1KA211:34
RabooI'm using the NoCloud datasource11:34
Raboowondering if I have syntax errors or something..11:35
Odd_BlokeRaboo: One test would be to use a yaml library to inspect the content and see if it looks how you expect.11:37
RabooOdd_Bloke ok11:38
Rabooyaml is valid11:39
Raboocloud-init[1521]: Can not apply stage config, no datasource found! Likely bad things to come!11:40
Odd_BlokeRaboo: Is the yaml within user-data valid?11:42
Odd_BlokeRaboo: (It looks like you have a trailing space on everything after #cloud-config; don't know if that matters.)11:42
RabooOdd_Bloke I think pastebin did that11:44
Odd_BlokeRaboo: So locally lines 8 and 9 have the same level of indentation?11:45
Odd_BlokeBecause it looks like 5 spaces and 6 spaces in the paste.11:45
Rabooeverything after user-data have 6 spaces or more if it have sub-config11:45
RabooOdd_Bloke yes11:46
Odd_BlokeFair enough.11:46
Raboo8-9 have same indentation11:46
* Odd_Bloke is out of ideas.11:46
Raboo6 spaces11:46
Odd_BlokeI've never had cause to use the NoCloud datasource.11:46
Odd_BlokeSorry I couldn't be more help. :(11:46
Raboonp, thanks anyway11:47
Raboothe thing is that i just put this file in /etc/cloud/cloud.cfg.d on the raw image11:48
Raboodon't know if it will work like that11:48
Raboois user-data: supposed to have that pipe "|"?11:48
Odd_BlokeThat's yaml for "treat lines below this as a single string".11:49
Odd_BlokeSo I expect so.11:50
RabooOdd_Bloke when does it end, when indentation becomes equal?11:53
Odd_BlokeRaboo: Not exactly sure, sorry.11:57
Rabook11:57
Raboohow can i stop cloud init from trying to rename the interface?12:33
Raboo2017-01-19 12:32:35,562 - stages.py[WARNING]: Failed to rename devices: [unknown] Error performing rename('enp5s0f0', 'bond0') for d8:d3:85:65:82:f4, bond0: Unexpected error while running command.12:33
RabooCommand: ['ip', 'link', 'set', 'enp5s0f0', 'name', 'bond0']12:33
Raboohow can i stop it to configure any networking?12:34
=== shardy is now known as shardy_lunch
Rabooshould i edit /etc/cloud/cloud.cfg or can i do it from user-data?12:34
ffledglingRaboo: from what I understand, you're missing the NoCloud data source13:06
* ffledgling is still reading scrollback13:07
ffledglingRaboo: you need to create an .iso and mount it on the cd drive of your VM/Machine and that needs to have two files user-data and meta-data iirc13:07
ffledglingI don't recall having to edit cloud.cfg to use the NoCloud data source13:08
ffledglingHere's a makefile that I wrote a while back that (1) fires up a fedora 22 qcow2 image with qemu-kvm (2) Generates the cloud-init files (3) creates the .iso, mounts them correctly and configures the VM using cloud-init13:10
ffledglinghttps://gist.github.com/ffledgling/27460a617f0e9ef93afd847b6ef3c20a13:10
Rabooffledgling im trying to do this on bare-metal13:11
Rabooso mounting an iso kind if defeats the automation13:11
ffledglingRaboo: what's your setup look like exactly?13:12
Raboothats why i inject the config in /etc/clod/cloud.cfg.d13:12
Rabooffledgling and i got around the problem of no datasources13:12
Rabooi simply split it to two files13:12
ffledglingoh?13:12
Rabooi put the datasource_list: [ NoCloud ] in a own file13:13
Rabooand a separate file with the datasource: stuff13:13
ffledglingah13:13
Raboonow i believe that it dies when trying to rename the interfaces, which I don't want it to do13:13
Rabooffledgling i'm redeploying the node now, give me 2 minutes.13:14
Rabooi removed the network setup now, so now when the node it shouldn't have a network setup, only a udev rule that runs dhcps on all interfaces i believe13:14
Rabooffledgling what im doing is building a way to deploy ready raw images to bare metal nodes using theforeman13:15
Rabooso boot a minor image via pxe that partitions the hdd, then curl cloudimage.img | of=/dev/sdaX13:15
Raboomount /dev/sdaX13:16
Rabooadd cloud init config to /etc/cloud/cloud.cfg.d/13:16
Raboo(previously until 2 minutes ago also added network config to /etc/network/interfaces.d/)13:16
Rabooreboot13:16
Raboocloud image boots, and should run cloud-init13:17
ffledglingOut of curiousity, any reason you wouldn't just do this with a salt/ansible playbook that runs at startup after the node boots up?13:17
Rabooffledgling we do that aswell, run chef13:18
Raboobut preseed sucks and is slow13:18
Rabooand we already maintain cloud-init config for our virtual nodes, so why not deploy bare-metal nodes in the same way as virtual?13:18
ffledglingHm, haven't heard of preseed13:19
Raboobbl, gotta go and donate some blood13:19
ffledglingYeah, that's fair, I just hadn't heard of many people using cloud-init for bare metal13:19
Rabooffledgling you pxe boot physical nodes and use debian bootstrap with preseed files13:19
Raboobe back in 3013:19
=== shardy_lunch is now known as shardy
ffledgling(y)13:20
Raboohmm14:37
Rabooi'm back at no datasources found.14:37
Raboobut i do run echo 'datasource_list: [ NoCloud ]' > /etc/cloud/cloud.cfg.d/98_datasources.cfg14:38
Raboodo I need to run anything after i add that config for cloud-init to apply?14:38
liqwRaboo: sorry if i'm offtopic.. this https://maas.ubuntu.com/docs/development/preseeds.html (curtin) can provision bare-metal quicky with metadata similar to cloud-init (it's a part of ubuntu maas)14:39
Rabooliqw ok, i'm trying to avoid preseed14:42
Rabooi simply want to boot an image14:42
Rabooand have cloud init get it's configuration from the local disk14:43
Raboonot some remote data source14:43
Raboojust can14:43
Raboojust can't figure out how14:43
liqwon baremetal?14:44
Rabooliqw yes14:46
Rabooeverything else in in place14:47
Raboonew machine boots for the first time14:47
Rabooboots into a tiny pxe image that writes the ubuntu cloud image to disk, adds my cloud-init configs and reboots14:48
Raboosecond boot, is the newly written cloud image and it runs cloud init since it's a "first boot"14:48
DirangedI'm a bit new to cloud-init.. im curious, can Cloud-init be configurd to call a final command in the event of any error code being generated by one of the runcmd sections, or any other failure?14:52
Dirangedbasically "look, the host didnt finish booting man… so lets call the amazon set-instance-status command and mark us as unhealthy"14:52
liqwRaboo: so no cdrom if i get it right?14:52
Rabooliqw no cdrom15:03
Rabooliqw ffledgling Odd_Bloke i found a way16:02
Rabooif i put my user-data and meta-data in /var/lib/cloud/seed/nocloud/16:02
Rabooit works.16:02
smoserhttp://paste.ubuntu.com/23828513/16:28
smoserfor what its worth, Raboo ^ that works for me.16:28
smoserRaboo, and not shown there, but the hostname is set correctly as  'foo'16:31
supernovahello !18:53
smoserhey19:18
paulmeyola20:44
paulmeywhen I run make in one of the ubuntu/* branches, it complains about git describe returning a different version20:45
paulmeylike this: git describe version (ubuntu/0.7.8-49-g9e904bb-0ubuntu1_16.04.4) differs from cloudinit.version (0.7.8)20:45
paulmeyam I doing something wrong?20:47
powersjah this is the whole tags not being checked in problem20:49
powersjwell not problem, just have to do something and I don't remember what20:49
paulmeyyeah it looks like tools/read-version doesn't expect the ubuntu/ to be in front of the tags...20:50
magicalChickenpaulmey: you can just checkout from the tag you want20:51
magicalChickensomething like 'git checkout 0.7.8' should handle it20:52
magicalChickenor rename the tag if you want the ubuntu/* ones20:52
paulmeyI'm trying to build the xenial package20:52
paulmey(for example)20:52
paulmeyso I do git checkout ubuntu/xenial20:52
paulmeyand then run make20:52
Raboosmoser hmm, thanks, guess i had something wrong in my file22:35
ranger81What is the cloud-init command to read from a yml file and add users in ubuntu?23:13
ranger81In coreos - /bin/coreos-cloudinit —from-file23:13
ranger81In ubuntu cloud-init —f <filename> does not work23:13

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