ministryofjustice / salt-cloud-provider-vcloud

Salt Cloud Provider for VMWare vCloud
MIT License
13 stars 7 forks source link

salt-cloud-provider-vcloud

Salt Cloud Provider for VMWare vCloud Directors (5.1) for Salt Cloud ( >= v2014.1.0, the integrated salt cloud rather than the standalone component)

Features

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.

Things this won't do

Will this work for me?

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)).

Configuration

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.

salt-cloud config files

cloud.providers

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

cloud.profiles

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.

cloud.map

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

Configuration reference

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.)

Contributing

How to Contribute

  1. Clone this repository.
  2. Add your feature/bug fix with unit tests
  3. Submit a pull request on GitHub.