proper way to deploy to one server (lxc based)

Charles Butler charles.butler at canonical.com
Wed Oct 8 09:55:58 UTC 2014


Vasiliy,

it is indeed possible to deploy all units to machine 0 and isolate services
with containers on that bootstrap node. This is hte power of juju, giving
you enough freedom to try interesting things, and the ability to shoot
yourself in the foot.

juju bootstrap
juju add-machine lxc:0 -n 2
juju deploy mysql --to 0/lxc/0
juju deploy wordpres --to 0/lxc/1
juju deploy haproxy --to 0
juju add-relation mysql wordpress
juju add-relation haproxy wordpress

What's happened in the above command chain:

You created the bootstrap node, machine 0
you've added 2 lxc containers which can communicate over the host bridge
you've put MySQL and Wordpress in respective containers
You've hulk-smashed haproxy on the bootstrap node
you've added a relation between haproxy and wordpress, which works as its
doing host-only networking


Now there are caveats with this deployment topology. This will not suport
scale out operations without some additional work in private networking.
You've also put quite a bit on the bootstrap node, which is already
resource intensive, so you may need to start with a larger machine type
than what is provided as default
You're running in a non-recommended deployment strategy at present smashing
services on the bootstrap node, but if you know what you are doing, this is
perfectly acceptable but you may see some odd behavior and should be
careful to note any inconsistencies you encounter.

And finally, if this setup works for you famously, follow up on the list
with us about your experience.

Hope this helps

Charles

On Wed, Oct 8, 2014 at 5:33 AM, Vasiliy Tolstov <v.tolstov at selfip.ru> wrote:

> 2014-10-08 10:35 GMT+04:00 Andrew Wilkins <andrew.wilkins at canonical.com>:
> > Not as a first-class citizen in Juju. There's
> > https://github.com/cmars/juju-nat, but I've just spoken to the author
> who
> > informs me that it currently has some issues.
> >
>
> Thanks!
> >>
> >> Or does it possible to install for example http proxy charm on node 0
> >> that route all needed traffic to containers... ?
> >
> >
> > That should work. Deploy ha-proxy to machine 0 and relate it to nginx.
>
> Hm, but juju can't deploy to machine 0, does it possible via relation
> system configure ha-proxy on machine 0 to serve to container nginx ?=)
>
>
> --
> Vasiliy Tolstov,
> e-mail: v.tolstov at selfip.ru
> jabber: vase at selfip.ru
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20141008/728fc01c/attachment.html>


More information about the Juju mailing list