/srv/irclogs.ubuntu.com/2014/11/07/#juju.txt

=== CyberJacob is now known as CyberJacob|Away
skayI don't have unit-get or config-get commands on my system, should those get installed with juju 1.20.x?00:24
skaythe docs talk about the commands, https://juju.ubuntu.com/docs/authors-hook-environment.html but I don't ahve them00:24
skayit looks like those were in juju 0.700:32
tvansteenburghskay those are only available in the context of an executing charm hook00:34
skaytvansteenburgh: thanks. I was confused. relatively new. I'm reading through http://askubuntu.com/questions/504482/how-do-i-add-a-relationship-between-two-charms-to-pass-information-between-them00:36
skayand wanted to try out some of the commands interactively and didn't realize I couldn't00:36
tvansteenburghskay: no prob, pretty sure we were all new and confused at some point00:36
tvansteenburghnow we're just confused00:36
skayis there a juju repl?00:39
tvansteenburghskay, no00:39
skaylogging ftw00:40
* tvansteenburgh wanders off to play with the kids, bbl00:41
skaycheers00:44
skayalso, I read some more, and https://juju.ubuntu.com/docs/authors-hook-debug.html gives me something like a REPL for playing with hooks00:44
skayso that's good00:44
joseskay: if you have any questions, just ask :)01:59
=== axw_ is now known as axw
=== kadams54 is now known as kadams54-away
=== urulama__ is now known as urulama
=== urulama is now known as urulama__|home|
=== CyberJacob|Away is now known as CyberJacob
=== liam_ is now known as Guest18751
=== CyberJacob is now known as CyberJacob|Away
=== liam_ is now known as Guest78079
ayr-tonTheres some plans out there to integrate juju with core os? Feels interesting. We could make a session at UOS.13:32
=== urulama__|home| is now known as urulama
=== liam_ is now known as Guest54104
=== Guest64490 is now known as rcj
=== rcj is now known as Guest51252
=== Guest51252 is now known as rcj_bumped
whitwhen automatically generating a user and a password, does anybody have a good method for exposing that information to someone deploying the charm?15:42
* whit imagine actions would be good this in the future15:42
whitfor example, I'm deploying graphite, but don't want to hardwire the admin pw on user creation15:43
lazyPowerwhit: the recommended path is to build a handler script for juju run - to satisfy today15:46
lazyPowerand yes, actions will be the preferred method once that lands15:46
whitlazyPower, ah cool makes sense15:46
lazyPowerwhit: inversely, a lot of the charms expose that as a config option.. but as the charm author its authors flavor on how to handle password generation/retrieval.15:48
lazyPoweri believe cory_fu took that approach in the Allura charm15:48
whitlazyPower, a script wrapping juju-run seems best for my purposes, but of course I've got access to the code15:49
lazyPowerwhit: so long as its documented in the README on how to retrieve the password, i dont think it'll be an issue.15:49
* whit nods15:49
cory_fuwhit: Yeah, I favor the run script style, but I've had a lot of people say that a (required) config option to set the password is "better" (mainly because it plays nicer with the GUI)15:50
* whit shrugs15:50
cory_fuOnce actions are available, I think that will be the best way15:50
lazyPowerright, and thats why actions will settle the debate. building the script today and implementing as 'juju run' - will basically get your foot in the door.15:50
whitcross that bridge when I get to it ;)15:50
lazyPower+1's that opinion15:51
whit*if* this  hacked up graphite charm ever makes it to the charm store, I'm guessing we'll probably have actions by then15:51
lazyPowerwhit: you may be surprised by who pulls it down and adds the polish to make it store-ready :)15:51
* whit aims low for just not sucking15:51
whitmeh silly django management command demands  terminal input16:06
whitjuju ssh graphite/0 -t sudo graphite-manage createsuperuser ftw16:10
thierry-ibmHello - on a trusty system I found that juju-gui was in error during install hook - looking at the log, it sounds related to the fact that apt-get update is not returning 0 - does it really make sense to fail like that ?16:35
thierry-ibmin another case I found : INFO install /var/lib/juju/agents/unit-wordpress-0/charm/hooks/install: line 5: add-apt-repository: command not found - didn't find any LPid for such error - is it known or a missing prereq ?16:36
marcoceppithierry-ibm: what architecture are you running on?16:37
marcoceppiapt should really not be failing at all16:37
thierry-ibmppc64le16:37
marcoceppiis there any limit on network connectivity?16:37
thierry-ibmwhat is strange is that I run apt-get update manually and it returned 016:38
marcoceppioh that is odd16:38
marcoceppithierry-ibm: what if you run `juju resolved --retry juju-gui/0`16:38
marcoceppiit may have been an internmittent apt locking issue16:39
thierry-ibmagree on that since I get a message : INFO juju-log Updating APT sources.16:41
marcoceppithe wordpress issue is also an interesting one16:41
marcoceppiare you using Ubuntu Cloud Images?16:41
marcoceppiwhat provider is this?16:41
thierry-ibmno I wanted to run manual and run gui + mysql + wordpress on same local system16:42
thierry-ibmbut don't know if that's supposed to work16:42
marcoceppimanual, as in manual provider or local provider with LXC16:42
thierry-ibmmanual provider16:42
thierry-ibmeverything on machine "0"16:43
marcoceppiah, that explains a bit more16:43
marcoceppiwe've come to coin this as "hulk smashing"16:43
marcoceppibecause there tends to be collisions. Where it appears another charm was running apt at the time apt-get update was run in juju-gui causing it to error16:44
thierry-ibmah ... I see a first issue - gui and wordpress would use same port number 80 - not good16:44
marcoceppiwhile a some charms can work like this a lot can't because they expect to own the entire machine. IE wordpress uses nginx and gui uses apapche16:44
marcoceppiand there you go, they fight over port 8016:44
marcoceppiyou should be able to put most of these in containers on machine  016:45
marcoceppijuju deploy --to lxc:016:45
marcoceppiso you can have density while not encountering collisions16:45
marcoceppithere's networking bits that would need to be sorted, and we're working on putting those in core, but the systems will deploy and you can use sshuttle to gain network access to the LXC network on machine 016:46
marcoceppior setup NAT on the LXC bridge on the machine16:46
marcoceppidepends on your network setup on that machine and it's location16:46
thierry-ibmho that could explain why on another set of system on another machine I get problems to just get charms ... even setting proxy16:48
thierry-ibmI will rework all of that then - great thanks for the explanation it at least clarify my mind ;-)16:48
=== kadams54 is now known as kadams54-away
marcoceppiaisrael: http://marcoceppi.com/2014/11/compiling-juju-core-from-source/18:09
=== kadams54 is now known as kadams54-away
aisraelmarcoceppi: \m/18:44
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away
skaypython-django uses ansible, and it has a playbooks directory -- if I use it, can I have some playbooks that it will call instead? I don't see how that could happen in the source code, but maybe there is some magic charm thing going on19:01
* skay is looking at line 272 in https://www.tripit.com/p/FAEDF3031998F148D2DA1B958C45051819:01
skayoh crap, wrong paste buffer19:01
skaybtw, did I mention I'm going ona  trip?19:01
marcoceppiskay: oh hey, enjoy o/19:07
skaymarcoceppi: thanks! I'm excited! going to Taipei for work19:08
skayhave never been there19:08
marcoceppiso, there's an Ansible charm helper that does all that...magic stuff19:08
marcoceppiand executes the playbooks19:08
skayI didn't mean to share it with the world though :)19:08
skaymarcoceppi: and I see python-django using it here, http://bazaar.launchpad.net/~charmers/charms/trusty/python-django/trunk/view/head:/hooks/hooks.py#L27219:09
skayand it looks hardcoded ..thugh I haven't looked at the charm helper code to see if it knows to find any files in playbooks and somehow finds them in some order of precedence19:10
skaythat probably doesn19:10
skaydoesn't happen?19:10
marcoceppiit's hard coded19:11
marcoceppibut the python-django charm does a lot of...extra stuff19:11
marcoceppiit might not be the best example tos tart with19:11
marcoceppilazyPower: ^^ feedback?19:11
skayso I guess if I wanted to be able to do my own playbooks that I can't use python-django yet19:11
skaybut maybe in the future, if there are plans?19:11
lazyPowerskay: elasticsearch would be the reference charm for ansible imho19:12
=== psivaa_ is now known as psivaa-holiday
skaylazyPower: thanks19:12
lazyPower1 sec, there's a template fo rit19:12
lazyPowerskay: charm create -t ansible19:12
skayat work we've been using someone's fork of python-django that works with a tgz of our django app19:12
lazyPoweryou'll get a skeleton charm ready to go with ansible. You can use the common patterns in ansible such as defining roles and including those .yaml files in your playbook.yaml19:13
skayand I'd like to use the charm store instead19:13
lazyPowerah, yeah there's even more work coming for the python-django charm i didn't realize your questions were specific to django19:13
skaythanks lazyPower19:13
skaylazyPower: what plans are there for the python-django charm?19:13
lazyPowerskay: https://code.launchpad.net/~patrick-hetu/charms/precise/python-django/pure-python/+merge/22674219:13
lazyPowerthey're moving away from ansible as there were limitations they ran into that were solveable via pure python charming19:14
lazyPowerits pretty close to being accepted, someone will be circling back no this MP next week - as its bubbling up to teh top fo the queue. Expect to see it land soon, from what i'm reading the only remaining issues are with the tests19:15
lazyPowerskay: i'm going to head out for lunch, if you need anything feel free to ping me and i'll reach out when I get back19:17
marcoceppiskay: oh, I didn't realize you were using python-django19:17
skaylazyPower: cheers19:18
marcoceppiyou can pretty much drop in play books then then reference them and add a few lines where needed to execute them19:18
skaymarcoceppi: sorry bout that, I wasn't sure how much context to provide for my question19:18
marcoceppiI thought you were looking for just an ansible example19:18
marcoceppiskay: you can also submit merge requests and open bugs to get features you're missing in to the store version19:19
skaymarcoceppi: when I have a better idea for how things work I may19:19
skaybtw, I watched a couple of the charmschool videos and they were very helpful!19:20
marcoceppigreat, glad to hear that!19:21
cl__Hello,19:22
cl__Does anyone know which ip address will be return by unit_get('private-address'), if there are multiple networks on the machine? Thanks.19:22
marcoceppicl__: whatever network interface is used to communicate with bootstrap, typically the first network device19:23
marcoceppicl__: I don't think there's really much logic around that nex19:25
cl__marcoceppi, thank you!19:25
marcoceppicl__: however wer're working on better networking in core where you'll be able to define and select which networks to use19:26
cl__marcoceppi, that will be great!19:26
cl__marcoceppi, in my environment, there are tow networks connecting all the hosts, including the bootstrap machine.19:27
cl__marcoceppi, so I guess, juju will pick the first network device as you said.19:28
cl__s/tow/two19:28
=== kadams54-away is now known as kadams54
=== roadmr is now known as roadmr_afk
=== scuttle|afk is now known as scuttlemonkey
=== kadams54 is now known as kadams54-away
=== rcj_bumped is now known as rcj
josecory_fu: ping20:49
cory_fujose: Hey, man.  Sorry I didn't get back to your email yet.20:50
josecory_fu: np, was wondering about tests, since I had written some but needed a bit of fixing20:50
cory_fuWhat are you wondering about?20:51
joseif you had written some for chamilo20:51
cory_fujose: Unit tests, for sure: http://bazaar.launchpad.net/~johnsca/charms/precise/chamilo/services-framework/view/head:/tests/test_actions.py20:53
cory_fuThat branch could use an Amulet test, as well20:53
joseyep, those I was working on20:54
josewill take a look after this mailman ones pass, should be quite soon20:54
=== CyberJacob|Away is now known as CyberJacob
cl__hello,21:15
cl__anyone know if there is a way to set config options differently for each unit of a service? either from command line or in charm bundle...21:15
cl__thanks:)21:15
josecl__: there is a tweak you could use. What are you trying to achieve?21:20
cl__jose,  I want to set a config option (an ip address) differently to each service unit.21:21
josecl__: I believe each unit has its own IP address21:22
cl__jose, yeah21:22
cl__jose, in addition to the private-address of the service unit, a specific config item in the service configuration file needs to be set.21:23
josecl__: you could use this following command:21:23
joseoh, nvm21:23
josehmm21:23
josecl__: what's this service, if I may know?21:24
cl__jose, I know this sounds a bit confusing ;)21:24
cl__jose, sure21:24
=== roadmr_afk is now known as roadmr
cl__jose, https://manage.jujucharms.com/charms/trusty/nova-compute21:25
josecl__: not sure it needs you to manually specify an address for each unit21:26
cl__jose, there is a config-flags item in the config options. I would like to use it to set my_ip option in nova.conf21:26
joselemme check21:26
cl__jose, like juju set nova-compute/0 config-flags=my_ip=10.5.0.22721:26
joseyou could specify an alias for each unit, but that would break scalability21:26
cl__jose, this obviously will not work ;)21:27
josecorrect21:27
joseand not sure if the command I'm going to give you is going to run in a hook context21:27
cl__i see21:27
josebut setting it to `unit-get public-address` *may* work, I'm not 100% sure21:27
josesomeone else may be able to confirm that21:27
josemarcoceppi: ^21:27
joseor lazyPower ^21:29
cl__jose, thanks a lot21:29
josenp, and sorry for not having a direct answer21:29
cl__jose, no worries. I know this doesn't quite make sense to juju.21:30
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away

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