Juju support for external services?
Clint Byrum
clint at ubuntu.com
Fri Aug 10 17:08:16 UTC 2012
Excerpts from Thomas Leonard's message of 2012-08-10 02:30:53 -0700:
> Is it possible to connect juju-deployed services to pre-existing ones?
>
> e.g. something like
>
> juju deploy wordpress
> juju register nagios ...
> juju add-relation wordpress nagios
>
> to monitor a service with a pre-existing Nagios? Of course, we'd expect to
> need a bit of scripting to provide our end of the nagios monitoring
> interface here.
>
> Some of the services we'd like to connect to aren't open source, or need to
> run on very specific hardware, so this would be very useful.
>
Expanding on Marco's idea of subordinates, this is definitely doable. In
fact I've written a charm for Amazon's Elastic Load Balancer for just
that purpose:
http://jujucharms.com/~clint-fewbar/precise/elb
This basically puts the API to do all the remote interaction on the client
machines. In some cases, this might not be a good idea since you're giving
machines some admin rights on a remote service. You can get around this
particular limitation by creating a primary service to do the API calls
and then deploying it onto a relatively inexpensive resource (such as
a t1.micro on EC2). For ELB, having the creds on the instances is fine,
because you can use IAM to limit the credentials for the ELB service to
just those needed to manage an ELB.
For your nagios example specifically, you're likely better off using the
juju status output to generate nagios configs than trying to bend the
nagios charm to configure an in-place nagios service. Another option
is to have a juju controlled nagios service monitor the juju things,
but then feed its data into your existing nagios.
Long term I'd love to see juju grow a way to run its agents on
arbitrary hosts so that juju can be more gently integrated into existing
environments. Thats going to take a lot of thought though, because one
of the things that makes juju charms so simple is that they can generally
assume full control of the service they are meant to manage.
More information about the Juju
mailing list