VMpooler provider for GCE
Find a file
Samuel Beaulieu f6791baba0
Adding support for fully qualified allow list eg user=bob
before thhis change the allow list would only support checking the 'pool' label value
we can now specify a different label name by using the format labename=value where
the equal sign '=' is considered the separator
2021-12-09 11:33:10 -06:00
.github (DIO-2768) Initial gce provider 2021-12-02 14:27:31 -06:00
lib Adding support for fully qualified allow list eg user=bob 2021-12-09 11:33:10 -06:00
spec Adding support for fully qualified allow list eg user=bob 2021-12-09 11:33:10 -06:00
.gitignore (DIO-2768) Initial gce provider 2021-12-02 14:27:31 -06:00
CODEOWNERS (DIO-2768) Initial gce provider 2021-12-02 14:27:31 -06:00
Gemfile (DIO-2768) Initial gce provider 2021-12-02 14:27:31 -06:00
LICENSE adding spec tests 2021-12-07 08:41:55 -06:00
Rakefile (DIO-2768) Initial gce provider 2021-12-02 14:27:31 -06:00
README.md improve revert_snapshot method 2021-12-07 12:12:55 -06:00
vmpooler-provider-gce.gemspec adding spec tests 2021-12-07 08:41:55 -06:00
vmpooler.yaml.example Adding support for fully qualified allow list eg user=bob 2021-12-09 11:33:10 -06:00

vmpooler-provider-gce

This is a provider for VMPooler allows using GCE to create instances, disks, snapshots, or destroy instances for specific pools.

Usage

Include this gem in the same Gemfile that you use to install VMPooler itself and then define one or more pools with the provider key set to gce. VMPooler will take care of the rest. See what configuration is needed for this provider in the example file.

Examples of deploying VMPooler with extra providers can be found in the puppetlabs/vmpooler-deployment repository.

GCE authorization is handled via a service account (or personal account) private key (json format) and can be configured via

  1. GOOGLE_APPLICATION_CREDENTIALS environment variable eg GOOGLE_APPLICATION_CREDENTIALS=/my/home/directory/my_account_key.json

Labels

This provider adds labels to all resources that are managed

resource labels note
instance vm=$vm_name, pool=$pool_name for example vm=foo-bar, pool=pool1
disk vm=$vm_name, pool=$pool_name for example vm=foo-bar and pool=pool1
snapshot snapshot_name=$snapshot_name, vm=$vm_name, pool=$pool_name for example snapshot_name=snap1, vm=foo-bar, pool=pool1

Also see the usage of vmpooler's optional purge_unconfigured_resources, which is used to delete any resource found that do not have the pool label, and can be configured to allow a specific list of unconfigured pool names.

License

vmpooler-provider-gce is distributed under the Apache License, Version 2.0. See the LICENSE file for more details.