I want to make a bundle where I specify which machine to deploy a charm to. Is this possible?

share|improve this question
up vote 1 down vote accepted

Yes, you can do machine placement with a bundle, note to to argument:

bundlename:
  services:
    mysql:
      # The only machine id supported is machine 0
      to: 0
    wordpress:
      units: 3
    redis-server:
      units: 3
      to: [lxc:wordpress, wordpress]
    ceph:
      units: 4
      to: [wordpress, wordpress, wordpress, wordpress]
    serenade:
      to: lxc:wordpress=2

I do not think it's possible to deploy to a specific machine # other than 0 (because we probably don't know the number until after deployment), so it might be useful to deploy to other service names instead of unit numbers.

Reference:

Another option might be to use use machine constraints to ensure you get a certain class of machine.

share|improve this answer
    
I'm using the manual provider, so I know about the machines and the numbers before the deployment of the charms... I'll see if I can specify other machine numbers with the manual provider. – Galgalesh Mar 3 '15 at 21:14

Your Answer

 
discard

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.