Salt Cloud Provider for VMWare vCloud Directors (5.1) for Salt Cloud ( >= v2014.1.0, the integrated salt cloud rather than the standalone component)
We will soon be adding support for creating and controlling firewall rules relating to each box. We might also want to support multi-homed VMs soon.
Hopefully! We'd love to say yes but we can't make any promises - each vCloud
Director API might well behave and new and interesting ways that we haven't
discovered (the one we use was bad enough). If you do use this and find it
doesn't work right for you then open an issue and include an xml session dump
we can try to help (libcloud.enable_debug(sys.stdout)
).
Explaining all of salt-cloud is a bigger task than we want and other people have done it already. For general info on configurating salt-cloud look at the the upstream docs.
You will need to create a section in the cloud.provider file (by default this file is /etc/salt/cloud.provider):
my_vcloud:
provider: vcloud
user: 221.63.6b164a
org: 46-44-3-96a205
secret: super-sekrit
host: api.vcd.example.com
private_key: /root/minion-ssh.pem
ssh_username: provisioning
display_ssh_output: True
vcd_tiny_vdc_a:
provider: my_vcloud
image: ubuntu-precies-ad04aef
size: tiny
vdc: 'my-org-a (BASIC)'
The provider
key is just a string - it just needs to match the key from the
cloud.providers
file.
vcdtiny_vdc_a:
- loadbalancer.myapp:
network: Admin
# These are normal cloud.map settings and nothing to do with this
# provider.
minion:
log_level: debug
grains:
roles:
- loadbalancer
The provider understands the following configuration options below. Any of the options can be specified in the providers, profiles or the map files. (Anything in the map will override the profile which overrides the provider.)
user: Required
vCloud API user id without the '@
org: Required
vCloud organization ID.
secret: Required
Password for user@org in the vCloud API.
host : Required
The hostname where the vCloud Director API lives.
image: Required
Recommended location: cloud.profiles
Which vApp template to build images from.
The name of the vAppTemplate in an accessible catalog for this vCloud organization
vdc: Required
The name of the VDC to create the vApp in. This is the exact string displayed in the vCloud Director GUI, not the underlying ID.
network: Required
The name (not uuid) of the network in vdc
to put this box on. This network
must have IP pool configured.
size: Optional
Size of the VM (RAM & CPU) to configure the box to use. This is a lookup table, not the exact ram/cpu specifications.
ssh_username: Optional
Default: root
Username to use on the minion when bootstrapping the (installing salt-minion)
dnat: Optional
Type: List of integers
Ports to configure in the vShieldEdge to DNAT port forward to the internal IP for this machine. This will automatically set up rules on the first public IP available on the VSE.
How to Contribute