mirror of
https://github.com/puppetlabs/vmpooler-provider-gce.git
synced 2026-01-25 19:18:40 -05:00
adding spec tests
This commit is contained in:
parent
b631570871
commit
2a0e9f5bdc
9 changed files with 1278 additions and 41 deletions
32
README.md
32
README.md
|
|
@ -1,6 +1,32 @@
|
|||
# vmpooler-provider-gce
|
||||
|
||||
This is a WIP - do not use yet. Provider for GCE VMs in vmpooler.
|
||||
This is a provider for [VMPooler](https://github.com/puppetlabs/vmpooler) allows using GCE to create instances, disks,
|
||||
snapshots, or destroy instances for specific pools.
|
||||
|
||||
Vm has a label 'pool' that represent the VMpooler OS/pool it is part of
|
||||
Boot disk had a label 'vm' that represent the vm_name it is attached to
|
||||
## 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](https://github.com/puppetlabs/vmpooler-provider-gce/blob/main/vmpooler.yaml.example).
|
||||
|
||||
Examples of deploying VMPooler with extra providers can be found in the [puppetlabs/vmpooler-deployment](https://github.com/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|pool=$pool_name|for example 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| for example snapshot_name=snap1, vm=foo-bar|
|
||||
|
||||
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](http://www.apache.org/licenses/LICENSE-2.0.html). See the [LICENSE](LICENSE) file for more details.
|
||||
Loading…
Add table
Add a link
Reference in a new issue