Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Well the headline basically says it all.

I have a small testing environment running, and this question pops up. Not all charms need a whole node for them selves. Is it possible for me to deploy both mysql and wordpress charm on one machine?

If yes, how do i do that. And yes, i have been looking around and also found something called subordinate services which could look like a solution to that, but i am not sure and defiantly not sure how to set that up..

Anyone who can help me here?

share|improve this question
up vote 5 down vote accepted

--to is what you looking for:

juju deploy wordpress --to 0
juju deploy mysql --to 0

Will deploy to the same 0 node.

References and examples:

share|improve this answer

In theory, you can also use linux containers on the same machine or even your local machine. With linux containers you'll have some form of isolation between processes and each charm will get its own IP address from the DHCP server on your dedicated subnet (if you have a DHCP server installed).

This is working for local openstack test environments, but its not working for all charms. In particular it has problems with deploying wordpress.

Wordpress deployed with LXC fail

If you have a physical machine at you disposal you can try this:

juju deploy --to lxc:0 mysql
juju deploy --to lxc:0 wordpress
juju add-relation mysql:db wordpress:db
juju expose wordpress

This will deploy mysql and wordpress on machine0 (your first juju machine) and both in isolated linux containers.

You can find some great articles about LXC in the following series:

Your first Ubuntu Container

In general it is adviced not to deploy charms without any form of isolation (aka without LXC/LXD/KVM) on the same machine. But in this case, I believe, you are stuck with doing just that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.