/srv/irclogs.ubuntu.com/2013/09/25/#juju.txt

=== defunctzombie is now known as defunctzombie_zz
=== defunctzombie_zz is now known as defunctzombie
ZonkedZebraHey. I'm developing a charm and trying to debug one of the hooks. What is the best to recover a node from an error state. According to the docs error state nodes don't run upgrade hooks.00:59
sarnoldZonkedZebra: I think ssh to the unit, fix it up, and run juju resolved01:03
davecheneysarnold: ZonkedZebra01:03
davecheneyjuju resolved --retry $UNIT && juju debug-hooks $UNIT01:04
davecheneywill retry the failed unit01:04
sarnoldooh! --retry :) very nice01:04
davecheneythen immediately (before that is actioned) start debug-hooks so you can run the unit yourself01:04
davecheneys/unit/hook01:04
ZonkedZebrain the debug-hooks it appears to drop be right before the script is exacted. Is there something functionality there I am missing? tailing /var/log/juju/unit-* has provided the best feedback so far01:05
davecheneyZonkedZebra: you get to run the hook, debug the hook01:06
davecheneythe name of the hook will be in the $PS101:06
davecheneyso, if the hook that failed is config-changed01:06
davecheneyat the prompt, type01:06
davecheneyhooks/config-changed01:06
davecheneysee where it breaks01:06
davecheneyfix it01:06
davecheneyrun it again01:06
davecheneywhen you're happy that it has worked01:07
davecheneyexit 001:07
davecheneywill take you to the next hook queued01:07
davecheneywhen you've processed all the hooks01:07
davecheneyexit the final shell01:07
ZonkedZebrathose changes will be saved on that node?01:07
davecheneyno01:08
davecheneyyou will need to apply those changes to your charm01:08
davecheneythen use something like01:08
ZonkedZebraInteresting, guess I can copy back out when done. I was just updating locally and then upgrading the charm01:08
davecheneyZonkedZebra: the best mental model of a chamr is to expect them to avaporate at any second01:08
davecheneyany chanes done on the unit themselves are not saved anywhere01:08
ZonkedZebradavecheney: I can figure that part out :) thanks01:09
davecheneyZonkedZebra: sorry mate, it wasn't my intention to talk down to you01:19
cespare(very new to juju -- about 5 min into the docs) does juju set-constraints just change a configuration file?01:21
cespareI'm trying to understand how all these settings you're making would be shared with your team01:21
cespareI guess you keep your whole ~/.juju in version control?01:21
davecheneycespare: yeah, the .juju directory started simple but now contains a lot of files which all need to be on every client01:22
davecheneywe're trying to address this01:22
davecheneybut it won't happen on a timeframe useful to this discussion01:22
cesparedavecheney: ok thanks01:22
cespareis there a way to use something other than .juju, perhaps with an env variable or something?01:23
freeflyingdoes ceph charm need a second disk?01:23
davecheneycespare: you can move the location of JUJU_HOME with that environment variable01:24
davecheneyfreeflying: yes01:24
freeflyingdavecheney, any particular reason for the second disk? should only ceph-osd need a second disk?01:24
axwcespare: davecheney's right in general, but set-constraints in particular goes into the state database01:25
cesparedavecheney: ok neato. So is just keeping JUJU_HOME in VC the recommended way of working as a team? The docs feel like they're addressed to a single dev or something01:25
cespareaxw: oh ok, that makes sense01:25
cespareaxw: that's mongo?01:25
axwyup01:25
davecheneycespare: i'd say it's a good idea01:26
davecheneywe dont' have a recommendation01:26
cespareok01:26
davecheneythe contents of .juju are very much in flxu01:26
davecheneywe konw that we keep too much state on dick01:26
davecheneyerr01:26
davecheneydisk01:26
davecheneyand are trying to fix it01:26
davecheneybut it's not top priority compared to other stuff we want to get done01:27
cesparedavecheney: i see. Are you saying that in an ideal world, your .juju would mostly just have enough info to point at the juju configuration server and everything else would be stored there?01:28
davecheneycespare: bingo01:30
davecheneywould you like a job ?01:30
cespareHappy with the one I've got, thanks :)01:30
cesparePlus I could never use bzr for my dayjob. It wouldn't work out.01:30
davecheneyeveryone has their price01:31
cesparecan't argue with that01:31
sarnoldhehe01:33
cespareIs there something I can read about using juju to manage your own application? I suppose it's basically just going to involve writing a charm for it...but what about redeploying it when the code changes, monitoring, logging, etc?01:37
davecheneycespare: juju is configuration management01:40
davecheneyit doesn't do monitoring or process management01:40
davecheneywhat it does do is define a framework for connecting services together01:40
davecheneythe main driver was virtual environments like ec201:40
davecheneywhen the names of the machines are not known ahead of time01:40
cesparedavecheney: ok.01:41
davecheneyprocess management is always tricky01:42
davecheneyjuju doesn't want to be the process manager01:42
cespareSo how would juju help out if, say, I have an application that needs a database. Can I get it to just provision me some machines, and my deploy tool can ask juju for what the latest set of application servers are?01:42
davecheneyie, we don't want to, and in reality cannot demand that processes do not daemonise themselves01:42
davecheneycespare: sort of01:43
davecheneybut not relaly01:43
davecheneyjuju lets you define an environemnt, a collection of services01:43
cespareand then I would want juju to invoke my deploy tool if i add more nodes...:\01:43
davecheneyjuju is your deploy tool01:43
davecheneyyou describe your environment, ie01:43
davecheneyjuju deploy wordpress01:43
davecheneyjuju deploy mysql01:43
davecheneyjuju add-relation wordpress mysql01:43
davecheneyjuju expose wordpress01:43
davecheneyyou don't describe machines, hosts, networks, firewall ports, etc01:44
cesparedavecheney: that all makes sense. Does juju not help with my application servers at all?01:44
davecheneycespare: you'd have to be more specific what kind of help you are looking for ?01:44
davecheneyfor monitoring we have the idea of subordinate charms01:44
davecheneywhich let you descrive things like zenoss and nagios agents01:44
cesparewell, like in my example. I have an application server that I'm hacking on and want to deploy frequently01:44
cespare(forget about monitoring and stuff for now)01:45
cespareit connects to a db that I brought up with juju deploy mysql01:45
freeflyingdavecheney, can we deploy ceph onto machine which only have 1 disk, and ceph-osd to machine has 2 disks01:45
davecheneyyou, you'd describe the process of deploying your application server as a charm01:45
cesparenow, maybe I need to scale up the app server by adding more nodes, or maybe move the db to a different box...does juju do those things?01:45
davecheneyfreeflying: no, ceph rquires two luns01:45
davecheneyyou need to use constraints to make sure the unit is provisioned on a machine with that disk setup01:46
davecheneybut, regretably,we haven't implemented those constraints yet01:46
davecheneycespare: juju does those things01:46
freeflyingdavecheney, what about ceph-osd then01:46
davecheneyfreeflying: that will work01:46
freeflyingdavecheney, one disk for osd will be fine?01:47
davecheneycespare: juju add-unit $SERVICE01:47
davecheneyfreeflying: i guess so, isn't it a dashboard or something01:47
davecheneycespare: juju has the model of one machine per unit of a sevice01:47
cesparedavecheney: ok, so what does deploying version N+1 look like? You build a new version of the charm and then...01:47
davecheneycespare: you have two options01:47
davecheney1. juju upgrade-charm, and write a hooks/upgrade-charm hook that will git pull your code or something01:48
davecheneyor01:48
davecheney2. juju destroy-service && juju deploy $SERVICE01:48
davecheneyor juju deploy $SERVICE $NEW_NAME01:48
davecheneythen destroy the old name01:48
cesparedavecheney: do the subordinate charms break from the one machine per unit of service paradigm?01:49
cesparei.e. can I run the nagios charm with my app server together?01:49
davecheneycespare: yes01:49
cespares/i.e/e.g01:49
cespareok thanks01:49
davecheneycespare: yes, subordinate charms are deployed 'into' the machine that the thing they are subordinate too01:49
davecheneynagios isn't a subordinate01:49
davecheneyits the server component01:50
cespareoh, the agent, whatever01:50
davecheneynagios-nrpe is the agent01:50
cespareyeah01:50
davecheneyfair warning01:50
davecheneywe understand that the one machine per service unit is a sucky requirement01:50
davecheneyand makes it hard to have 'small' juju environemnts01:50
davecheneywe'er working on fixing that with lxc containers01:50
cesparedavecheney: yeah, saw that in the docs01:50
davecheneybut there are complex problems, mainly around networking in hostile environemnts like ec2 and private openstack clouds which make the problem much harder01:51
cesparedavecheney: sounds good, but actually for our infrastructure we pretty much have a machine per service01:51
cesparei mean (many) dedicated machines per service01:51
davecheneycespare: thta is why i say sevice unit01:52
davecheneythe sevice is the abstract idea01:52
davecheneythe unit is the physical manifestation of one instance of that service01:52
cesparedavecheney: when a charm reacts to the upgrade-charm hook is it supposed to transform itself to the same state as if the upgraded charm were deployed to a fresh machine?01:52
cesparedavecheney: good terminology01:53
davecheneycespare: as the charm author, we push a lot of that work onto you01:53
davecheneyall we do is call the hook and wave our hands that it is your problem to figure out what that means01:53
cespareright, I'm asking if that's what I'm supposed to do as a good citizen01:53
cespareok01:53
davecheneycespare: there are many ways of skinning the cat01:54
cesparedavecheney: pretty easy if the application is a single jar/go binary01:54
davecheneyyou could also use a config variable to define the revision you want to use01:54
davecheneythen your upgrade could be01:54
davecheneyjuju set revision=XXX01:54
davecheneywhich would fire the hooks/config-changed hook and you could do a git pull01:54
davecheneyleaving upgrade charm to only change the actual code of the hooks/*01:55
cespareah01:55
davecheneycespare: at it's core, juju is two things01:55
davecheney1. a generic interface to varoius vm providers01:55
davecheney2. a way of scheduling the remote execution of remote commands01:56
davecheneyany assuptoins above and beyond that have to belong with the charm authors01:56
davecheney(we do push a lot of responsibility to charm authors)01:56
cespareI wish juju worked on digital ocean, that'd be cool02:02
davecheneycespare: we're working on a thing called manual provisoining02:03
davecheneywhich lets you supply machines via ssh02:03
cespareah ok, still totally scriptable though heh02:03
cesparethat would do the trick02:03
davecheneyit's there in tip if you want to try it02:03
davecheneybut not documented because there are a lot of rough edges02:04
cesparedavecheney: thanks for answering all my questions02:05
davecheneynp02:06
=== defunctzombie is now known as defunctzombie_zz
=== freeflying is now known as freeflying_away
=== freeflying_away is now known as freeflying
=== defunctzombie_zz is now known as defunctzombie
=== freeflying is now known as freeflying_away
=== axw_ is now known as axw
=== CyberJacob|Away is now known as CyberJacob
jamespagemarcoceppi, please ping me when you start today re charm-tools update08:10
jamespagemarcoceppi, as its pretty much a complete re-write I need more information before I go speak to the release team08:10
=== defunctzombie is now known as defunctzombie_zz
AskUbuntuSet up nodes for Ubuntu cloud 12.04 | http://askubuntu.com/q/34986711:48
=== freeflying_away is now known as freeflying
=== cereal_b_ is now known as cereal_bars
AskUbuntuError on juju configuration for maas | http://askubuntu.com/q/34989213:18
marcoceppijamespage: ping13:34
jamespagehey marcoceppi13:34
jamespagemarcoceppi, so a few questions re cloud-tools 1.0.0 if you have time13:35
marcoceppijamespage: I've got all the time in the world for this13:35
jamespagemarcoceppi, OK _ so I pulled the packages from the PPA and merged them into the main packaging branch in ubuntu13:35
jamespagethen restored a few files under debian/* that had got dropped13:35
jamespage1.0.0 is a complete rewrite in python right?13:36
marcoceppijamespage: correct, the code is rewritten, the packagining is re-done, and the structure of the package changed13:36
jamespagemarcoceppi, so the rationale is really about supporability going fowards right?13:37
jamespageas the current package is a mix of bash/python and not actively developed13:38
marcoceppijamespage: the current package, 0.3, is no longer maintained. The re-write was to make charm-tools multi-platform and bring it's quality up13:38
jamespagemarcoceppi, OK13:49
ehwhey, guys, is there any way to tell juju which lxc bridge name it should be using?  lxc works fine, but juju is failing with the net device not found error13:57
marcoceppiehw: not that I know of, let me dig through the environments.yaml options14:05
ehwmarcoceppi: thanks; was looking through the source, but it hasn't got any clearer for me14:08
marcoceppiehw: there's two places for config options, one is in the providers code itself, then there's like this global options file that is env.yaml options for all environments14:09
marcoceppiehw: it looks like there's an "JUJU_LXC_BRIDGE" environment variable you can set during bootstrap14:13
marcoceppilet me dig a little more14:13
marcoceppiehw: oh, wait, that's for something different14:13
ehwmarcoceppi: yeah, just tried that, didn't seem to get me what I needed14:14
marcoceppiehw: line 42 of provider/local/environ.go has it hard-coded `const lxcBridgeName = "lxcbr0"`14:14
marcoceppiehw: if you wanted that to be configurable, which isn't out of reason, you'd need to open a bug https://bugs.launchpad.net/juju-core14:15
ehwmarcoceppi: yeah, looks like I'll be doing that14:15
adeuringmarcoceppi: could you please have a look here: https://code.launchpad.net/~adeuring/charm-tools/python-port-check-config/+merge/186080 ?14:17
marcoceppiadeuring: sure can!14:18
adeuringthanks!14:18
marcoceppiadeuring: while you're here14:18
marcoceppiREQUIRED_OPTION_KEYS = set(('description', )) - description is the only req key? I thought type was as well?14:19
adeuringmarcoceppi: http://bazaar.launchpad.net/~charmers/juju/docs/view/head:/source/service-config.rst says that "str" is the default type. so I assume that is not need to be specified (well, unless you want an int or float)14:21
marcoceppiadeuring: ah, gotchya, thanks14:21
ehwmarcoceppi: done.   pad.lv/123030614:29
marcoceppiCharm call, http://ubuntuonair.com and http://pad.ubuntu.com/7mf2jvKXNa16:03
mattywI can't see anything on ubuntuonair?16:14
marcoceppimattyw: http://www.youtube.com/watch?v=UPUO62DQiuw&feature=youtu.be16:16
mattywmarcoceppi, much better tnanks :)16:17
mattywjcastro, can I ask some more questions?16:20
mattywI know you love it16:20
jcastrosure!16:23
jcastrokeep on keeping on!16:23
mattywThese pages: https://jujucharms.com/fullscreen/search/~mattyw/precise/docker-3/?text=docker16:28
mattywhow do they get generated? I expected them to update if I updated the charm - or after some interval - but they don't16:28
=== defunctzombie_zz is now known as defunctzombie
mattywmy 2nd question is: this is what I'm doing with the config http://bazaar.launchpad.net/~mattyw/charms/precise/docker/trunk/view/head:/hooks/config-changed. but it's not really config. is this how the framwork charms work at the moment?16:29
=== defunctzombie is now known as defunctzombie_zz
mattywjcastro, I think that's all my questions actually16:41
jcastrothe pages are generated ... nightly I think? rick_h_ do you know the interval?16:43
jcastromarcoceppi can answer the 2nd one16:43
marcoceppimattyw: that hook looks fine. a lot of my charms do things like that in the conduit changed hook16:46
mattywmarcoceppi, ok cool, glad I get the basic idea16:46
marcoceppiconfig*16:47
marcoceppijcastro: I think we did the charm call to soon?16:50
jcastrono it's always been at this time16:53
jcastroI just moved it to thr wrong spot16:53
jcastrofixed, thanks16:56
=== defunctzombie_zz is now known as defunctzombie
jcastrohttp://highscalability.com/blog/2013/9/25/great-open-source-solution-for-boring-ha-and-scalability-pro.html17:58
jcastroshare/tweet/reddit/whatever please!17:58
CoboldHi all!19:11
AskUbuntuIs there a juju PostGIS charm out there? | http://askubuntu.com/q/35003519:56
jcastrohey popey20:16
jcastrohuh20:20
jcastrohey guys check this out20:20
jcastrohttp://code.scenzgrid.org/index.php/p/jujucharms/20:20
jcastrohttp://code.scenzgrid.org/index.php/p/jujucharms/source/tree/f906376d2ecba34e82e15b1e558e1b9e3c4d4ea1/postgis/precise/postgis/README20:21
=== CyberJacob is now known as CyberJacob|Away
rick_h_jcastro: used to be about every 15min21:57
=== freeflying is now known as freeflying_away
=== thumper is now known as thumper-dogwalk
=== thumper-dogwalk is now known as thumper

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