[04:25] <TheFezzer> Hey there, does anyone know about using a Juju to deploy commercial software?
[04:25] <TheFezzer> Like, the potential legal ramifications?
[04:27] <TheFezzer> I work for a medium-sized n-tier application publisher and I'm interested in making charms with our products, but sometime soon I'm going to have to face the Dreaded Legal Review.
[04:57] <X-Rob> Hmmm. It would be REALLY NICE if you could make uvt-simplestream use a damn cache.
[04:57] <X-Rob> I don't know what it's like for you lot, but downloading images isn't anywhere near instant
[04:57] <X-Rob> and maas gives me a handy cache.
[04:58] <X-Rob> Oh, it -is- using the ache. But it's ignoring the 'dont' use a https source'
[04:59] <rick_h_> TheFezzer: charms you write are yours as far as license and such. So there's no reason you couldn't charm up your software and use it as a local charm
[05:00] <rick_h_> TheFezzer: if you want to chat on it more hit up maarten (maarten.ectors@canonical.com)
[05:00] <lazyPower> snap rick_h_ beat me to it
[05:00] <rick_h_> X-Rob: yea, that came up. We're supposed to look into providing charms over plain http (on our todo list).
[05:01] <rick_h_> I thoguht I saw some commit recently related..../me checks email log
[05:01] <X-Rob> rick_h_: That's not that bad. I dont' mind https'
[05:01] <X-Rob> for the charms
[05:01] <lazyPower> rick_h_: well.... doesnt that expose us to MITM?
[05:01] <rick_h_> lazyPower: right, which is why we've been hesitent
[05:01] <X-Rob> but for large chunks of data, having https is amazingly annoying
[05:01] <rick_h_> but so many chaching tools don't cache https ootb
[05:02] <X-Rob> rick_h_: you can't cache https
[05:02] <X-Rob> it's not like http, where you ask the proxy server to get a page, with https you say 'Connect to this IP address, give me all the data
[05:02] <rick_h_> right, you have to really proxy/cache
[05:02] <rick_h_> right, mitm yourlse
[05:02] <rick_h_> self
[05:02] <TheFezzer> Hey Rick, thanks for the response. The charm would not contain the software, just wget it as part of the start hook.
[05:03] <X-Rob> Mmmmm. OK,
[05:03] <X-Rob> https://github.com/juju/juju/blob/master/container/kvm/libvirt.go#L43
[05:03] <X-Rob> So that says that there's an OPTION for a source
[05:05] <rick_h_> X-Rob: damn if I can't find it sorry.
[05:06] <X-Rob> rick_h_: I do this, and this caches most stuff:
[05:06] <X-Rob> https://www.irccloud.com/pastebin/CYUOadac
[05:06] <rick_h_> X-Rob: but yes, know issue and something that annoys us as well with things like the orange boxes when squid fails cache as much as we'd like
[05:07] <rick_h_> X-Rob: very cool
[05:07] <X-Rob> But.. I can't seem to trace this damn source back
[05:07] <rick_h_> TheFezzer: lazyPower can hook you up if you want more detailed info or get you in the right direction
[05:07] <rick_h_> he's more on that side than myself tbh
[05:09] <X-Rob> rick_h_: So, here's a question. Why doesn't juju machine0 run a cache for this sort of stuff?
[05:09] <TheFezzer> ok, I just saw his Digital Ocean walkthrough, great work.
[05:11] <rick_h_> X-Rob: it's in the works, at least much of it is. The core folks have been working on a storage implementation to store stuff in the state servers, we'll be looking at doing some stuff in the charmstore itself to help, not sure on the streams. I don't tend to mess with them much
[05:11] <rick_h_> X-Rob: you could email the list and get tips/tricks and maybe better details on the status, but it's come up the last couple of sprints and I know we want to get to an offline story which will help with the cached story.
[05:20] <lazyPower> oo guess i should move irc ot my primary workspace
[05:20] <rick_h_> lol
[05:20] <rick_h_> lazyPower: get to work on your Sat night...I mean Sunday night
[05:20] <rick_h_> :P
[05:21] <lazyPower> dockering up my apps like a boss
[05:21] <lazyPower> testing this new stack i put together
[05:21] <lazyPower> <3 me some green field charms
[05:21] <rick_h_> heh
[05:22] <lazyPower> TheFezzer: we have some stuff cooking for ISV's that want to charm up their apps. i was working with MariaDB before the break to get their ENTERPRISE edition charmed up as an upgrade path in their community edition charm
[05:23] <lazyPower> TheFezzer: so if you want to move forward with building charms for your apps - we can most def. get you kicked off in the right direction - host a charm school for your team to get you moving, and do reviews as you work towards getting your charm in the charm store
[05:23] <TheFezzer> I am a Developer Advocate with a mid-size (but top tier IMHO) ISV and I'm charming up our lineup
[05:24] <TheFezzer> I've made charms for our 5 most popular apps, but they're not good yet
[05:24] <TheFezzer> i.e., not idempotent and the relationships don't relate yet
[05:25] <TheFezzer> we're in SF
[05:25] <lazyPower> TheFezzer: sounds awesome :) if/when you want someone to review them just reach out - https://jujucharms.com/docs/authors-charm-store#submitting  is a good first-tier checklist and walkthrough
[05:25] <TheFezzer> ok, so if I submit them to the charm store, I'm not releasing any rights or anything like that?
[05:26] <lazyPower> not at all - the charm code itself has to be an OSI approved license for inclusion - but the software it installs can be as proprietary as you need it to be
[05:26] <lazyPower> here's the policy doc on that: https://jujucharms.com/docs/authors-charm-policy
[05:26] <lazyPower> for example, MariaDB enterprise is very much proprietary - we included an extra license file and gave an upgrade path that depends on a config option of EULA acceptance
[05:27] <TheFezzer> the software is free to try so the charm will make a full featured server that's good for 90 days, and the charm itself is just simple bash scripting. If it needs configs, it will download them during install
[05:27] <lazyPower> without that option the upgrade-path no-op's until thats set to true.
[05:27] <lazyPower> so it can be as simple as including a .txt and adding a boolean config option
[05:27] <TheFezzer> ok, so I could do something like that for authentic Oracle JDK?
[05:28] <lazyPower> You are correct sir
[05:28] <lazyPower> we have a really stellar example in the IBM Websphere charm, let me fish that up for you
[05:28] <TheFezzer> I'm Charming JIRA, which is really picky about its jdk/jre
[05:29] <lazyPower> https://code.launchpad.net/~ibm-demo/charms/trusty/websphere-liberty/trunk
[05:29] <TheFezzer> using the WebUpD8 repo, but it seems like just throwing the flag in the start script is cheating... and Oracle has claws.
[05:29] <lazyPower> There are 2 licenses in there to accept, and the installation path in config-changed will give you a baseline of the logic you might need.
[05:30] <lazyPower> right, it has to be linked to the config option otherwise its very much claw worthy
[05:30] <TheFezzer> ok
[05:30] <lazyPower> and again - if you get a prototype done and would like a ~charmer review - we're here to help
[05:31] <TheFezzer> I have a prototype, but 'done' is not quite here yet
[05:31] <TheFezzer> I really need to understand the order of ops for the scripts.
[05:32] <lazyPower> TheFezzer: Thats the second time i've heard this - I'll add a card to get a flow-chart diagram for the order of hooks made and included ni the docs
[05:32] <TheFezzer> like when it comes online, it seems like START and CONFIG-CHANGED run... but when you make a relationship, does it run RELATIONSHIP-JOINED and RELATIONSHIP-CHANGED?
[05:33] <lazyPower> Relationship-joined runs with pretext of nothing has come over the wire, this is for you to install things like database adapters, or ancilliary software relating to the relationship (or do backups if you're changing app config to support the relationship)
[05:33]  * rick_h_ decides he should be in bed since it's now tomorrow, have a good night all
[05:34] <lazyPower> changed will run anytime a relation-set is sent on either side of the relationship, and can be run many times throughout the service/relation lifecycle
[05:34] <lazyPower> g'nigth rick_h_
[05:34] <lazyPower> see ya on monday
[05:34] <lazyPower> TheFezzer: and broken runs when the relationship is first `juju remove relation'd` - and has the pretext of doing things like backing up settings and preparing for reconfiguration of the application
[05:34] <TheFezzer> oh wait, wat? so if I fire three relation-set in a row, I get three relation-changed?
[05:35] <lazyPower> sure could
[05:35] <TheFezzer> oh wat
[05:35] <lazyPower> and it goes up on the order of N depending on how many units are in the service stack
[05:35] <lazyPower> say you have 3 mongodb units, and you relate them to rails
[05:35] <lazyPower> you'll get db-relation-changed hook firing 3 times, one for each unit
[05:35] <TheFezzer> no idea what that means
[05:35] <TheFezzer> oh, ok
[05:36] <TheFezzer> so on the mysql side it fires 9x, 3x for three relation-set and 3x for three nodes
[05:36] <TheFezzer> s/mysql/mongodb
[05:37] <lazyPower> it only fires 3x - each unit runs a relation-set during its relation-changed event.
[05:37] <TheFezzer> but each rails sees only 3x for three relation-set?
[05:37] <lazyPower> but if your application receives data and sends data back - mongodb will run its own relation-chagned event again
[05:37] <TheFezzer> ok, but if each one ran three? i did not see a way to set multiple.
[05:37] <TheFezzer> ok, so you could have a veritable conversation in the hooks. I like this.
[05:38] <lazyPower> would be easier to explain with a diagram so you can show which side is emitting the information.
[05:38] <lazyPower> but yeah - they can talk, and re-run hooks
[05:38] <lazyPower> the power of an event driven system :)
[05:38] <lazyPower> think of each charm as a state machine with no final step until it reaches teh stop hook.
[05:38] <lazyPower> you're constantly moving between states, and depending on context - will determine which state to enter/exit
[05:38] <TheFezzer> totally off topic, but I'm using the web client for IRC and it's terrible. I'm on mac. What should I be using for IRC?
[05:39] <lazyPower> no idea, i'm on ubuntu and i use quassel - but its crash happy on mac
[05:40] <lazyPower> http://www.codeux.com/textual/
[05:40] <lazyPower> this looks to be helpful as it expands images inline and what not
[05:40] <TheFezzer> ok, so if a relation is set, then changed is only run if joined hasa relation-set event?
[05:42] <lazyPower> it will run by default once on each end
[05:42] <TheFezzer> all right, I'm going to try it out. back in a sec.
[05:42] <lazyPower> TheFezzer: are you aware of juju debug-hooks?
[05:43] <lazyPower> you can trap event runs in a tmux session and run them interactively - this will help immensly with grokking whats going on during relationships
[05:43] <TheFezzer> Did I make it?
[05:43] <lazyPower> looks like it
[05:43] <TheFezzer> sweet
 TheFezzer: are you aware of juju debug-hooks?
 you can trap event runs in a tmux session and run them interactively - this will help immensly with grokking whats going on during relationships
