add-machine and add-unit to this machine

Dimiter Naydenov dimiter.naydenov at canonical.com
Wed Aug 6 12:26:21 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Juju CLI won't give you the machine ID in a script-friendly format, so
you have 2 options:

1) Use juju-deployer, which supports complex, scripted deployments
with juju and offers a lot of customization and tunning.
Docs: http://pythonhosted.org/juju-deployer/
Source: https://launchpad.net/juju-deployer
(you can apt-get install juju-deployer)

2) In you script, parse the output of juju add-machine to extract the
machine ID from the "created machine XXX" string an use it.

I hope this helps!

On  6.08.2014 15:15, Ilisia Felane wrote:
> Yes, ok, I know do that manually. but for a script, I try to create
> a new machine and install over an entire service. Without having to
> know the number of the machine. This seems possible MaaS creating a
> machine with a tag, but not implemented for the Cloud.
> 
> My question is how can I create a machine identified under a
> certain name and install it as a service you need via this
> identifier.
> 
> 
> 2014-08-06 13:34 GMT+02:00 John Meinel <john at arbash-meinel.com 
> <mailto:john at arbash-meinel.com>>:
> 
> When you do "juju add-machine" it should print out a line like: 
> created machine 10
> 
> You should be able to then do: juju add-unit SERVICE --to 10
> 
> John =:->
> 
> 
> 
> 


- -- 
Dimiter Naydenov <dimiter.naydenov at canonical.com>
juju-core team
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJT4h7tAAoJENzxV2TbLzHwd2sH/RUR4XZLHZH6R8oXqzCMnixP
zUSt5IrzLFfsSaNRpzlEP63JWEmGgJpSOVudBTF8mug/7DYhAmHGc+Usyn/JPMIg
RR77x3nonB2OBRmLjKcaw1mWY6Tqxpdy9gdepE/bxygi4vY68mNd1hBQaVGAtsrE
fDCgPFFHDhrMXXu5t5EUZdfJzgUlf/GYC9wJnKB3RyyKsgGRSXWu2Wq2bKtBdpr8
SdRLphOul4iE5KquRrnUb+bqoBolL/Sw94lITw6nTWYQRo9E6abvfNxPnUhVKxd9
gCxrKfIVlQJiZBWSOzZUl7GyP8y8Dp8C56UFFORVGuIk4UKXxRy9rn9y0fcTzl4=
=JoBu
-----END PGP SIGNATURE-----



More information about the Juju mailing list