=== StoneTable is now known as aisrael | ||
=== shardy_afk is now known as shardy | ||
Raboo | hi | 11:33 |
---|---|---|
Raboo | i'm having troubles with cloud init, it fails with my configuration | 11:33 |
Raboo | i've created a file in /etc/cloud/cloud.cfg.d with following content http://pastebin.com/c4ZP1KA2 | 11:34 |
Raboo | I'm using the NoCloud datasource | 11:34 |
Raboo | wondering if I have syntax errors or something.. | 11:35 |
Odd_Bloke | Raboo: One test would be to use a yaml library to inspect the content and see if it looks how you expect. | 11:37 |
Raboo | Odd_Bloke ok | 11:38 |
Raboo | yaml is valid | 11:39 |
Raboo | cloud-init[1521]: Can not apply stage config, no datasource found! Likely bad things to come! | 11:40 |
Odd_Bloke | Raboo: Is the yaml within user-data valid? | 11:42 |
Odd_Bloke | Raboo: (It looks like you have a trailing space on everything after #cloud-config; don't know if that matters.) | 11:42 |
Raboo | Odd_Bloke I think pastebin did that | 11:44 |
Odd_Bloke | Raboo: So locally lines 8 and 9 have the same level of indentation? | 11:45 |
Odd_Bloke | Because it looks like 5 spaces and 6 spaces in the paste. | 11:45 |
Raboo | everything after user-data have 6 spaces or more if it have sub-config | 11:45 |
Raboo | Odd_Bloke yes | 11:46 |
Odd_Bloke | Fair enough. | 11:46 |
Raboo | 8-9 have same indentation | 11:46 |
* Odd_Bloke is out of ideas. | 11:46 | |
Raboo | 6 spaces | 11:46 |
Odd_Bloke | I've never had cause to use the NoCloud datasource. | 11:46 |
Odd_Bloke | Sorry I couldn't be more help. :( | 11:46 |
Raboo | np, thanks anyway | 11:47 |
Raboo | the thing is that i just put this file in /etc/cloud/cloud.cfg.d on the raw image | 11:48 |
Raboo | don't know if it will work like that | 11:48 |
Raboo | is user-data: supposed to have that pipe "|"? | 11:48 |
Odd_Bloke | That's yaml for "treat lines below this as a single string". | 11:49 |
Odd_Bloke | So I expect so. | 11:50 |
Raboo | Odd_Bloke when does it end, when indentation becomes equal? | 11:53 |
Odd_Bloke | Raboo: Not exactly sure, sorry. | 11:57 |
Raboo | k | 11:57 |
Raboo | how can i stop cloud init from trying to rename the interface? | 12:33 |
Raboo | 2017-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 |
Raboo | Command: ['ip', 'link', 'set', 'enp5s0f0', 'name', 'bond0'] | 12:33 |
Raboo | how can i stop it to configure any networking? | 12:34 |
=== shardy is now known as shardy_lunch | ||
Raboo | should i edit /etc/cloud/cloud.cfg or can i do it from user-data? | 12:34 |
ffledgling | Raboo: from what I understand, you're missing the NoCloud data source | 13:06 |
* ffledgling is still reading scrollback | 13:07 | |
ffledgling | Raboo: 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 iirc | 13:07 |
ffledgling | I don't recall having to edit cloud.cfg to use the NoCloud data source | 13:08 |
ffledgling | Here'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-init | 13:10 |
ffledgling | https://gist.github.com/ffledgling/27460a617f0e9ef93afd847b6ef3c20a | 13:10 |
Raboo | ffledgling im trying to do this on bare-metal | 13:11 |
Raboo | so mounting an iso kind if defeats the automation | 13:11 |
ffledgling | Raboo: what's your setup look like exactly? | 13:12 |
Raboo | thats why i inject the config in /etc/clod/cloud.cfg.d | 13:12 |
Raboo | ffledgling and i got around the problem of no datasources | 13:12 |
Raboo | i simply split it to two files | 13:12 |
ffledgling | oh? | 13:12 |
Raboo | i put the datasource_list: [ NoCloud ] in a own file | 13:13 |
Raboo | and a separate file with the datasource: stuff | 13:13 |
ffledgling | ah | 13:13 |
Raboo | now i believe that it dies when trying to rename the interfaces, which I don't want it to do | 13:13 |
Raboo | ffledgling i'm redeploying the node now, give me 2 minutes. | 13:14 |
Raboo | i 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 believe | 13:14 |
Raboo | ffledgling what im doing is building a way to deploy ready raw images to bare metal nodes using theforeman | 13:15 |
Raboo | so boot a minor image via pxe that partitions the hdd, then curl cloudimage.img | of=/dev/sdaX | 13:15 |
Raboo | mount /dev/sdaX | 13:16 |
Raboo | add 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 |
Raboo | reboot | 13:16 |
Raboo | cloud image boots, and should run cloud-init | 13:17 |
ffledgling | Out 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 |
Raboo | ffledgling we do that aswell, run chef | 13:18 |
Raboo | but preseed sucks and is slow | 13:18 |
Raboo | and 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 |
ffledgling | Hm, haven't heard of preseed | 13:19 |
Raboo | bbl, gotta go and donate some blood | 13:19 |
ffledgling | Yeah, that's fair, I just hadn't heard of many people using cloud-init for bare metal | 13:19 |
Raboo | ffledgling you pxe boot physical nodes and use debian bootstrap with preseed files | 13:19 |
Raboo | be back in 30 | 13:19 |
=== shardy_lunch is now known as shardy | ||
ffledgling | (y) | 13:20 |
Raboo | hmm | 14:37 |
Raboo | i'm back at no datasources found. | 14:37 |
Raboo | but i do run echo 'datasource_list: [ NoCloud ]' > /etc/cloud/cloud.cfg.d/98_datasources.cfg | 14:38 |
Raboo | do I need to run anything after i add that config for cloud-init to apply? | 14:38 |
liqw | Raboo: 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 |
Raboo | liqw ok, i'm trying to avoid preseed | 14:42 |
Raboo | i simply want to boot an image | 14:42 |
Raboo | and have cloud init get it's configuration from the local disk | 14:43 |
Raboo | not some remote data source | 14:43 |
Raboo | just can | 14:43 |
Raboo | just can't figure out how | 14:43 |
liqw | on baremetal? | 14:44 |
Raboo | liqw yes | 14:46 |
Raboo | everything else in in place | 14:47 |
Raboo | new machine boots for the first time | 14:47 |
Raboo | boots into a tiny pxe image that writes the ubuntu cloud image to disk, adds my cloud-init configs and reboots | 14:48 |
Raboo | second boot, is the newly written cloud image and it runs cloud init since it's a "first boot" | 14:48 |
Diranged | I'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 |
Diranged | basically "look, the host didnt finish booting man… so lets call the amazon set-instance-status command and mark us as unhealthy" | 14:52 |
liqw | Raboo: so no cdrom if i get it right? | 14:52 |
Raboo | liqw no cdrom | 15:03 |
Raboo | liqw ffledgling Odd_Bloke i found a way | 16:02 |
Raboo | if i put my user-data and meta-data in /var/lib/cloud/seed/nocloud/ | 16:02 |
Raboo | it works. | 16:02 |
smoser | http://paste.ubuntu.com/23828513/ | 16:28 |
smoser | for what its worth, Raboo ^ that works for me. | 16:28 |
smoser | Raboo, and not shown there, but the hostname is set correctly as 'foo' | 16:31 |
supernova | hello ! | 18:53 |
smoser | hey | 19:18 |
paulmey | ola | 20:44 |
paulmey | when I run make in one of the ubuntu/* branches, it complains about git describe returning a different version | 20:45 |
paulmey | like this: git describe version (ubuntu/0.7.8-49-g9e904bb-0ubuntu1_16.04.4) differs from cloudinit.version (0.7.8) | 20:45 |
paulmey | am I doing something wrong? | 20:47 |
powersj | ah this is the whole tags not being checked in problem | 20:49 |
powersj | well not problem, just have to do something and I don't remember what | 20:49 |
paulmey | yeah it looks like tools/read-version doesn't expect the ubuntu/ to be in front of the tags... | 20:50 |
magicalChicken | paulmey: you can just checkout from the tag you want | 20:51 |
magicalChicken | something like 'git checkout 0.7.8' should handle it | 20:52 |
magicalChicken | or rename the tag if you want the ubuntu/* ones | 20:52 |
paulmey | I'm trying to build the xenial package | 20:52 |
paulmey | (for example) | 20:52 |
paulmey | so I do git checkout ubuntu/xenial | 20:52 |
paulmey | and then run make | 20:52 |
Raboo | smoser hmm, thanks, guess i had something wrong in my file | 22:35 |
ranger81 | What is the cloud-init command to read from a yml file and add users in ubuntu? | 23:13 |
ranger81 | In coreos - /bin/coreos-cloudinit —from-file | 23:13 |
ranger81 | In ubuntu cloud-init —f <filename> does not work | 23:13 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!