/srv/irclogs.ubuntu.com/2012/07/13/#juju.txt

hazmatSpamapS, knock, knock03:25
hazmatSpamapS, re debug hooks, wtf03:25
* hazmat has been doing travel and presentations03:26
hazmatSpamapS, can give you me a recipe to reproduce03:26
hazmatdebug hooks only effects a single unit03:26
hazmatand if your disconnected when the hooks are enabled, the user still need to connect back to end the session03:27
SpamapShazmat: yes I have a recipe, been working on it04:14
SpamapShazmat: juju deploy wordpress ; juju deploy mysql ; juju debug-hooks mysql/0 ; juju add-relation wordpress mysql ; [manually do all the hooks then disconnect] ; juju remove-relation wordpress mysql ; juju add-relation wordpress mysql04:17
SpamapShazmat: when I did it, mysql/0 no longer fired joined/changed hooks (broken still went)04:17
SpamapSbut I may have the steps wrong04:17
SpamapSI'm in the middle of something else entirely04:17
=== zyga-afk is now known as zyga
=== fenris is now known as Guest73296
=== al-maisan is now known as almaisan-away
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
=== zyga is now known as zyga-food
=== zyga-food is now known as zyga
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
* SpamapS is *so* close with nagios+nrpe+generic interface15:49
=== jimbaker` is now known as jimbaker
_mup_Bug #1024447 was filed: Local provider should provide options for bind mounting as a charm delivery method <juju:Confirmed> < https://launchpad.net/bugs/1024447 >15:58
negronjl'morning all16:09
imbrandonheya negronjl16:10
negronjlimbrandon: o/16:11
hazmatimbrandon, thanks btw for pushing that out :-)16:12
* imbrandon hoped you would not be mad ... 16:12
hazmatimbrandon, i'm hoping that will be enough of a push that i can push the code out for jujucharms.com, and i needed the knudge myself to start that process16:13
hazmatimbrandon, not mad at all16:13
hazmathappy even16:13
imbrandonsweet :)16:13
imbrandonyea i actually set it up so that even though yours is python and this is php that the mongo select logic and the views *might* be able to be shared16:14
SpamapSset based design ftw16:15
hazmatimbrandon, i'm doubtful of that, but maybe, the mongo structure for jujucharms predates charmload stuff16:15
imbrandonahh16:15
hazmatthey happen to match up though in db and collection names16:16
imbrandonheh yea , they are pretty generic "juju" and "charms"16:17
imbrandoncollisoins are sure to ahppen16:17
imbrandonthe views are just like django templates tho, like litrally16:18
imbrandonhttp://bazaar.launchpad.net/~imbrandon/jujube/trunk/view/head:/includes/templates/base.html16:18
imbrandonhttp://bazaar.launchpad.net/~imbrandon/jujube/trunk/view/head:/includes/templates/index.html16:18
hazmatimbrandon, that's cool, but fwiw jujucharms.com isn't django based, its pyramid based and uses chameleon/zopepagetemplates.16:18
imbrandonahhh, never seen those :)16:19
imbrandonmight have to check into them later16:19
hazmatimbrandon, its a slightly different template style that emphasizes valid html for templates16:19
imbrandonyea these are "Twig" templates, i love em16:19
hazmatah.. i was wondering16:19
imbrandonTwig for the templates and Slim for the routing16:20
imbrandoneverything else is home grown16:20
imbrandonwell and bootstrap for the css :)16:21
bguptahazmat: hello!16:21
bkerensajcastro: yo so nathwill did two charms and I guess didnt get a mug/shirt because it was during UDS? is that still going? he live here in pdx and hopes to meet ya at OSCON16:22
hazmatbgupta, greetings16:22
bguptaSO was gonn aplay on my mac (I know).  and saw the instructions require brew, but I use macports. Are there install instructions somewhere that don't require brew?16:23
hazmatbgupta, how late did you guys stay at the bar?16:23
imbrandonbgupta: yup16:23
imbrandonbgupta: yup one sec, just not got them put up yet, give me a moment16:23
bguptahazmat: pretty late.. guessing 11:30ish..16:24
imbrandonbgupta: https://github.com/downloads/jujutools/jujutools.github.com/Install%20juju.zip16:24
imbrandonthat should give you http://cl.ly/Htjg16:25
hazmatbgupta, its pretty much straightforward to just use virtualenv, once you get python-zookeeper installed.... outside of that its just twisted, yaml, txaws, and bzr branch lp:juju && python setup.py develop16:25
imbrandonbgupta: the only pre-req is XCode ( gcc )16:25
imbrandonhazmat: there is a static zkpython module i use on the mac , makes it MUCH easier16:26
imbrandonspecially since ZK really isnt needed on the client for mac ( no lxc )16:26
hazmatimbrandon, yeah.. zc-static-zookeeper does the magic16:26
imbrandonyup yup16:26
hazmatthe mozilla services folks are maintaining it16:26
imbrandonbgupta: https://github.com/downloads/jujutools/jujutools.github.com/Install%20juju.zip16:26
imbrandondoh16:26
m_3new release of jitsu otw now... lemme know if there's anything else pending16:27
hazmatm_3, thanks.. that should help folks asking about deploy-to/import/export16:27
* imbrandon waves to m_3 16:28
imbrandonyea i havent got to try any of that yet, /me should do that today16:28
imbrandoni'm way way behind on my jitsu foo16:28
m_3I think I might be more excited about import/export.. some cool ramifications there16:29
m_3but we'll see16:29
* m_3 waves back16:29
hazmatm_3, imbrandon i think it would be nice if import could also bootstrap the new env if its not already bootstrapped, atm it requires the new env to already be running/bootstrapped.16:34
m_3hazmat: agree16:35
hazmatbut even then its nice to be able to jitsu export -e dev | jitsu import -e stage16:35
m_3yup... that's the magic sauce16:35
m_3I'll be trying out variations of that this weekend16:36
imbrandonohhh yea16:38
imbrandongood call16:38
negronjlm_3, hazmat: ... and both of those features sailed through the review process with absolutely no drama either :)16:38
m_3unhuh16:38
imbrandonwell it is jitsu16:38
imbrandon:)16:38
SpamapSwhat review process? ;)16:39
imbrandonheh16:39
m_3hey... very careful review process... "Is it cool?"  "Is it twisted?"16:40
imbrandonbgupta: feedback on that installer is more than welcomed too, only about 2 oth ppl have used it so far16:40
imbrandoni havent really "announced" it yet16:40
imbrandon:)16:40
bguptasure..16:44
imbrandonoh and i have NO idea if it work on 10.5 or lower, i only tested on 10.6 .7 and .816:44
imbrandonfyi16:44
bguptafirst feedback is that it "seems" to install in the same directory structure that Macports uses16:44
imbrandonit should use the system dirs, as it realy only runs "sudo python setup.py install" once it verifies prereqs16:45
imbrandonyou can see the exact commands its running after words in /tmp/juju-installer.sh16:45
imbrandonor similar ( sorry not on OSX atm to check )16:46
imbrandonbut the meat of it is just a gui on that shell script16:46
imbrandonbut yea if you have python from macports or fink etc it will use those etc16:50
imbrandonmmmm .... XCode 4.4 GM Seed is on the Apple Developer downloads now , that means OS X 10.8 GM Seed is also there somewhere burried , and that means only a few days Until 10.8 is officialy released16:56
bguptaimbrandon: mmm.. thinking that we should add to macports repo, for macports user. (It's picking up easy_install from system python, but then using macports python for the actual juju install17:04
imbrandonbgupta: sure, but that means your PYTHONPATH or python in general is not setup corectly on your system17:05
hazmatm_3, looks like the upload failed.. https://launchpadlibrarian.net/110044309/upload_3949379_log.txt17:05
imbrandonbgupta: as its using whats in the $PATH and python and easy_install should both be from the same python install in the $PATH or you have lots of small errors17:06
bguptaprobably not. Python isn't a language I work in and is probably only pulled in macports wise to satisfy deps for other macports packages17:06
imbrandonbgupta: ahh yea after you install python from macports or fink or brew you need to do some $PATH magic manually that is normally only in the Readme burried17:07
imbrandonin /etc/profile , to make everything happy17:07
m_3hazmat: yeah, I'm trying to figure out what happened17:07
imbrandonbgupta: short awnser for the moment to fix you up is ...17:08
imbrandonbgupta: edit the /tmp/juju-installer.sh by hand and where it calls easy_install , make it use the full path for the one you want /opt/bin/... etc17:08
imbrandonthat will fix you up for now, but i would look into fixing your python correctly for the long run17:09
imbrandonoh once you edit the shell script , run the shell script, as if you run the GUI again it will overite it17:09
imbrandonheh17:10
imbrandonbut really a macport formula would just be the contents of that file as well :)17:10
* imbrandon stoped using macports about 2 years ago when it stoped getting updated tho17:11
m_3hazmat: I think it's good... looks like there were two builds triggered in a row.  first passed, second failed.  the ppa appears to have it17:14
hazmatm_3, cool, thanks again for taking care of that17:14
m_3SpamapS: any clue why the uploaders are different in juju-jitsu on https://launchpad.net/~juju/+archive/pkgs?field.series_filter=17:15
imbrandononce kicked off by recipy and one manually ?17:16
imbrandonhazmat: btw http://jujube.websitedevops.com/raw <-- the charmload schema17:18
hazmatimbrandon, yeah.. i check it out, its pretty similiar17:20
imbrandoncool cool17:20
SpamapSm_3: the uploader is the owner of the recipe in most cases17:23
SpamapSm_3: so perhaps you accidentlaly tok over the recipe?17:23
m_3SpamapS: but it's different between series in the same build request17:24
m_3recipe ownership still looks like juju-hackers17:25
m_3afaict it looks like it built twice, the first passed for all (O,P,Q) but failed the second time (unsurprisingly b/c of orig tarballs)17:26
SpamapSahh17:28
SpamapSyeah I just saw the failed ot upload17:28
SpamapSm_3: not sure, but I don't sense any disturbance in the force.. ok I think you are17:28
m_3I must've kicked it off twice accidentally17:28
m_3yeah, it looks like the ppa is good (tested it for precise)17:29
=== salgado is now known as salgado-lunch
=== salgado-lunch is now known as salgado
sn_bsgso we don't really know what we're doing, but we are trying to set up openstack using juju, and the nova-volume charm seems to be missing (the juju charms page agrees). so, um, what does that mean, and should we expect it to come back?19:22
m_3sn_bsg: I'm not sure what's going on there... the charmstore seems to not be happy with that one.  I'd recommend grabbing it directly from http://jujucharms.com/charms/precise/nova-volume (or https://bazaar.launchpad.net/~charmers/charms/precise/nova-volume/trunk/files)19:27
m_3sn_bsg: your deploy for that one will need to change to specify a local repository... i.e., `juju deploy --repository ~/charms local:nova-volume`19:28
m_3(assumes it's in ~/charms/precise/nova-volume)19:29
marcoceppiimbrandon: does Jujube have an API endpoint for the charm data?20:18
negronjlWho's reviewing today ?22:01
SpamapSnegronjl: not sure but I'm looking at your haproxy MP22:04
negronjlSpamapS: nice ...22:04
negronjlSpamapS: let me know what we broke :)22:04
SpamapSnegronjl: next official reviewer is m_3 next Tuesday22:05
SpamapSbut I bet he'll be busy w/ oscon stuff22:05
negronjlSpamapS: I was hoping for a charitable soul to review the haproxy MP :)22:05
SpamapSnegronjl: lots of new knobs :)22:05
negronjlI don't think it would be appropriate for me to review my own code :D22:05
SpamapSnegronjl: not sure I see the value of setting the user/group22:06
negronjlSpamapS: But it is also backwards compatible22:06
negronjlSpamapS: All the switches are there to satisfy ( among other things ) Canonical/IS22:06
negronjlSpamapS: Trying to make it so they can use it22:06
negronjlSpamapS: plus, I figured since, I am making so many switches ... mind as well go switch crazy :)22:07
SpamapSah22:07
SpamapSI like most of the others22:07
SpamapSvery glad you have monitoring ability22:08
SpamapSthats huge22:08
SpamapSto be able to toggle it on/off22:08
negronjl...and with ssh proxy, you can monitor the thing ( it also creates a random password if you leave it as changeme )22:09
SpamapSI'm a little puzzled by services22:09
negronjlit's a bit overwhelming but, the thing on it is the ability to create multiple services22:09
negronjlie:  my_service:80 my_other_service:44322:09
negronjlI take that argument as a string and then parse ( in code ) as yaml....22:10
negronjlthat gives me a list of services22:10
SpamapSbut how do you then assign backends to those?22:10
SpamapSnegronjl: the python in hooks.py reads really nicely btw22:11
negronjlSpamapS: thx ... PITA to make it PEP8 compliant22:11
SpamapSI'm about to unleash some nagios stuff that I think will horrify people with its pythonic insanity22:12
negronjltoo bad pylint still thinks it's crap though ... lol22:12
SpamapStempted to rewrite a lot of it for a *third* time just so its readable22:12
negronjloooh...nagios ... was thinking that we could use a nagios sub for this haproxy thing22:13
SpamapSnegronjl: a lot of this would be really handy as charm helpers btw22:13
negronjlSpamapS: working on a python charm helpers already too :)22:13
SpamapSnegronjl: nagios sub?22:13
negronjlSpamapS: I thought so too22:13
SpamapSnegronjl: note that there are already some python charm helpers in progress22:13
negronjlSpamapS: nagios subordinate to attach to haproxy so it can be monitored22:13
SpamapSstalled on my insistance that they package their python modules :)22:13
negronjlSpamapS: Who's working on them22:14
SpamapSnegronjl: I have an NRPE sub right now22:14
SpamapSnegronjl: and I'm developing a generic monitoring interface so charms can just declare the things they want monitored22:14
negronjlSpamapS: re: NRPE cool ... I'll check it out ... re: python charm helper .. who's working on that .. woudl like to contribute22:14
negronjlSpamapS: nice22:14
SpamapSnegronjl: yellow squad did it I think22:15
negronjlSpamapS: I'll wait for that before doing any monitoring thing22:15
negronjlSpamapS: ok...thx22:15
negronjlSpamapS: wrote thos "covenience" functions with the intention of putting them in a helper somewhere22:15
negronjls/thos/those22:15
negronjlSpamapS: the services option in config.yaml could be used like this: http://pastebin.ubuntu.com/1090650/22:17
SpamapSnegronjl: honestly, the ones you have here are great.. I think they may have abstracted too much22:17
negronjlSpamapS: The idea on that was to not to have much code duplication so if ( or when ) I had to change logic, I wouldn't have to change it in multiple places.22:18
negronjlSpamapS: It just makes things easier for me ...22:18
negronjlSpamapS: plus ... it's easier for my simple brain to deal with smaller chunks of code :)22:19
SpamapShttps://code.launchpad.net/~gmb/charm-tools/add-charm-helpers/+merge/9620422:20
SpamapSnegronjl: the issue is that they made shelltoolbox its own thing.. and I think it would be better to just get rid of that and call subprocess directly in private methods22:21
SpamapSbecause I keep failing to find the time to package shelltoolbox22:21
SpamapSnegronjl: these are actually different entirely.. so they'd mesh well with your stuff22:22
negronjlSpamapS: I just read the code ... interesting ...  I'll see about using that in the future and providing some of my functions as well22:24
SpamapSnegronjl: hrm.. this service_name thing.. Hrm..22:25
negronjlSpamapS: err... which one ?22:26
SpamapSnegronjl: the thing you added to http as an optional field22:26
SpamapSI think thats abusing the interface a bit22:26
negronjlSpamapS: Are you in the hook or config.yaml ?22:26
SpamapSnegronjl: hooks.py22:27
negronjlSpamapS: checking22:27
SpamapSnegronjl: I get now how services works..22:27
SpamapSand why its done that way22:27
SpamapSjust not sure if I like how thats being used22:27
SpamapSI'd rather see services created dynamically22:27
SpamapSperhaps there's a reason you don't want to do that?22:28
negronjlwell ...22:28
negronjlthe services are being created dynamically22:28
negronjlthe service bits ( the listen stanza ) for each service is written as a separate chunk as there is no way for config-changed to know about the relation information22:29
SpamapSwell thats not entirely true. :)22:29
negronjlso, to work around that, I have the services being written to disk and the read ( from config-changed )22:29
SpamapSconfig-changed can be deferred until relations are established22:30
negronjlin config-changed, i was getting a trace about not having relation information22:30
SpamapSor rather, relation data is always available22:30
SpamapSdid you not use 'relation-ids' ?22:30
SpamapSthats the key22:30
SpamapSits new..22:30
SpamapSbut its really powerful22:30
negronjldidn't use relation-id ..22:31
negronjlI guess I'm outdated ... tell me how relation-id would have helped ?22:31
SpamapSyou can access relation info from any hook22:32
SpamapSas long as you pass in the relation id22:32
negronjlthere is no relation information on first run of config-changed22:32
SpamapSright22:32
SpamapSso in that case, you just exit 022:32
SpamapSthen after each relation hook, you run it again22:33
negronjlI'm doing something somewhat similar....22:33
negronjlI wrapped it around try/except22:33
negronjland pass22:33
negronjl.... and then move it along22:33
SpamapSyeah I think I see how that works22:33
SpamapSthis is sort of the old way, but its quite reliable. You're just writing what you have to disk, and then generating configs from that22:34
SpamapSI'm not questioning that.. but rather why the 'services' thing is needed22:34
mthaddonSpamapS: do you mean why we're specifying it in the config.yaml rather than on the command line to add new services as needed?22:35
SpamapSnegronjl: what I'm trying to understand (please bear with me my head is pounding from lack of caffeine.. ) is why you can't just generate a service that isn't around...22:35
SpamapShooks.py line 45722:36
negronjlSpamapS: checking22:36
SpamapSalso I wouldn't call it service_name22:36
SpamapSbut 'http_host'22:36
SpamapSor 'endpoint_host'22:36
SpamapSand I would generate a service per unique endpoint_host22:36
SpamapSbut maybe you have a good reason not to do that22:36
negronjlSpamapS: service_name is different than the host-name22:37
negronjlSpamapS: service_name is just an arbitrary name22:37
negronjlSpamapS: listen <service_name> <endoint/host/ip>:<port>22:37
negronjlSpamapS: just making sure we are talking about the same thing22:37
SpamapSright, I'm saying that it should be on the *backends* not defined by the config.yaml option22:38
negronjlSpamapS: If I do it on the backends ( which was our initial thought ) I would brake backwards compatibility with the existing haproxy and that would be bad22:38
negronjlSpamapS: also, having control of what services are managed in the service is something that seems to be valuable22:39
SpamapSlike, 'juju deploy wordpress --constraints='mem=500M' wpskinny ; juju deploy wordpress --constraints='mem=2G' wpfat ; juju set wpskinny endpoint-host='www.mywebsite.com' ; juju set wpfat endpoint-host='www.mywebsite.com'22:39
SpamapSThen any load balancer that I relate those two services to will listen on www.mywebsite.com22:40
SpamapSNow, if I leave it off.. we can talk about ways to split those out...22:40
SpamapSnegronjl: it can stay optional can't it?22:40
SpamapSnegronjl: like if its not provided it just goes in the "default" server22:40
SpamapSnegronjl: I guess my point is that service_name seems a bit arbitrary22:41
negronjlSpamapS: give me a sec... let me catch up :)22:41
negronjlSpamapS: ok ... re:service_name it is arbitrary22:41
negronjlSpamapS: the service_host could be specified or "deduced"22:41
mthaddonSpamapS: sorry, how is it arbitrary? you're using that as a way of grouping a service, and then the backend just has to specify which service_name it wants to connect to22:42
SpamapSI don't like arbitrary in this case because it means now every loadbalancer charm has to map it. Hostname is more natural... don't you think?22:42
negronjlSpamapS: the service ( read listen stanza ) parameters are something that seems to be good to know before deployment22:42
SpamapSI'm just wondering if there's ever a time when that is not the desired listen hostname22:42
SpamapSI actually have to run in a minute22:42
negronjlSpamapS: ok ...22:43
negronjlSpamapS: service_name is arbitrary in the sense that it can be whatever service name you want ...22:43
negronjlSpamapS: service_name is not being used as an endpoint ....22:43
negronjlSpamapS: I do get the endpoint angle but, I haven't seen haproxy used in such a manner before so I didn't think of attaching a hostname to the service name22:44
negronjlSpamapS: because it could collide22:44
SpamapSmthaddon: indeed, its a good concept. I'm just worried about using arbitrary things in the very generic "http" interface... lets consider the non loadbalancer case.. like, a security proxy... I haven't thought through what it would do or whether or not it would be useful22:44
negronjlSpamapS: if you have www.mysite.com for both 80 and 44322:44
SpamapSnegronjl: haproxy can do "name based" virtual hosts in http mode22:44
negronjlSpamapS: but, those would be specified in the options22:45
negronjlSpamapS: which would also be different from the service_name22:45
SpamapSnegronjl: I'm going to think a lot about this over the weekend, and I may even try to add it to something like mod_security or squid... just to see if it makes sense and doesn't cause problems to implement/not implement22:45
mthaddonyep, that's my understanding too22:45
negronjlSpamapS: by having service_names decoupled from hostnames, we provide more flexibility .22:45
SpamapSyeah thats exactly what I'm worried about22:45
negronjlSpamapS: ack ... it's a big and hairy change so, more time to play with it will be needed ...22:46
SpamapSflexibility means more things to break22:46
SpamapSnegronjl: the rest of it thus far looks fantastic22:46
SpamapSanyway, I'm late.. ttyl22:46
negronjlSpamapS: ... the only thing that could break with arbitrary service_names would be collissions on the services ( two services with the same names )22:46
negronjlSpamapS: ttyl ..22:46
mthaddonnegronjl: oh, good point - I'm not sure we'd deal with that too well currently22:46
mthaddonwe are kind of relying on people not to shoot themselves in the foot... I'm not sure how far we would want to go in protecting from that22:47
negronjlmthaddon: service_name collisions ?22:47
mthaddonyeah22:47
mthaddonbut we do do a config check and bail out if it fails, so that might guard against service_name collisions22:48
negronjlmthaddon: we really can't do much about it....if you declare two services with the same name...the second entry will corrupt services_dict and bail22:48
mthaddonyep22:48
negronjlmthaddon: or .. the second service will override the first22:49
negronjlmthaddon: leaving you with just one service as opposed to the desired two22:49
mthaddonyeah, I think you're right - it'll just overwrite the first as we loop through creating the dict22:49
negronjlmthaddon: yup ... when we read the services ( the yaml thing from config.yaml ), it comes as a list22:50
negronjlmthaddon: once we parse that out to services_dict ... we'll override the first with the second22:50
negronjlmthaddon: indeed bad things could happen ( all your servers in the same service ).22:50
* mthaddon nods22:50
negronjlhave a good weekend all23:05
mthaddono/23:06

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