[05:44] <TheFezzer> I tried debug-hooks, but I didn’t grok. I would keep hitting relation-set on one side expecting something to happen (or at least be visible in relation-get)
[05:45] <lazyPower> it wont trigger the data showing up on the other end until that hook is exited on the unit relation-settin'g the data
[05:45] <TheFezzer> oh!
[05:45] <lazyPower> this is when the changed hook will cycle a second time
[05:45] <lazyPower> so you exit on both sides
[05:45] <lazyPower> the other side receiving the info fires changed again, and your data is now present
[05:45] <TheFezzer> so… if one side sets multiple values in one run, then it only sets them at the end of the run, triggering the other side to run changed?
[05:45] <lazyPower> you'll see several charms that exit 0 when no data is present, as there are no actions to take without the data
[05:46] <lazyPower> correct
[05:46] <TheFezzer> nice.
[05:46] <TheFezzer> I think I get it.
[05:47] <TheFezzer> so if I set one in debug-hooks, I wouldn’t expect to see it until the hook exits /and then a new hook runs on the opposite side/.
[05:47] <lazyPower> you got it
[05:47]  * lazyPower raises the roof
[05:47] <TheFezzer> ok, and so then I’m guessing it’s convention to not set in  the joined hook?
[05:47] <lazyPower> you can
[05:47] <TheFezzer> y’all need a checklist of what each hook is to do
[05:47] <TheFezzer> ;)
[05:47] <lazyPower> but it wont be available in -joined on the other side
[05:47] <lazyPower> it will be available in -changed
[05:48] <lazyPower> (but i may be wrong, i havent actually set data in a joined hook)
[05:48] <lazyPower> the context of -joined is pretext work, they units aren't actually communicating yet
[05:48] <TheFezzer> it just sounds like not a thing to do. so… the settings are durable, right?
[05:49] <lazyPower> TheFezzer: but good point, could you file a bug report on that against teh docs? i'd love to get the feedback so we can improve the docs
[05:49] <lazyPower> https://github.com/juju/docs/issues
[05:49] <TheFezzer> I would not mind writing something up
[05:49] <TheFezzer> I could put in a PR or some text in the feature request
[05:49] <lazyPower> if you feel up to doing a PR that would be most excellent :)
[05:50] <lazyPower> get some review time on your concept comprehension to boot
[05:50] <TheFezzer> yes
[05:50] <lazyPower> i like where your head is at TheFezzer :) glad i stuck around tonight
[05:52] <TheFezzer> :D
[05:52] <TheFezzer> I’m a newly minted Dev Advocate and it’s time for me to get out there and actually do the work of advocating.
[05:53] <TheFezzer> gah, the Github interface seems so backwards to me. Where the heck is that clone link? ;)
[05:53] <lazyPower> fork it
[05:53] <lazyPower> best way to do it, then the clone link is on the right hand side
[05:54] <lazyPower> tehre's a guide to contributing in the readme
[05:58] <TheFezzer> ok, cool
[06:02] <lazyPower> allright, 1am seems like a good time for me to head out an dhead to bed
[06:02] <lazyPower> best of luck to ya Fezzer
[06:02] <TheFezzer> good night, thank you for your help.
[06:10] <X-Rob> .. .So, I had an idea re uvt-simplestream. Why don't I manually run it on the machine with a http://  url before I do anything? That'll sync it, AND pull it from the local proxy. If it needs to update, it'll update via the proxy.
[06:10] <X-Rob> This is what I'm doing now.
[06:10] <X-Rob> https://www.irccloud.com/pastebin/mJOZEgpA
[07:00] <X-Rob> Yep. That seems to work
[07:00] <X-Rob> Except.. I downloaded daily instead of release. Sigh.
[07:37] <TheFezzer> So… it seems like whenever one of my apps connects to another app, its proxied through the central server. is there a way to avoid this?
[08:08] <X-Rob> TheFezzer: 'connects' and which central server?
[08:09] <X-Rob> connects how? curl? socket?
[08:09] <TheFezzer> hmm, not sure
[08:10] <TheFezzer> I should look at the code
[08:10] <X-Rob> TheFezzer: so what's making you think it's going via a central server?
[08:10] <TheFezzer> well, the host has an IP whitelist, and I set it for 10.0.3.26. But then I send .26 off to register, and I get the “No connection allowed from 10.0.3.1 403”
[08:11] <TheFezzer> so… (shrug)
[08:11] <X-Rob> is it a web connection? http?
[08:11] <TheFezzer> ehrm… should be http
[08:11] <TheFezzer> from a tomcat to a tomcat
[08:11] <X-Rob> by any chance did you deploy via MaaS?
[08:11] <TheFezzer> it’s Vagrant on OSX/Yosemite
[08:12] <X-Rob> Hmm
[08:12] <X-Rob> Well anyway, I'm guessing it's your http_proxy environment variables.
[08:12] <TheFezzer> in which env, Vagrant or the host?
[08:12] <X-Rob> that 10.0.3.1 host
[08:12] <X-Rob> is that juju's machine0?
[08:13] <TheFezzer> I presume. brb.
[08:13] <TheFezzer> um, juju status lists 0 as ‘localhost’
[08:14] <X-Rob> so what host is that IP address?
[08:15] <TheFezzer> that is the vagrant host machine, which would be the ‘localhost’ from juju status
[08:15] <X-Rob> ahha, ok, so yeah that's machine0.
[08:15] <TheFezzer> ok
[08:15] <X-Rob> I'm guessing that vagrant installs a proxy
[08:16] <X-Rob> most commonly this is propogated through http_proxy environment variables
[08:16] <X-Rob> if you want to ssh to one of your clients
[08:16] <TheFezzer> I’m ssh’d to a couple
[08:16] <X-Rob> you can 'cat' the /proc/pid/environ file
[08:16] <TheFezzer> hacking out charm scripts, as it were
[08:16] <X-Rob> that'll show you all the environment variables for that process
[08:17] <X-Rob> so check the tomcat process
[08:17] <X-Rob> see if it has a http_proxy variable
[08:17] <TheFezzer> hmm
[08:17] <TheFezzer> ubuntu@vagrant-local-machine-5:~$ sudo cat /proc/pid/environ
[08:17] <TheFezzer> cat: /proc/pid/environ: No such file or directory
[08:17] <X-Rob> you need to change 'pid' to be the pid
[08:18] <X-Rob> process id
[08:18] <TheFezzer> derp
[08:18] <X-Rob> of the tomcat process
[08:18] <TheFezzer> ok
[08:21] <TheFezzer> hmm, don’t see one
[09:41] <X-Rob> juju run --machine $BAY2,$BAY3,$BAY4 "sudo apt-get -y install uvtool-libvirt"
[09:41] <X-Rob> juju run --machine $BAY2,$BAY3,$BAY4 "sudo reboot"
[09:41] <X-Rob> juju run --machine $BAY2,$BAY3,$BAY4 "sudo -E uvt-simplestreams-libvirt sync --source http://cloud-images.ubuntu.com/releases/ release=trusty arch=amd64"
[09:41] <X-Rob> Thse previous lines will pre-load the libvirt cache from the proxy. Yay.
[09:42] <X-Rob> I realise that probably no-one else cares about this 8)
[22:34] <X-Rob> Geez.
[22:34] <X-Rob> I swear that the people who wrote this stuff haven't actually used anything in the real world.
[22:35] <X-Rob> https://bugs.launchpad.net/charms/+source/hacluster/+bug/1409548
[22:35] <mup> Bug #1409548: Multicast Address isn't randomized <hacluster (Juju Charms Collection):New> <https://launchpad.net/bugs/1409548>