/srv/irclogs.ubuntu.com/2017/11/08/#cloud-init.txt

sinanpI am new to cloud-init, I launched a VM with the default cloud.cfg. It look likes it added a swap entry to fstab, but can't find in the config which line that does. Any suggestions?13:25
smosersinanp, ec2?16:07
smoserif ther eis a swap device provided to it from the metadata service, it will make use of the swap space . some instances provide that.16:07
smosercloud-init *can* create and use a swap file, but wont do that by default.16:08
cetexSo, i've tried figuring out how people solve cloud-init on-premise16:31
cetexwith pxe-booted (ramdisk only) instances16:32
cetexCan't find any good solution for this scenario, but i'm thinking i could easily implement the magic 169.254.169.254 magic ip.16:32
cetexso, will cloud-init just try to ask for that ip? or does it figure out it's on ec2 before even asking?16:33
smosercetex: earlier versions of cloud-init will just look for that eventually.17:15
smosernewer versions require some identification of the platform beore they'll go polling there.17:15
smoserbut you can tell it to look there (or another IP address) if you're configuring it17:16
cetexsmoser: how would i do that? tell it to go to some url, or assune ec2?17:27
smoseryou can modify the image ?17:32
smosercetex: well, if you're building your own images and they're mostly static, then the easiest thing to do is put data in /var/lib/cloud/nocloud/17:36
smoserif you want it to use a web service that would provide custom information to each node, then you could mimic ec2. but i  might suggest instead doing "nocloud" and a "seed"17:37
smoserhttp://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html17:38
smoserand then some  more example of nocloud http://bit.ly/ci-ubuntu-netconfig17:39
smoserblackboxsw, powersj so. i'm thinking about the nocloud integration, and thinking how nice the c-i is witih that pretty pipeline thingy17:43
smoserbut i can't bring myself to write and duplicate a bunch of 'stages' since i found jenkins job builder that can make jobs out of re-usable parts much more nicer.17:44
powersjsmoser: yeah the syntax of jjb for the pipeline sucks17:44
smoserwhere do i read about variable substituion and such for pipelines17:44
smoserdoes jjb have some support for pipelines ?17:44
powersjyes see the cloud-init-ci.yaml17:45
powersjthat's why I require a specific version of jenkins-jobs17:45
powersji.e. the one that supports pipelines17:45
smoserhm.. thinking. i thoguht that was basically just blobs to jjb17:45
powersjhere is the doc on pipelines themselves: https://jenkins.io/doc/book/pipeline/17:46
powersjand here is the doc for jjb pipelines: https://docs.openstack.org/infra/jenkins-job-builder/project_pipeline.html17:46
smoserah.17:48
smoserok. the {{ that make sense.17:48
smoserfun17:48
blackboxswyeah that link is the only documentation I'd looked at for pipelines https://jenkins.io/doc/book/pipeline/ as basics17:49
blackboxswI can dig up another example of pipelines from livepatch I think.. lemme check17:49
blackboxswhmm nope https://github.com/CanonicalLtd/livepatch-client/blob/master/Jenkinsfile17:50
smoserblackboxsw: i just didn't realize how i'd gert variable substitution on a per-job (or per-THING) basis17:51
smoserbut the jjb gives me that at least somehow.17:51
smoserie, i'm going to have 3 jobs each that differ in only the name of the release.17:51
smoserand coudlnt bring myself to duplicate big pipeline blobs to get that difference17:52
cetexsmoser: if i'm building my own images through ansible (which we're doing) i can easily just write ansible-stuff for it.18:04
cetexsmoser: but if i'm building my own images through ansible, and then want the hosts which boot from them to download a user-data script and run it on boot to adapt the image for the host?18:05
cetexfor example, to setup consul to join the local consul-cluster, nomad as well, maybe grab credentials to use to authenticate to s3 and stuff.18:05
cetexbut still being on premise.18:05
smoseryeah. so that should be doable via /var/lib/cloud/seed . the noclodu source is what i'd recommend.18:06
cetexI've done it with dhcp-options earlier, but there's too many assumptions in there.18:06
cetexi'd like cloud-init to be given a url where it can find everything of this18:06
cetexand then have cloud-init download and run it.18:06
smoserso you'll assume "dhcp on the first interface" for network configuration18:07
smoserright?18:07
blackboxswcould we just define a function  that script that the pipeline could call w/ a list? like this? http://pastebin.ubuntu.com/25919298/18:07
cetexwe provision the network config through ansible, it's hard-coded into the image18:07
cetexand i'd like to not touch that usually.18:08
smosercetex: sure. i guess . you can provision the network howeve ryou want as long as it comes up i guess. i dont understand how you'd re-use an image with specific network info other than dhcp built in18:09
cetexwell, everything is dhcp18:10
cetexand everything has interface 1 & 2 bonded into lacp18:10
cetexso, that's it.18:10
smoserok.18:12
smoserso 2 things18:12
smoser https://git.launchpad.net/cloud-init/tree/doc/examples/cloud-config-datasources.txt18:12
smosersee the 'NoCloud' section there.18:13
smoseri'm suggesting that you put a file like this (with just the NoCloud) section and a 'seedfrom' url with whatever you want there.18:13
smoserand then for networking, you'll have to tell cloud-init not to configure networking18:13
smoseror you could declare to cloud-init the networkign that you wanted. but since you're already doing that i figure let that be as it is.18:13
smoserto disable networking configuration in clodu-init put in18:14
smoser /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg18:14
smosernetwork: {config: disabled}18:14
blackboxswor pipelines related even something like http://pastebin.ubuntu.com/25919350/18:19
smosercetex: http://paste.ubuntu.com/25919368/18:20
smoserblackboxsw: can you hangout a minute ? and explain to me ?18:21
blackboxswyes let's powersj feel free to join if you like meetings too18:22
blackboxsw:)18:22
cetexsmoser: alright. cool :D18:22
cetexsmoser: so, could i make cloud-init pick-up additional network-configuration as well even though i don't want cloud-init to do initial network-config?18:23
cetexIdeally i'm thinking it would be best if cloud-init just ran the user-data script though. then we could solve * there.18:23
cetexI mean, just add a "bond0.xxxx" interface where xxxx is a vlan tag and do dhcp/static ip on it18:24
smosercetex: cloud-init doesn't currently really "hotplug" network stuff.18:48
smoserthat is on the roadmap but right now it is just first boot only.18:48
smosercetex: oh. and you're pxe booting too arent you18:50
smoserthis is kind of easier then.18:50
smoseryou can put seed on the kernel command line18:50
robjocould someone take a quick look at config/cc_update_etc_hosts please?21:22
robjothe doc string says when manage_etc_hosts is set to local host then 127.0.1.1 fqdn hostname will be added to the hosts file21:23
robjohowever, if the distro implementation does not overwrite _get_localhost_ip() then the IP is really 127.0.0.121:24
robjois that a typo or is the distro implementation expected to overwrite _get_localhost_ip() ?21:24
robjosmoser: are you around ^^^^21:28
naccrobjo: i think smoser is afk right now21:28
robjoblackboxsw: see above, thoughts?21:29
blackboxswrobjo: checking ... (muxing w/ a meeting right now)21:33
blackboxswrobjo: correct assessment by you21:40
robjoI'll fix the typo21:40
blackboxswlooks like debian (and thereforce ubuntu distro subclass) do update get_localhost_ip to  127.0.1.121:40
blackboxswbut centos,rhel,suse don't21:41
blackboxswrobjo: sorry, so ubuntu/debian is 127.0.1.1 rhel,centos,suse,freebsd use 127.0.0.121:42
* blackboxsw wonders how we really *want* this to behave on all distros (I'd like to have same behavior on all distros if it makes sense)21:43
blackboxswif you are updating the text robjo, I'll make sure we have a talk prior to landing the merge proposal to make sure behavior is what we expect/document on all distros  (if there are differences)21:46
robjoFor now I updated the doc, merge request comming21:46
blackboxsw+1 th21:46
blackboxsw+1 thx21:46
robjoblackboxsw: https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/33341821:47
robjoalso include fix for the suse hosts template expansion bug which is why I stumbled across this to begin with ;)21:47
blackboxswrobjo: will have a review for that by tomorrow. thx21:56
blackboxswbtw robjo we also have an issue on ubuntu in this space (I don't like the behavior if both fqdn & hostname are both provided) so we might have a follow-up that properly handles fqdn and hostname behavior shortly thereafter. will make sure to ping you on it for review/thoughts22:01
robjothanks, there's a test now, well for sles anyway :)22:02

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