/srv/irclogs.ubuntu.com/2015/06/17/#juju.txt

=== kadams54 is now known as kadams54-away
=== anthonyf is now known as Guest33778
=== kadams54 is now known as kadams54-away
dimiterncharmers o/07:31
dimiternanyone around?07:31
dimiternI'm thinking of creating a simple subordinate charm that has actions returning various networking settings - iptables, routes, etc.07:31
dimiternSo, can a subordinate have actions of its own?07:31
lazyPowerdimitern: it can08:00
dimiternlazyPower, yeah, I've even found a good example with the chaos monkey08:01
dimitern:)08:01
lazyPower+1 for that08:02
=== mgz is now known as mgz_
dimiternlazyPower, hey, still around?11:05
lazyPowero/ dimitern11:05
dimiternlazyPower, I have a couple of actions questions if you have some time11:06
lazyPowersurely11:06
dimiternlazyPower, so is there an accepted way to implement an action like "run something and get me the output" ?11:07
dimiternlazyPower, like, should the output be a param? or it could be dumped (without extra YAML) by action do / fetch11:07
lazyPoweri dont think the output necessarily needs to be a param unless you need dynamic output data. action-set will take care of giving you the data points you care about.11:08
lazyPowera really good overview of this can be seen by the benchmark actions marco's team implemented. let me fish up one, 1 sec11:08
dimiternah, that'll definitely help11:08
lazyPowerhttps://github.com/juju-solutions/siege11:08
lazyPowernotables: siege is paramterized, the output is parsed from json and stashed in the action dictionary for the run11:09
lazyPowerthat should get you a good start w/ how to implement a well-defined action, and have meaningful results available to consume outside of your env.11:09
dimiternthanks a lot! I'll look at that in detail11:10
marcoceppidimitern: you should never just dump yaml11:11
marcoceppidimitern: use action-set instead to relay data back11:11
lazyPowermorning marcoceppi11:12
dimiternmarcoceppi, but action-set returns YAML (or JSON I guess) - is there a way to dump a given param as-is?11:12
lazyPoweraction-set returns something? thats news...11:13
dimiternlazyPower, sorry, I meant juju action fetch <ID>11:13
lazyPowerdimitern: did you mean juju action fetch?11:13
lazyPowerok11:13
lazyPower:)11:13
dimitern:)11:13
lazyPoweri was like "uh oh, what changed"11:13
lazyPoweryeah, no the fetch aiui returns the full data  feed, you cannot narrow it down to specific keys without parsing it11:14
lazyPowermaybe in a future revision?11:14
dimiternright, well if it does - it does, I'll parse it then :)11:14
lazyPowersome fancy jq combined with --format=json11:14
dimiternyeah, it'll help to have "juju action fetch <ID> [param], returning only that part of the results11:15
dimiternlazyPower, so no concept of "output params", e.g. in that example doing a db backup and taking outfile=foo.tar.bz211:16
dimiternthis won't actually mean foo.tar.bz2 will be created in the $PWD where you run juju action fetch11:17
lazyPoweri would suggest you provide fullpath to foo.tar.bz2, that way you can parse that key and pipe that to juju scp11:17
dimiternright11:18
lazyPowerBut i dont think its possible to set file contents like that and have it automagically fetched. its a 2 step process11:18
lazyPowerrun proc, get data, action on data.11:18
dimiternyeah, unless fetch provides the sync-point where the foo.tar.bz2 gets created when fetch is called in a certain way11:19
dimiternlazyPower, the tip about jq is awesome though!11:21
dimiternthanks :)11:21
lazyPowernp happy to help dimitern :)11:25
=== kadams54 is now known as kadams54-away
lazyPowermarcoceppi: silly question, i know how to trigger relations on another host out of band, eg: mysql:17 - but if i'm same host, and in a different relationship context - are there any amenities to help me kick off a *-relation-changed event aside from caching relation data thats missing, and stuffing that in a direct execution to the hook?12:39
marcoceppilazyPower: you mean, kick off a relationship on the same unit that you're currently running a hook?12:40
lazyPoweryeah. I'm in a position to proxy data between hook contexts12:41
marcoceppilazyPower: like, service foo has  a bar and baz relation, kick off bar from the baz relation?12:41
lazyPoweryep12:41
marcoceppinot really, just need to abstract away the underlying code for bar so that it's invokable from baz, like a pyhton method12:41
lazyPowerwhen i relation_set(baz, mydata) - it triggers execution on the remote host, not the same host.12:41
marcoceppiright12:41
lazyPowerok, i figured taht would be the case12:42
* lazyPower snaps12:42
lazyPowerfg12:43
marcoceppibg12:47
=== anthonyf is now known as Guest64410
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== zerick_ is now known as zerick
=== natefinch_ is now known as natefinch
=== liam_ is now known as Guest13658
=== scuttlemonkey is now known as scuttle|afk
=== ayr_ton is now known as ayr-ton
=== dmellado_ is now known as dmellado
=== scuttle|afk is now known as scuttlemonkey
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
marlincIs it possible to take advantage of OpenStack security groups when using Juju to deploy services?21:08
jrwrenmarlinc: to what end?21:14
marlincWell I would like to setup security groups to firewall off some machine parts21:14
marlincLike giving a webserver only access to the ports that NFS uses for storage21:15
marlincAnd its only possible to for example access the webserver on port 8021:15
jrwrenmarlinc: i cannot answer. sorry.21:18
marlincNo problem21:19
=== kadams54 is now known as kadams54-away
=== dmellado_ is now known as dmellado
=== kadams54 is now known as kadams54-away
=== JoshStrobl is now known as JoshStrobl|afk

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