/srv/irclogs.ubuntu.com/2013/12/01/#juju.txt

lazypowerHas the testing framework for juju been finalized?00:13
lazypower*juju charms00:13
marcoceppilazypower: basically, yes01:18
marcoceppithere's a new release of a testing tool, amulet, coming out next week. But the structures of tests are essentially the same. files in tests/ are run and need to exit with either 0 (OK), 1 (FAIL), or 100 (SKIP)01:23
lazypowerCan you point me to the documentation for this? none of the example charms I chose have a tests/ directory.01:25
lazypowerOh, nevermind its on github where it should be: https://github.com/marcoceppi/amulet01:26
marcoceppilazypower: the documentation is out of date, that's being updated too :)01:26
lazypowerwell thats handy01:26
lazypowerOk, i'll continue hacking in rinse/repeat mode until notification that amulet is up2date01:27
marcoceppilazypower: should be up around Tuesday01:32
marcoceppilazypower: here's an example of a test using amulet: https://gist.github.com/marcoceppi/772754301:37
lazypowermarcoceppi: I've got a prototype subordinate charm written for papertrail thats working for rsyslog integration. There's another unit provided by papertrail for arbitrary file tailing and logshipping. Is there a preferred method for adding multiple resources like this in configuration?01:43
lazypowerOr would a smarter approach be to split the charm into 2 flavors, one for rsyslog, and another charm that would house the path for this arbitrary log resource, and deploy multiple subordinates to accomplish the logshipping?01:44
marcoceppilazypower: there's a few ways to tackle this one. The easiest is to make it a configuration option, something like "additional-logs" and then have a user pass in a comma seperated list. The next would be to have the interface specify this, but that would require either a new interface or a change to the existing one (if there is one). Another option would be to have the interface change, but also have the charm do some basic checking. Like01:46
marcoceppiinstead of just rsyslog, have a config options for "all-logs" as a boolean, where it will automatically do everything in /var/log/*01:46
lazypowerWhat if i'm running a local resource that doesn't log to /var/log?01:46
marcoceppilazypower: I wouldnt' split the charms. I would instill both logics in one charm and switch based on context (either relationship, configuration, etc)01:46
marcoceppilazypower: configuration option. This might actually be available in the logging interface, let me check01:47
lazypowerhttp://manage.jujucharms.com/charms/precise/logstash-agent - seems to achieve this with an array type.01:47
lazypowerok, i like how logstash did it. I'll add the boolean flag for all logs, and a sibling config value for specific log files.01:49
marcoceppilazypower: that's actually pretty janky. It's abusing type casting within YAML and Juju01:49
lazypoweroh01:49
lazypowerwell nevermind then01:49
marcoceppilazypower: the idea is good, the implementaiton is a bit..not user friendly01:49
lazypowerIt looked really nice though, having an array type01:50
marcoceppilazypower: yeah, except we don't have a true array type in juju configruation, it's basically a string representation of a json array01:50
marcoceppithen it's coercing that in to an array during the hook, not exactly user friendly (dev friendly, sure)01:50
lazypowerif I cleary document that, with a #todo left in the readme, think it'll get enough traction to be useful or would I get dinged during review?01:51
lazypower*clearly01:51
marcoceppia " " space seperated list, or comma delimited list that gets parsed in the hook is much better approach for fomat01:51
lazypowerok. i can do that.01:51
marcoceppilazypower: something else to consider, we don't have a logs interface yet (or a logging one). You could create a spec for one so that charms could reveal where their logs were in addition to having users set it via config01:52
marcoceppione less thing for the user to do if charms adopt that new interface01:52
marcoceppithat's not a requirement, just something to consider01:52
lazypowerhmm... good idea.01:52
lazypowerI'll open a Feature Request on it01:52
marcoceppicool01:52
marcoceppiit might be worth while for us to consider adding "make sure services logs are present in /var/log" as a best practice for charms01:53
lazypowerhttps://github.com/chuckbutler/papertrail-charm/issues?labels=&state=open01:56
lazypoweri know the upstream version of this needs ot be in bazaar, but if you think of anything ot add to the FR would you add it?01:56
marcoceppilazypower: I'd have to look at the charm. I typically do that during reviews ;)01:59
marcoceppiif I have some time tomorrow I'll poke at it01:59
marcoceppilazypower: I recommend running `juju charm proof` in the charm directory, as it'll cover most of the things formatting wise that need to be done to the charm02:00
lazypowerOk, Thank you.02:06
=== CyberJacob|Away is now known as CyberJacob
Luca__Does anybody know how network are set up on nodes managed by charms? I am having hard time finding documentation about underlying network infrastructure10:37
marcoceppiLuca__: there's not much that happen there now. A little bit is done by juju on maas, but otherwise the provider is responsible for networking'10:44
Luca__marcoceppi: would you mind providing few more details or point to some doc? as far as I could see maas nodes gets a br interfaces where eth0 is included, and a lxcbr0 bridge.10:48
Luca__marcoceppi: I am trying to deploy openstack HA using jamespage documents, but cant fully understand how network interfaces are managed by juju, and looks like the documentation is not quite what I expect10:50
marcoceppiLuca__: I'm not sure where it's documented, and only recently was some additional networking stuff added10:50
Luca__marcoceppi: in an usual openstack deployment I would see at least 3 different network, one for management, one for storage and one for public/floating. Not sure how to include all those into the charms10:51
Luca__marcoceppi; https://wiki.ubuntu.com/ServerTeam/OpenStackHA10:51
Luca__marcoceppi: there jamespage uses different networks for maas maas and ie. mysql vip however from the example it looks like this address is defined on eth0, which is already used for the maas nodes, therefore it is somehow not very clear10:56
Luca__marcoceppi: I will be boarding in few minutes but may be online in 3 hours if you are still available10:59
marcoceppiLuca__: yeah, I've not used the openstack charms so I can't speak to them in a MAAS setup11:00
jamespagemarcoceppi, man - I keep missing him11:45
jamespagethe answer is that the openstack charms currently assume a flat network11:45
jamespage(multi-network support is in dev - but not beta or GA yet)11:46
marcoceppijamespage: cool, he said he'll be online in a few hours, hopefull you can catch him again!14:04
aquariusmarcoceppi, how do I set "host names" in discourse's database.yml? That file says "this was created by juju, do not edit"14:54
marcoceppiaquarius: oh, that's something I need to fix still. You can't at the moment. You'll need to manually edit it for the time being14:55
aquariusI should edit that file even though it says in big letters not to? :)14:55
aquariusif I deploy a new version of the charm, won't it get overwritten?14:55
marcoceppiaquarius: yes ;)14:55
marcoceppiaquarius: it will, but I'll have a hostname configuration option by then14:55
* aquarius laughs14:56
aquariusOK :)14:56
aquariuswhen Bad Voltage's discourse stops working, I'm going to blame you ;-)14:56
aquariuson the other hand you *did* make it so I could deploy in 4 lines of code, which has earned you a sizeable block of credit ;)14:56
aquariusdo I have to restart discourse somehow to make it pick up changes to that file?14:57
=== freeflying is now known as freeflying_away
aquariusmarcoceppi, ^15:00
marcoceppiaquarius: just the webs, `sudo stop discourse-webs; sudo start discourse-webs` should do it15:00
aquariusI don't have a discourse-webs?15:01
aquariusjust discourse and discourse-sidekiq?15:01
marcoceppiaquarius: what's `initctl list | grep discourse` show?15:01
marcoceppiaquarius: odd, you should have a ton of upstart scripts15:01
aquariusjujud-unit-discourse-0 start/running, process 927815:01
aquariusdiscourse-sidekiq start/running, process 5365515:01
aquariusdiscourse-clockwork stop/waiting15:01
aquariusdiscourse start/running15:01
aquariusdiscourse-webs stop/waiting15:01
aquariusdiscourse-web (3000) start/running, process 5353715:01
aquariushrm15:01
aquarius-webs isn't even running15:01
marcoceppiaquarius: okay, you have to manually stop discourse-web, then run discourse-webs15:02
marcoceppiaquarius: that's okay, discourse-webs is like a meta upstart thing15:02
marcoceppiI don't think I have it coded correctly15:02
marcoceppisudo stop discourse-web PORT=3000; sudo start discourse-webs15:02
marcoceppiand discourse-clockwork is legacy, it should be stopped if you have the latest discourse15:02
aquariusit is stopped, so that's OK15:03
aquariusright, we seem to be up and running again :)15:03
marcoceppi\o/15:05
marcoceppiaquarius: in versions soon to be coming, you'll be able to restart discourse with 0 downtime :)15:05
aquariusnice!15:05
marcoceppiaquarius: keep the feedback coming, happy to implement things for people using the charm in production15:14
aquariusmarcoceppi, if I add a different header, will that also get overwritten on a new deployment?15:14
marcoceppiaquarius: if you're doing everything either in the customization are or a plugin, then no it'll work between deployments15:16
marcoceppiso long as you're using the same database (for the admin customizations)15:16
marcoceppiforgot to mention the database is vital, but it's easy to dump and reimport15:18
* marcoceppi should put instructions in the readme15:19
aquariusmarcoceppi, how can I check whether discorse is sending emails correctly?15:23
marcoceppiaquarius: there's an email testing screen in the admin panel under "Email"15:24
aquariusIt sent an email yesterday, but I've just tried setting up a new user and it didn't arrive15:24
aquariusoh, really? brilliant!15:24
marcoceppiaquarius: how long ago? Emails send about every 5 mins15:24
aquariuslonger ago than that15:24
aquariuswill try the email test thing15:24
marcoceppiaquarius: you can also check /sidekiq to see what's going on with the periodic jobs15:25
marcoceppithat will list failed tasks, etc15:25
aquariustest mail not arriving either :(15:32
aquariusok, mail is a problem at my end16:01
marcoceppiaquarius: if you have a legit smtp server (other than sendmail) you can add those details to /home/discourse/discourse/config/environments/production.rb16:02
aquariusand you have to restart discourse, not just discourse-webs, to pick up database.yml changes :)16:02
aquariusnah, mail arrives for jono, so it's my fault ;)16:02
marcoceppiaquarius: interesting, good to know16:02
marcoceppiah16:02
marcoceppiaquarius: check your spam?16:02
aquariusgnaaaaah there they are16:03
aquariusthank you :)16:03
marcoceppiaquarius: I recommend using a real SMTP server and not just sendmail, or more people may have that problem18:11
aquariusya, but that means I have to *have* a real smtp server, which I do not ;)18:14
=== CyberJacob is now known as CyberJacob|Away

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