Charm verification
Gustavo Niemeyer
gustavo at niemeyer.net
Fri Dec 23 18:12:01 UTC 2011
> So far I've got working charms for BitlBee and Loggerhead. They're both
> really simple network services, and thus obvious candidates for a first
> charm.
>
> Over the holidays I hope to get the Samba 4 Active Directory DC in a
> charm working. Being able to have an easily scalable Windows domain
> would be really nice (I don't think that's even possible with Windows
> Server). That's probably going to be more challenging.. :-)
Wow, that sounds fun indeed.. we should totally blog about it if you
pull it off. :-)
> I should warn you that it's a bit of a hack...
>
> What the script for BitlBee does:
>
> * parses the output of "juju status" and "juju get" to find the relevant
> address/port for the specified service/unit
> * connect to the server and run a few basic tests to see that it's up
> and not completely broken
> * writes out OK or FAIL and sets the appropriate exit code
Ah, interesting. It's exercising the charm through the real service
interface then. I understand your association with nagios now, ok.
> in other words:
>
> $ ./verify bitlbee/0
> OK
>
> This works for bitlbee because the port is in the configuration. I guess
> in an ideal world it would actually join/leave the chat-server relation
> and obtain the host/port for the irc interface. I couldn't work out how
> to do that in a couple of lines of Python code though.
You'd need another service/charm for it to pair with, but should be doable.
> So it's more akin to a nagios check than a testsuite at the moment.
> There is probably some overlap, but they seem to be different things. My
> script won't change the active configuration and could be run against
> something that is in production - I imagine a testsuite would tweak the
> configuration. I'm very interested in testsuites as well though.
Right, I see where you're going. This is very cool. I'll let you know
once I have a more interesting plan for the testing approach for
review then, to see how much of that problem we can solve together.
--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog
-- I'm not absolutely sure of anything.
More information about the Juju
mailing list