adi1992Hi , I have some doubts on using cloud-init without a  cloud platform like openstack with a kvm hypervisor on ubuntu 14.04 machine ? Where should I post it ?05:44
adi1992http://blog.oddbit.com/2015/03/10/booting-cloud-images-with-libvirt/   : In this link the " virt-install -n example -r 512 -w network=default \   --disk vol=default/fedora-21-cloud.qcow2 --import \   --disk path=config.iso,device=cdrom " command did not work for me .05:48
adi1992the command that I tried virt-install -n cld_int -r 512 -w network=default --disk vol=/home/aditya/scienaptic/Fedora-Atomic-25-20170106.0.x86_64.qcow2 --import --disk path=config.iso,device=cdrom gave this error : ERROR    Error with storage parameters: Couldn't lookup volume object: Storage pool not found: no storage pool with matching name ''05:48
=== shardy is now known as shardy_lunch
=== shardy_lunch is now known as shardy
=== rangerpbzzzz is now known as rangerpb
Rabooif i specify datasource_list: [  NoCloud, None ] and don't have any seedfrom or fs_label14:46
Raboowhere will cloud init try to get user- & metadata?14:46
Raboowill it look at /user-data /meta-data?14:47
Rabooor hmm14:50
Raboois it possible for cloud init to use user-data and meta-data from local filesystem?14:51
Rabooperhaps i can just create the a file with meta-data and user-data in /etc/cloud/cloud.cfg.d?14:54
rharperRaboo: NoCloud will look for either a directory in the image (/var/lib/cloud/seed/nocloud-net/{user-data,meta-data}  or if you have an ISO attached with the label 'cidata' ;14:57
rharperRaboo: on ubuntu, the 'cloud-image-utils' package provides a tool, 'cloud-localds' which helps create such an iso and shows how to attach to a local kvm instance14:58
Raboorharper i'm thinking baremetal, not kvm14:59
rharpereither works14:59
Raboorharper i also just realized i can just put the user-data and meta-data in /etc/cloud/cloud.cfg.d i think.15:00
rharpersome config can be set there;  I suggest populating /var/lib/cloud/seed/nocloud-net/15:00
smoseryou can put user-data and meta-data in /etc/cloud/cloud.cfg.d/ also15:01
smoserthe NoCloud's datasource config allows you to just put it there.15:01
Raboorharper i built an image with openstack's disk-image-create:15:02
RabooDIB_CLOUD_INIT_DATASOURCES=NoCloud disk-image-create ubuntu baremetal dhcp-all-interfaces -o my-image15:02
Rabooand the qcow2 image didn't have a /var/lib/cloud folder15:03
rharperyou have to populate that;  you can use mount-image-callback from the cloud-image-tools to mount up and modify;  or as smoser suggested, you can put the config in /etc/cloud/cloud.cfg.d/  if that dir is already there15:04
rharpermkdir -p /var/lib/cloud/seed/nocloud-net etc.15:04
smoseror cloud-localds also15:05
smoserwithoutput tar15:05
Raboowhy is there 3 different hostname in meta-data?15:06
Raboohostname, local-hostname, public-hostname15:07
Rabooand which one do i need?15:07
Raboomy previos experience i didn't need to build a meta-data file. but that was with kvm and opennebula, most likely openneubla already took care of that.15:08
smoseryou dont need any.15:08
smoseri am confused.15:08
smoserif you're building a bare metal image for openstack15:08
Raboono, for on-premise15:08
smoserthen when you deploy it with openstack, openstack should deal with providing meta-ata15:08
Rabooi don't have openstack.15:09
Rabooi'm using foreman and trying to build a image deploy function for it.15:09
Raboois meta-data needed?15:10
smoserthe easiest thing to do would probably be just to disable cloud-init . by removing it, or (if newe enough cloud-init) touch /etc/cloud/cloud-init.disabled15:10
Raboobut i want cloud-init to configure the machine first boot.15:10
Rabooset hostname, install chef, run chef..15:10
Raboothe user-data contains hostname and fqdn. So i'm wondering if i need meta-data also.15:11
rharperRaboo: AFAIK, you only need an instance-id: XXXX in meta-data15:13
Raboorharper ok15:13
Rabootaken our discussions, this is what i ended up with: http://pastebin.com/PmRcY7hK15:17
Raboorharper, smoser thanks for the input.15:18
smoserRaboo, but how will you give it user-data ?15:18
rharperlooks like writing out to cloud.cfg.d/15:19
smoserare you planning on writing user-data to the image and then deploying it?15:19
Raboomy plan is this:15:19
Raboo1. unknown node boots via pxe and loads a discovery image.15:19
Raboo2. node pops up in foreman, and i press provision.15:20
Raboo3. node reboots with a small image the runs a bash script that curls |dd of=/dev/sda15:21
Raboo3b. the small image mounts /dev/sda to /mnt, writes /mnt/etc/cloud/cloud.cfg.d/[that file from pastebin, but rendered with hostname..]15:22
Raboo3c. reboot15:22
Raboo4. node boots from hdd and runs cloud init to configure the machine and run chef.15:23
smoserRaboo, generally speaking that should work.15:25
smoserRaboo, does foreman provide any way to provide user-data ?15:32
smoserwithout the ability for the user to provide some customizaiton information themselves, you kind of are very limited.15:32
Raboosmoser foreman has so called Provisioning tempaltes, intended for preseed, kickstart etc etc..15:40
Raboobasically you can have a dynamic cloud-init file as a provisioning template.15:41
smoserso how would that tie in here.15:41
smoserhmm. ok.15:41
rharpersmoser: magicalChicken:  were either of your looking to bring in a curtin.net module update to cloudinit.net ?15:44
Rabooso my step 3 basically a small linux image that writes the ubuntu os image to disk and then downloads the cloud-init provisioning template from foreman and puts it in /etc/cloud/cloud.cfg.d/99-magicstuff.15:47
smoserRaboo, how does the small  linux image get booted ?15:48
smoserjust curious. is it initramfs ?15:48
Raboosmoser yea, via pxe, will use this image https://theforeman.org/plugins/foreman_discovery/8.0/index.html#2.3ForemanDiscoveryImage15:50
Raboowill dual purpose it.15:50
Raboodiscovery and deploy15:51
Raboowill cloud-init know that it is initialized (or will it try to run /etc/cloud/cloud.cfg.d/99-magicstuff every boot)?16:07
smoserRaboo, well, you have an instance-id in that.16:13
smoserif the instance-id changes, it will do the per-instance things again16:14
magicalChickenrharper: yes16:18
magicalChickenI was planning on working to combine the two modules into one code base16:18
magicalChickenI am still writing a doc for that, I'll send it out this weekend16:19
=== rangerpb is now known as rangerpbzzzz

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