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 am trying to deploy HA ceph like shown in OpenstackHA But i wanted to deploy Ceph MON and Ceph OSD on same 3 machines. So in order to that, my 1st cmd will be,

juju deploy --config local.yaml -n 3 local:ceph

and 2nd cmd, i am wondering how i should do, coz i want to deploy CEPH-OSD to same machines. something like this,

juju deploy --force-machine 0 --config ceph.yaml local:ceph-osd
juju deploy --force-machine 1 --config ceph.yaml local:ceph-osd
juju deploy --force-machine 2 --config ceph.yaml local:ceph-osd

or can it be like this,

juju deploy --force-machine 0,1,2 --config ceph.yaml -n 3 local:ceph-osd

I have not tried these command actually and not good aware of cmd syntax also, thats why i am asking it here

share|improve this question
up vote 2 down vote accepted
$ juju add-unit -h
usage: juju add-unit [options] <service name>
purpose: add a service unit

-e, --environment (= "local")
    juju environment to operate in
-n, --num-units  (= 1)
    number of service units to add
--to (= "")
    the machine or container to deploy the unit in, bypasses constraints

Service units can be added to a specific machine using the --to argument.
 juju add-unit mysql --to 23       (Add unit to machine 23)
 juju add-unit mysql --to 24/lxc/3 (Add unit to lxc container 3 on host machine 24)
 juju add-unit mysql --to lxc:25   (Add unit to a new lxc container on host machine 25)
share|improve this answer
"juju add-unit ceph-osd --to 1" will be after 1st cmd "juju deploy --force-machine 0 --config ceph.yaml local:ceph-osd" ? Because i don't see in add-unit cmd syntax that we can specify ceph.yaml? – SaM Aug 20 '13 at 10:34
yes, its deploy for config and 1 unit, and then add-unit twice for the additional ones. – Kapil Thangavelu Aug 20 '13 at 11:59

From a Juju developer:

We discussed it, but I think we ended on --to and -n together is an error. We might support something like --to ec2:us-east-1b -n5 in the future. But for now, you have to deploy and then add-unit --to 2, etc.

share|improve this answer

Also worth noting that the ceph charm is a superset of the ceph-osd charm; i.e. the ceph charm provides MON's and OSD's. If you just want three machines, just use the ceph charm.

See Installing ceph and ceph-osd charms on same machine? for more details.

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.