/srv/irclogs.ubuntu.com/2011/11/18/#juju.txt

m_3portertech: or in a ruby example hook http://paste.ubuntu.com/741757/00:01
m_3(where charm-tools.rb is in the hooks dir)00:01
portertechrequire 'charm-tools' <-- how does this get installed?00:01
portertechits not part of the standard charm tools is it?00:02
* portertech will bbiab00:02
m_3no, not yet, it's a file in the /hooks dire00:02
portertechah, ok00:02
portertechlooks cool00:03
m_3still in progress :)00:03
m_3idioms, best-practices, tools for charms are evolving00:03
m_3we've let them run rampant for now... consolidating into charm-tools as we can00:03
jcastrojrgifford: hey are you working on a charm or just helping bruce?00:06
jrgiffordjcastro: both00:06
jrgiffordtrying to get rvm to play nice with charms00:06
jrgiffordso we can have a ruby/rails charm that is sane. :P00:06
* jcastro nods00:07
jimbakernow i know why my desktop has been locking up, somehow my puppy does this by brushing by it just so. maybe fur + static electricity + ...00:08
m_3jrgifford: do you have a repo to follow on that?  I'd love to see rvm play nicely00:08
jrgiffordm_3: not right now.00:08
jrgiffordbut once i'm happy with it, yes, there will be one.00:08
m_3jrgifford: awesome00:08
jcastrohey so here's the general ruby bug: https://bugs.launchpad.net/charm/+bug/79987900:08
_mup_Bug #799879: Charm needed: rails (framework) <developers> <new-charm> <juju Charms Collection:In Progress by mark-mims> < https://launchpad.net/bugs/799879 >00:08
jcastrodo we need another one?00:09
jrgiffordi don't think so00:09
m_3just tack stuff onto that one00:09
m_3that charm uses package ruby(s) and then bundler for rails00:10
jrgiffordi marked that as affecting me, and subscribed.00:10
m_3it'd be great to see that use rvm instead... been on the todo, just lower on the list00:10
jrgiffordi'm hacking railsready to start with...00:11
jimbakerhazmat, i just saw the bug you posted (bug 891868). i wonder if it would be better if this were done by requesting an agent to run a hook however00:11
_mup_Bug #891868: juju cli api should be invokable outside of units  <juju:Confirmed> < https://launchpad.net/bugs/891868 >00:11
m_3feel free to branch and update that at will00:11
jcastrojrgifford: is there any rails stuff you deploy that you think we should charm up? (thinking ahead)00:11
jrgiffordjcastro: redmine.00:12
m_3nice00:12
jcastrooh right00:12
jrgiffordthat's about the only thing that people normally do.00:12
jrgiffordother than that, everything would be custom00:12
jcastrook I'm going to file a bug on redmine00:12
m_3tried to make that a config parameter (i.e., repo to pull your app from)00:12
m_3but that's a lot of work to maintain in a general way00:13
m_3bundler helps that tons!00:13
m_3rvm woudl add to it too00:13
* jrgifford gets off IRC to go hack on rvm and charms00:13
jrgiffordif i run into problems, i'll be back. :P00:13
jcastro<300:16
jrgiffordjcastro: ok, i00:18
jrgiffordi'm at a point where i can test it00:18
jrgiffordwhere can i find the command to deploy from the repo?00:19
jcastroyou push it to your branch00:20
jrgiffordok.00:20
jcastroand then just run it with --repository <where it is on disk>00:20
jcastrohttps://juju.ubuntu.com/Charms00:20
m_3jrgifford: there's a step-by-step http://paste.ubuntu.com/741778/ too00:20
m_3it's for another stack of charms, but the basics are the same00:21
jcastroI found a cool ruby thing I used to use, I filed a bug on it: http://getontracks.org/00:22
jcastrom_3: we should schedule a charm school in here for next week00:22
jcastrofor the new people from today00:22
m_3jcastro: they're gonna be finished with their charms over the weekend though!00:23
jrgiffordok, juju deploy is complaining about too few arguments00:24
m_3jcastro: wonder if they'll be willing to walk others through the charms they create this weekend?00:24
jcastroyeah so things like that. Or improving existing charms00:25
jcastroor, have them review each other's charms00:25
jcastrojrgifford: what exactly are you typing?00:25
m_3jrgifford: juju deploy --repository <somedir> local:<charmname>00:25
m_3(the "local" is a namespace implying the charm's coming from "<somedir>/oneiric" on your filesystem00:26
jrgiffordtried m_3's suggestion and got something different00:27
jrgiffordnow i get :00:27
jrgifford$ juju deploy --repository ~/code/charms/oneiric/ local:rails00:27
jrgiffordCharm 'local:oneiric/rails' not found in repository /home/jrg/code/charms/oneiric00:27
jrgifford2011-11-17 19:26:52,573 ERROR Charm 'local:oneiric/rails' not found in repository /home/jrg/code/charms/oneiric00:27
jrgifford$00:27
m_3juju deploy --repository ~/code/charms local:rails00:28
jrgiffordoh lord that worked.00:28
m_3!!00:28
jrgiffordthanks!00:28
m_3np00:28
jrgiffordok, so how do i figure out if it compiles successfully?00:29
jrgiffordis there a juju log i can watch?00:30
m_3juju debug-log00:32
m_3just 'juju' should give you a list of subcommands... there're lots of useful ones... debug-hooks for instance rocks!00:33
jrgiffordawesome, i'll look into those next00:34
jcastroyeah debug-hooks is basically awesome00:34
mainerrorIs it a problem if the service I'm trying to create a charm for is not GPL licensed? This is its license. http://github.com/pyrocms/pyrocms/zipball/v1.3.200:39
mainerrorWhat I actually mean is does this license just go into the copyright file in my charm?00:41
jcastroI think so, but I'm not an expert00:41
jcastrowe just talked about licensing this morning00:42
jcastroSpamapS: ^^^^00:42
m_3mainerror: short story, yes... it'll just effect the tags your charm gets in the repo00:42
mainerrorAlright. Thanks. :)00:42
jcastropyro looks pretty awesome00:43
m_3mainerror: have to look at the license in detail though... of course if you can't distribute it, we can't add it to the repo00:43
m_3but you can still charm anything (even binary blobs)00:43
jrgiffordooooohhh....00:43
jcastrohttps://github.com/pyrocms/pyrocms/blob/2.0/develop/LICENSE00:44
jrgiffordso charming is different from packaging in that you can do binaries... interesting...00:44
hazmatjimbaker, its more the case of either invoking the cli api from a ssh connection or co-located unit, the latter has it own unit agent though.. the general problem is unified api different targets depending on context, default is no context.. documenting how as a faq is sufficient as well, client id isn't justifiable atm (constant)00:44
jcastrojrgifford: you can do whatever you want, if you have local charms that toss out unholy binary blobs everywhere, then sure.00:44
jrgiffordlol00:44
m_3jrgifford: yup... and pull from repos if you want00:44
jcastrojrgifford: though of course we want to start out with awesome OSS stuff for people to build on00:44
jrgiffordnaturally00:45
m_3jrgifford: we'll classify (and tag) charms according to the license for the charm itself and the bits that it includes00:46
m_3possibly different licenses00:46
jimbakerhazmat, sounds good if we simply doc this as not valid. i think it made sense in our earlier thinking, but restricting these commands to only run in hooks seems to be the right way imho00:46
* hazmat prefers a cms with presentation tier as management tier00:46
jrgiffordok, question - does juju deploy as a user with root privs?00:47
jimbakerbut i do think there's a need to trigger hook execution, as i mention in my comment on bug 89186800:47
_mup_Bug #891868: juju cli api should be invokable outside of units  <juju:Confirmed> < https://launchpad.net/bugs/891868 >00:47
hazmatjimbaker, i don't see why we want to restrict it, its useful for integrations00:47
hazmatand the cli api is our juju's api00:48
hazmats/our/00:48
m_3jrgifford: hooks run as root if that's what you're asking... everything on your client runs as a regular user00:48
hazmatjimbaker, hooks are readily executable00:48
jrgiffordm_3: yes, that was what i was asking. thanks.00:48
hazmathook contexts not so much00:48
jimbakerhazmat, as i understand it, there's some usage out there that basically requires the use of juju set to trigger execution. this seems like an abuse of the mgmt api00:49
hazmatredefining framework defined hooks for arbitrary usage is questionable imo, it violates any usage/invocation semantics around hooks00:49
jimbakerdon't want to have to do the integration on a clien tmachine00:49
hazmatjimbaker, custom hooks would be a better way to solve that00:49
hazmatrather than allowing arbitrary usage association to hooks with well defined semantics00:50
jimbakerhazmat, agreed00:50
mainerrorm_3: You can distribute it freely if you keep the license file "intact".00:50
jimbakerso call it "external" or "trigger" or something like that00:50
hazmatjimbaker, the hook cli api as a universal though seems pretty useful.. it has a well-defined semantic to retrieve information, if the context is not hook specific, then it should default to being usable anywhere.00:51
m_3mainerror: awesome00:51
hazmati don't see security concerns per se, their's still standard unix permissions on the socket (ie root)00:51
* m_3 food00:53
jimbakerhazmat, so long as we preserve support for ACLs at the ZK level, it's fine with  me00:53
jimbakerand i guess that is assumed00:54
mainerrorI'm using the Wordpress charm as a reference but I noticed that the "Writing a charm" wiki page differs from the Wordpress charm install script. Basically in the tutorial the hook installs Apache and all necessary packages but the Wordpress charm doesn't. Did that change?00:54
jrgiffordmainerror: i think the wordpress charm installs the dpkg. (not sure though)00:54
george_eIt's charming time! Where do I begin? I have 11.10 32-bit installed in a VM.00:55
mainerrorjrgifford: You mean the wordpress package has the other packages as a dependency?00:55
jrgiffordi think so.00:55
hazmatjimbaker, indeed. i've been trying to keep an eye for acl issues, the biggest thing is just maintaining the principal hierarchy for unit creation, and not creating too ambiguity around ownership or usage around node paths.. nothings really changed so far,00:55
mainerrorMakes sense.00:56
jrgiffordgeorge_e: here - https://juju.ubuntu.com/Charms00:56
george_eThanks.00:56
jrgiffordor, just wait for jcastro  to point you to something even more awesome. :P00:56
jcastrooh awesome, welcome george_e00:57
george_eHello!00:57
george_eI love the Sphinx-generated documentation.00:57
jcastroyeah, hot action00:57
jcastrook so you need to follow the first part of the docs00:57
jcastroand set it up for local development00:58
george_eOkay, I'll start there.00:58
* george_e switches to VM...00:58
SpamapSmainerror: fyi, that license looks quite free, its close to the PHP license.00:59
jcastrogeorge_e: http://askubuntu.com/questions/65359/how-do-i-configure-juju-for-local-usage00:59
jcastrohazmat: you need to steal that and put it in the docs ^ since right now it only has EC2 in there00:59
* george_e waits for packages to install.01:01
jcastrogeorge_e: the next steps are here: https://juju.ubuntu.com/Charms01:01
jcastroyou can start reading that01:01
george_eOkay - it will take some time to install everything - my connection is slow and the VM is slow :P01:01
jcastroand for someone like you, probably just showing you the code is the trick: http://bazaar.launchpad.net/~charmers/charm/oneiric/mediawiki/trunk/files01:01
jcastrobrowse that01:01
george_eSure.01:01
jcastroyou'll basically do a charm create01:01
jcastroand modify to your needs.01:02
jcastrogeorge_e: brunopereira81 and jrgifford are new today too, so we're swimming with new questions etc, so feel free to ask everything01:02
george_eI will... and it's on-topic to ask charm-creation questions on AU, right?01:02
jrgiffordgeorge_e: yup!01:03
george_eMaybe when I'm done, this should be another tutorial for 2buntu :)01:03
george_e(Hey, that's how we got the manpage and makefile tutorial.)01:03
jrgiffordyes please! :D01:03
george_eWe'll see how it goes.01:04
george_eIf things go well, maybe I'll create a charm for JetHTTP01:04
brunopereira81how do you test if everything is ready to run with your charm?01:05
jcastrocheck with with "charm proof"01:08
jcastroand then just deploy it locally01:08
jcastrojrgifford: heh, we should start snagging the questions from the past few hours and just put them in the charm tag01:09
jrgiffordhey! free rep! :D01:09
jcastrountil we started the docs seemed complete to me01:09
jrgifforder, "free" :P01:09
jcastronow it's like "crap, we're missing a bunch of stuff"01:09
jrgiffordyeah01:10
mainerrorFirst one is already up. http://askubuntu.com/questions/80323/how-can-i-test-a-juju-charm01:10
mainerrorWe are going to hear that one quite often I think.01:11
brunopereira81I get " W: relation server has no hooks" on charm proof01:11
jrgiffordmainerror: you have two answers. :P01:14
* george_e is still waiting for packages to install...01:14
* george_e twiddles thumbs...01:14
* jrgifford twiddles thumbs with george_e while he waits for his charm to work....01:18
* george_e is watching a whole bunch of Debian certificates get installed...01:19
jrgiffordgeorge_e: you're almost done, that's like the last thing that gets installed01:19
george_eYay! Time for rebooting.01:20
george_eWould a PHP library (used by other apps) be packaged as a charm?01:21
jrgiffordif you can use it, you should charm it. ™01:21
george_eLol... I'll add Stack.PHP to my list of charms to create then.01:22
brunopereira81I get " W: relation server has no hooks" on charm proof, help plz :S01:23
jrgiffordi think we're all looking at it trying to figure out what it means brunopereira8101:25
brunopereira81when I run "charm proof <path_to_charm_folder>" it returns that error01:26
mainerrorHere is the second question. http://askubuntu.com/questions/80327/charm-proof-issues-a-warning-w-relation-server-has-no-hooks01:32
george_eGotta restart here...01:40
m_3brunopereira81: I'd guess that means that you have a relation specified in metadata.yaml but no hooks defined for that relation02:02
brunopereira81can you please have a look, im looking at the rest of packages but not seeing what is wrong http://bazaar.launchpad.net/~brunopereira81/+junk/teamspeak/files02:07
m_3brunopereira81: it's ok... just a warning02:16
m_3brunopereira81: charm proof requires a relation in metadata.yaml, but there's no need to implement hooks for this particular relation02:17
m_3brunopereira81: just like minecraft02:17
brunopereira81I have tried deploying to local I can see the in status that it was deployed but no activity and debug window is empty, how to move from here?02:19
jrgiffordbrunopereira81: wait02:19
jrgiffordmine didn't kick in for about 5 minutes02:19
jrgifford(well, it didn't show up in the logs)02:19
m_3local can take a _long_ time to come up the first time02:21
m_3(it's caching an image)02:21
jcastro(but afterwards it has the debs in a cache so you'll be good to go)02:23
mainerrorm_3: If you want you can answer that server relation warning question AU as well. http://askubuntu.com/questions/80327/charm-proof-issues-a-relation-server-has-no-hooks-warning09:08
fwereademorning niemeyer10:58
wrtpmorning fwereade11:13
niemeyerfwereade, wrtp: Mornings!11:16
niemeyerI'm heading off to bus/airport.. have a fantastic weekend and week folks11:18
fwereadehave fun niemeyer, see you soon11:20
wrtpniemeyer: dammit! https://codereview.appspot.com/5417045/11:25
wrtpniemeyer: have a wonderful holiday11:25
niemeyerwrtp: How amazing! 8)11:26
wrtpniemeyer: you are my hero11:26
niemeyerfwereade, wrtp: Will have rudimentary connectivity meanwhile, but no laptops :-)11:26
niemeyer(should make me more honest ;-)11:27
wrtpniemeyer: all my net connectivity is through my mobile phone right now11:27
niemeyerCheers folks!11:27
wrtpniemeyer: the cable to the entire street has been broken and then buried 6 feet deep!11:27
wrtpi was amazed that my mobile bandwidth was sufficient for me to watch a tv programme over it last night11:28
wrtpfwereade: so there it is - inline comments requested!11:29
fwereadewrtp, cool, I'll try to get to it soon11:29
fwereadewrtp, but I've broken something that should be trivial and I'm not quite done banging my head against it11:29
wrtpfwereade: i hate it when that happens11:30
fwereadewrtp, for some reason this whole feature has been one of those after another :/11:30
wrtpfwereade: which feature are you on?11:30
fwereadewrtp, upstartification of agents11:31
wrtpfwereade: funny, it *does* seem like that would be fairly independent and not too hard11:31
wrtp(not that i know anything at all about upstart)11:31
fwereadewrtp, indeed, there isn't much that's actually difficult in any way11:32
m_3fwereade: did everybody get out of the lift yesterday?14:08
fwereadem3, yeah, it was cath alone in there, but there for 45 mins or so :/14:09
m_3fwereade: sounds like excitement14:09
fwereadem_3, they came and had a roper look at it today, as nearly as I can tell14:09
fwereadem_3, yeah :/14:09
m_3hope there's not too many stairs to deal with for a while :)14:10
fwereadem_3, heh, 6th floor, was fun taking water up there this morning14:15
fwereadefixed now though14:15
marcoceppiIs it preferred to use the deb for an install, or the latest stable from upstream?14:25
m_3marcoceppi: deb's preferred, just because it's been vetted by security team and tested... but one of the cool features of charms is the option to just use the latest stable from upstream14:59
m_3marcoceppi: give me enough rope... :)14:59
marcoceppiheh15:00
jcastrodidn't we decide on a best practice on this?15:17
jcastrolike a config flag to use a package or just pull from upstream?15:17
marcoceppiThat would be easy enough?15:21
jcastroI could have sworn that's what we talked about at UDS15:21
jcastroand then by default we use the packaged one15:22
jcastrobrunopereira81_: ok, I can test it15:49
brunopereira81_https://code.launchpad.net/~brunopereira81/+junk/teamspeak15:49
brunopereira81_;) thx15:49
jcastrocan someone help brunopereira81_ figure out what's wrong with his local instance?15:51
jcastroI'll start testing the charm on my box15:51
jcastrobrunopereira81_: oh, one thing to check15:52
jcastrotry with a known working charm first15:52
brunopereira81_will do as soon as I have the chance15:53
jcastroin the dir you specified for it to keep the local stuff in environments.yaml there is a log15:55
jcastromine is in: ~/juju/jorge-sample/units/teamspeak-015:55
jcastrook15:56
jcastrofound some errors15:56
jcastrohttp://pastebin.ubuntu.com/742363/15:56
brunopereira81_thats normal :D ill sort it out but havent be able to actually run it till now15:56
jcastroyou want apt-get install -y sqlite3 or whatever15:57
jcastroso that it just installs it without prompting you for all that other crap15:57
brunopereira81_and wget is missing aparently15:57
jcastroheh15:57
brunopereira81_will fix it tonight (3 - 4 hours from now here) and try to get this running in another computer, after its done I'll let you know, if possible maybe we can do this then. thx!16:00
jcastrowoo16:00
jcastrowe'll be around!16:00
_mup_Bug #892236 was filed: Don't ship example charms in /usr/share/doc <juju:New> < https://launchpad.net/bugs/892236 >16:04
fwereadehazmat, do you recall the "restart" Transition in UnitWorkflow?16:05
fwereadehazmat, because it goes from "stop" to "start", and I naively believe that perhaps it ought to be from "stopped" to "started"16:06
hazmatfwereade, hmm.16:06
hazmatindeed16:07
hazmatugh.. missing tests16:07
hazmatfwereade, indeed it should be started to stopped16:08
fwereadehazmat, heh, I'm just trying to get this all to work, I'll be slathering all my changes in tests as soon as I have something that actually does what I want ;)16:08
fwereadehazmat, cool, thanks16:08
hazmatfwereade, for an upstart case and arbitrary process termination.. i don't think we can assume the graph is in any place.. ie. you'll need a started->started transition as well to execute the start hook16:09
hazmatie. if the graph is in a non error state then resume16:09
fwereadehazmat, yeah, I'm taking baby steps still, I kinda want to get everything working in just one case first16:10
fwereadehazmat, if I try to make everything work before I can handle "just restart the machine" I'll take forever16:10
hazmatfwereade, fair enough16:20
noodles775Hi! I'm developing a charm using lxc, and was suprised to receive the following during db-relation-changed (when related to a postgresql service):16:30
noodles775{u'private-address': u'192.168.122.9', u'host': u'localhost', u'password': u'dRqKZi4xNjCk0*****', u'user': u'apache-django-wsgi', u'database': u'apache-django-wsgi'}16:30
noodles775The postgresql readme doesn't mention private-address, nor why host would be localhost (even for an lxc container, I assumed it'd be 192.168.122.9 - the IP of the unit?)16:31
_mup_Bug #892254 was filed: SSHClient does not properly handle txzookeeper connection errors <juju:New> < https://launchpad.net/bugs/892254 >16:40
jimbaker(i've pulled this bug out because its solution has so far eluded me and while annoying, doesn't actually impact on making a robust connection to ZK)16:43
hazmatnoodles775, private-address is provided by juju automatically18:34
hazmatnoodles775, that version of the postgresql charm isn't able to reliabily resolve the container hostname it seems18:35
m_3noodles775, hazmat: that charm is still out of date18:51
m_3I'm updating nfs and varnish at the moment... I'll clean up pgsql next week18:53
m_3noodles775: please try the latest version and let me know if that resolves correctly in an lxc container19:29
matrix3000hey guys22:57
matrix3000juju doesn't need ubuntu-orchestra does it?22:57
raphinkmatrix3000: iirc it does for bare-metal deployments23:02

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