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?


--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:

| 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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