A GitLab Fleeting plugin for VMware Cloud Director.
This plugin enables GitLab Runner to dynamically provision and manage virtual machines in VMware Cloud Director for CI/CD job execution. It's part of GitLab's Fleeting ecosystem, which replaces Docker Machine for autoscaling runners.
Fleeting is an abstraction layer for cloud providers' instance groups, allowing for the provisioning of multiple identical instances with a minimal API focused on creation, connection, and deletion.
- Dynamic provisioning of VMs in VMware Cloud Director
- Support for both Linux and Windows VMs
- SSH key and password-based authentication
- Customizable VM templates and network settings
- Go 1.x (for building)
- VMware Cloud Director environment
- GitLab Runner with Fleeting support
- The vApp template must have a single VM
- The OS template must have VMware Tools (or open-vm-tools for Linux) installed
- For Windows machines, the OpenSSH service must be enabled (WinRM is not supported)
To build the plugin:
make build
This uses goreleaser
to create the binary.
The plugin requires several environment variables to be set:
VCD_URL
: VMware Cloud Director API URLVCD_ORG
: Organization nameVCD_VDC
: Virtual Data Center nameVCD_NETWORK
: Network nameVCD_NETWORK_ALLOCATION_MODE
: IP allocation mode (DHCP or POOL)VCD_TOKEN
: API token (VCD 10.4+ required)VCD_CATALOG
: Catalog name containing the VM templateVCD_TEMPLATE
: VM template nameVCD_VAPP_NAME_PREFIX
: Prefix for created vAppsVCD_VM_NAME_PREFIX
: Prefix for created VMsVCD_STORAGE_PROFILE
: (Optional) Storage profile name
To run the integration tests:
make test
Note: Ensure all required environment variables are set before running the tests.
This plugin is designed to be used with GitLab Runner's Fleeting executor. Refer to the GitLab Runner Fleeting documentation for setup and configuration instructions.
Contributions are welcome! Please feel free to submit a Pull Request.
This plugin is based on:
- My previous Docker Machine driver for VCD
- The Hetzner plugin for Fleeting
- Joe Burnett's Fleeting explanation on YouTube