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

I've deployed a haproxy->lamp->mysql stack using juju. It seemed pretty straight forward and it works well from my tests. I've also seen its easy to scale a layer and add extra units to the lamp servers for example. The rest of our configuration on the server is done by puppet.

However within the same environment "ec2" (specified in my environments.yaml) in this case, I wish to deploy another set of servers using the same formular haproxy->lamp->mysql.

However it doesnt seem possible as you get this error:

ERROR Service name 'mysql' is already in use

Is there a way to do this?

I had the idea to create separate environments in the yaml file with the same EC2 credentials but this seems like its going to spin up an extra juju config server per environment. As we are running over 250 web sites in these type of stacks that means an extra 250 servers on our AWS bill which is far from ideal.

Ideally I'm aiming to deploy multiple haproxy->lamp->mysql stacks without having to create new charms for each website.

Any suggestions welcome or if it can't be done I need to rethink things.

share|improve this question
up vote 5 down vote accepted

Yuu can explicitly name services in juju. So for for example instead of:

juju deploy haproxy
juju deploy mysql

you can just name them whatever you want:

juju deploy haproxy mynewproxy
juju deploy mysql dbserver2

or whatever fits your model. You just need to remember to add-relation based on name after that, so: juju add-relation mynewproxy dbserver2

It's awesome that you're using juju for this, if you want to give us some feedback on how it's working out for you please send a post to the juju mailing list.

share|improve this answer
Ahhh explicit naming may just work! – ric_harvey Nov 12 '12 at 14:22
Yeah this works perfectly thanks for your help Jorge Castro – ric_harvey Nov 12 '12 at 16:11

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.