/srv/irclogs.ubuntu.com/2013/07/15/#juju.txt

=== defunctzombie_zz is now known as defunctzombie
=== defunctzombie is now known as defunctzombie_zz
=== defunctzombie_zz is now known as defunctzombie
=== defunctzombie is now known as defunctzombie_zz
=== defunctzombie_zz is now known as defunctzombie
=== defunctzombie is now known as defunctzombie_zz
=== defunctzombie_zz is now known as defunctzombie
=== defunctzombie is now known as defunctzombie_zz
=== defunctzombie_zz is now known as defunctzombie
=== defunctzombie is now known as defunctzombie_zz
=== thumper is now known as thumper-afk
=== CyberJacob|Away is now known as CyberJacob
=== mthaddon` is now known as mthaddon
=== defunctzombie_zz is now known as defunctzombie
=== defunctzombie is now known as defunctzombie_zz
=== CyberJacob is now known as CyberJacob|Away
=== rvba` is now known as rvba
=== jam1 is now known as jam
=== Guest46086 is now known as jpds
bloodearnestheya folks - am using lxc environment, trying to add a private ppa in my install hook, but apt-cacher-ng is getting in the way. Is there anyway to run  a local lxc env without it?11:20
stokachujcastro: http://www.astokes.org/post/2013-07-14-juju-gunicorn-apache-django11:28
stokachunot sure if you saw that yet, was hoping to get some contributors added to the github project11:28
stokachuhttps://github.com/battlemidget/juju-apache-gunicorn-django11:29
stokachugoing to add rabbitmq support soon as well and maybe haproxy11:30
pavelpachkovskijis there a way I can change config attribute from a hook?12:44
pavelpachkovskijsomething like "config-set attr=value"12:44
marcoceppipavelpachkovskij: No, you can only manipulate config from the juju cli13:07
marcoceppiIt's not designed to be manipulated from within hooks13:08
pavelpachkovskijmarcoceppy, and if I try to run juju set ... from hook?13:08
pavelpachkovskijmarcoceppi, sorry for typo13:09
marcoceppiYou can try, but you'd have to also include a copy of your ssh private key and ~/.juju/environments.yaml file in order to even start using  the juju cli from the charm.13:09
pavelpachkovskijI see13:09
marcoceppipavelpachkovskij: let me just say, while you can do this, it likely won't be accepted in to the charm store. This is definitely not a good practice13:10
pavelpachkovskijI understand it13:10
marcoceppiThe impression config has for users is *they* set it, having the charm do it will break that story and preception13:10
pavelpachkovskijmarcoceppi, my problem is that I want to do something like this:13:10
pavelpachkovskijjuju set sample-rails command='rake db:migrate'13:10
pavelpachkovskijbut I can't track for changes if I can't modify this variable from the instance13:11
pavelpachkovskijthough this is a huge workaround there is no other way to run command within application13:11
marcoceppipavelpachkovskij: So what you're trying to do is send ad-hoc commands to the charm?13:11
pavelpachkovskijyes13:12
pavelpachkovskijIt would be nice to have support of ad-hoc commands built into juju itself13:13
pavelpachkovskijmarcoceppi, do you have smth like this in the roadmap?13:13
marcoceppipavelpachkovskij: There's a few problems with this particular example. When you run juju set it will run config-changed on all units. Imagine having a deployment at scale (2+ units) they'd all start executing a rake db:migrate, which I can see as being particularly harmful13:13
pavelpachkovskijI already thought about this13:13
pavelpachkovskijmarcoceppi, and work out a solution with different roles13:14
pavelpachkovskijmarcoceppi, exactly the same way how it is in capistrano13:14
marcoceppipavelpachkovskij: There's a mechanism for this kind of one-off command: `juju ssh <charm>/<unit-num> rake db:migrate`13:14
pavelpachkovskijmarcoceppi, this will not work for my purposes13:14
pavelpachkovskijmarcoceppi, issue with 2+ units solves with rack-master and rack-slave nodes in a cluster13:15
pavelpachkovskijmarcoceppi, your solution requires user to now at least root folder13:15
pavelpachkovskijmarcoceppi, maybe it's not the best example, but also I need to update application source code13:16
marcoceppipavelpachkovskij: The other thing you can possibly do is trap the previous value of the config, something like `config-get command > .previous-cmd`, check if it's actually changed. The downside to this is, if they set command to be the same exact string again it won't get caught13:16
pavelpachkovskijmarcoceppi, yes, this is the problem I'm trying to solve13:16
pavelpachkovskijmarcoceppi, tracking the change from 'rake db:migrate' to 'rake db:migrate'13:17
=== cmagina-away is now known as cmagina
pavelpachkovskijmarcoceppi, it just doesn't trigger the hook13:17
marcoceppipavelpachkovskij: there's no way currently, unfortunately. Could you describe the entire workflow? Is the command just a one-off or is it part of a bigger process?13:17
pavelpachkovskijmarcoceppi, did you use heroku?13:18
marcoceppipavelpachkovskij: I know of it, for the most part13:18
pavelpachkovskijmarcoceppi, I want rack-charm with heroku like behavior13:18
pavelpachkovskijwith support of custom commands and source code update mechanism13:18
pavelpachkovskijmarcoceppi, actually I have a great progress with it, but I don't know how to solve this very problem13:19
pavelpachkovskijgive me a second, I'll push my code to github13:19
marcoceppipavelpachkovskij: what you can do instead, is have two config values sections, one that tracks the souce (source-url, source-branch, source-tag, whatever), then one that tracks what commands to run when doing an update (update-cmds). That way the user has described what they want done during updates and you can now trap when there's an update13:20
pavelpachkovskijhttps://github.com/Altoros/rack/blob/master/hooks/chef/cookbooks/rack/recipes/config-changed.rb13:20
marcoceppiah, yes juju ssh really wouldn't help much here13:20
pavelpachkovskijmarcoceppi, another problem with this approach is that if user change another attribute, command attribute will stay the same and cause another run of command13:22
pavelpachkovskijmarcoceppi, I didn't get your idea with update-cmds13:22
pavelpachkovskijmarcoceppi, can you expand with it?13:22
marcoceppipavelpachkovskij: let me write a quick bash example13:22
pavelpachkovskijmarcoceppi, waiting, thanks13:23
marcoceppipavelpachkovskij: I'm not sure how well a bash example will translate to chef, but this was my idea: http://paste.ubuntu.com/5877478/13:46
pavelpachkovskijmarcoceppi, yeah... but... there are two issues: 1. Forcing users to write huge configs. 2. It's really hard to fully automate deployment.13:48
pavelpachkovskijmarcoceppi, it's really common case when you want to run custom rake task13:48
marcoceppipavelpachkovskij: I don't see how it's anymore difficult than having to run juju set several times to complete tasks13:48
pavelpachkovskijmarcoceppi, if user make a typo, he have to re-run all deployment13:49
marcoceppipavelpachkovskij: Could you explain how a typo would force a re-run of deployment?13:50
marcoceppiI'm not grasping the use case very well13:51
pavelpachkovskijmarcoceppi, forget, this issue is not very important13:51
pavelpachkovskijmarcoceppi, I just don't like this idea13:51
marcoceppipavelpachkovskij: We've not has a real strong use case for ad-hoc command running where `juju ssh` wasn't a valid solution. In this case, if you feel strongly about being able to do so, you might want to open a bug with juju-core to start a dialog on how this can be resolved within juju core. Either by allowing the resetting of config values in a hook context, or by adding some new mechanism in juju13:53
pavelpachkovskijmarcoceppi, yep13:53
marcoceppiAlso, juju ssh drops you in as the `ubuntu` user, not directly as root, if that was a previous concern of yours13:54
pavelpachkovskijmarcoceppi, I know that it's ubuntu user, ssh makes it difficult to run simple commands13:55
pavelpachkovskijyou have to ssh to it, go to root folder, su as a deploy user, and only then run your command13:55
pavelpachkovskijmarcoceppi, becomes not simple at all13:55
marcoceppipavelpachkovskij: it does, I mean there are other ways around that, like writing convience scrips (imagine just doing `juju ssh 2 run "rake db:migrate"` where run would cd to proper folder, su to user, wrap command or pass to chef solo, etc)13:56
pavelpachkovskijmarcoceppi, I understand that it's easy for devops, but not for a casual developers13:56
pavelpachkovskijmarcoceppi, last example makes sense13:58
marcoceppipavelpachkovskij: This might be a better question for juju@lists.ubuntu.com to open a deeper dialog (and the juju-core devs typically read it) for more feedback if you're still looking for alternatives13:58
pavelpachkovskijmarcoceppi, I have to think about this13:59
jcastrostokachu: I can syndicate your blog post on juju.ubuntu.com14:00
jcastrostokachu: but feel free to also post it to the list!14:00
stokachujcastro: cool, do i need to just tag it with 'juju'?14:00
stokachuand i can post to the mailing list as well14:00
jcastrono I have a plugin that sucks it in an I can choose it14:01
stokachuah ok14:01
stokachujcastro: posted :D14:05
jcastronegronjl: you're on queue this week!14:25
negronjljcastro: Aye :)14:26
negronjljcastro:  I should be able to work it early ... I'm in London for two weeks14:26
jcastrohttps://bugs.launchpad.net/charms/+bug/100606414:26
jcastrothis is the only one I care about since we'd like to demo it for oscon14:26
evis it possible to specify an instance type for canonistack using gojuju? default-instance-type is now ignored, but bootstrapping with --constraints="mem=6" has no effect. I still get an m1.tiny node.14:28
pavelpachkovskijmarcoceppi, I think using juju ssh 1 run should work for my goals14:46
pavelpachkovskijmarcoceppi, thanks for idea14:46
marcoceppipavelpachkovskij: awesome, glad I could help out!14:46
marcoceppipavelpachkovskij: just make sure do document it in the readme, etc14:46
marcoceppito document*14:46
pavelpachkovskijmarcoceppi, sure14:46
=== CyberJacob|Away is now known as CyberJacob
=== defunctzombie_zz is now known as defunctzombie
jcastrohey jamespage16:33
jamespagehey jcastro16:34
jcastroI need you to rate the ceph charm before OSCON16:35
jcastrobut don't worry, it's easy, it's like 5 min of work16:35
jcastrohttp://manage.jujucharms.com/charms/ceph/precise/qa/edit16:35
jcastroyou need to login16:36
jcastroadam_g: you need to rate glance and cinder too16:37
jamespagejcastro,  Access was denied to this resource.16:38
jcastroare ou logged in?16:39
jcastrojamespage: ok let's do this16:40
jcastrohttps://juju.ubuntu.com/docs/authors-charm-quality.html16:40
jcastrocopy and paste that into an email, the +1 parts16:40
jcastroand then change things you don't do in the charm to +016:40
jcastroand I'll go ahead and enter it in the webform.16:40
jamespagejcastro, how do I tell which providers it works on?16:41
jcastroskip that part16:41
jcastrothat's automatic16:41
jcastroskip all of reliable actually16:41
jcastrojamespage: got it, thank you sir!16:44
jcastroadam_g: we just need cinder and glance and then we're all set for OSCON!16:44
jcastronegronjl: mira, when you do liferay can you rate it?17:42
jcastronegronjl: also if you can't do it today lmk, I'm on an OSCON schedule so I can whine to someone else to finish it off17:42
=== defunctzombie is now known as defunctzombie_zz
=== defunctzombie_zz is now known as defunctzombie
jcastrohttps://bugs.launchpad.net/juju-core/+bug/120155919:20
_mup_Bug #1201559: Prompt the user to generate a key instead of erroring out <juju-core:New> <https://launchpad.net/bugs/1201559>19:20
jcastrothis one's from Maarten19:20
sidneihum, is the package in the devel ppa potentially broken? it's not showing up as alternatives19:21
sidnei$ update-alternatives --config juju19:21
sidneiThere is only one alternative in link group juju: /usr/lib/juju-0.7/bin/juju19:21
sidneiNothing to configure.19:21
sidnei$ apt-cache policy juju-core19:21
sidneijuju-core:19:21
sidnei  Installed: 1.11.2-3~1414~precise119:21
sidnei$ apt-cache policy juju19:21
sidneijuju:19:21
sidnei  Installed: 0.7+bzr628+bzr631~precise119:21
sidneimgz: ^19:23
sidneijamespage: maybe you know? ^19:28
=== cmagina is now known as cmagina-away
=== elopio_ is now known as elopioo
=== elopioo is now known as elopio
=== cmagina-away is now known as cmagina
=== defunctzombie is now known as defunctzombie_zz
=== BradCrittenden is now known as bac
=== cmagina is now known as cmagina-away
=== defunctzombie_zz is now known as defunctzombie
=== cmagina-away is now known as cmagina
sidneihazmat: https://code.launchpad.net/~ubuntuone-pqm-team/juju-deployer/refactor/+merge/17487722:05
marcoceppihazmat: I've got a question about deployer22:41
sidneimarcoceppi: ask, maybe i can answer22:42
marcoceppiIf I have two ambiguous relations/interfaces, how would I map that? Can I do "mysql:db": { 'consumes': ['wordpress:db'] } in the relations object?22:42
marcoceppiThe examples show "mysql": { 'consumes': ['wordpress:db'] } but none show if you can map the relation at the top key level22:43
sidneimarcoceppi: both mysql:db": { 'consumes': ['wordpress:db']} and wordpress:db": { 'consumes': ['mysql:db']} would work22:43
marcoceppisidnei: awesome, that makes life a little easier22:43
hazmatsidnei, marcoceppi the consumes/weights syntax is quite ugly.. .. i'd try..  - ["mysql:db", "wordpress:db"]22:55
hazmatimo22:55
marcoceppihazmat: wait, so I won't have to use weights?22:55
sidneiyes, there's that too22:55
marcoceppiI can just have a list of relations?22:55
hazmatmarcoceppi, yeah.. that's legacy format.. i added some  simpler ones..22:55
sidneimarcoceppi: weights are optional (or should be)22:55
hazmatsidnei, there not optional in the dict format..22:55
marcoceppihazmat: can you expand just ever so slightly on your example?22:55
* hazmat digs up a link22:56
sidneihazmat: maybe it's in my branch only? i don't have weights in any of my configs22:56
hazmatmarcoceppi, http://bazaar.launchpad.net/~hazmat/juju-deployer/refactor/view/head:/doc/config.rst#L6122:56
marcoceppihazmat: so I should start using yaml instead of json for the deployer cfg?22:57
hazmatmarcoceppi, i do22:57
hazmatmuch less typing22:57
hazmatsidnei, dunno.. perhaps they were optional keys on a dsu sort, but for legacy format, the relations struct was a dict, and it used weight as a sort key22:57
marcoceppifantastic. Has this landed in "darwin" branch yet?22:58
marcoceppijk, this is the darwin branch22:58
marcoceppiOkay, moving on. thanks for the clarification!22:58
sidneihazmat: im pretty sure i sent an mp to make weight optional, default to None for the sort.22:58
hazmatsidnei, cool22:59
sidneito the legacy deployer that is22:59
hazmatmarcoceppi, hopefully that series distinction goes away this week, going to chat with adam_g post vacation about merging the two22:59
marcoceppihazmat: that's make my life easier22:59
sidneihazmat: did you fix that issue with things ending up in non-started state not causing deployer to exit non-zero?23:00
hazmatsidnei, is there a bug for it?  i did fix a minor that deployer wasn't checking state after it did a relation wait23:01
=== defunctzombie is now known as defunctzombie_zz
hazmatso maybe23:02
sidneii don't think i filed a bug no, maybe i emailed you23:02
=== defunctzombie_zz is now known as defunctzombie
=== defunctzombie is now known as defunctzombie_zz
josehey guys, when are charms getting reviewed again? mine has been on the queue and wasn't23:36
marcoceppijose: the queue is constantly being reviewed, we just rotate who is "on deck" to do reviews23:38
josewell, I'll wait then23:38
marcoceppijose: your postfix charm will definitely get eyes on this week, there's only one charm ahead of you in the queue23:39
marcoceppijujucharms.com/review-queue23:39
* jose checks23:39
josewell, I'll wait then, thanks!23:40
=== defunctzombie_zz is now known as defunctzombie

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