Contains Dockerfiles and a Helm chart that are used to deploy VMPooler.
The docker image contains these VMPooler components:
- VMPooler Core
- VMPooler Google CloudDNS Plugin
- VMPooler EC2 Provider
- VMPooler GCE Provider
- VMPooler vSphere Provider
GitHub Actions publishes images to GitHub Packages. Browse the VMPooler containers: https://github.com/puppetlabs/vmpooler-deployment/pkgs/container/vmpooler-deployment%2Fvmpooler
The vmpooler released docker image tags use semantic versioning; the version increments correlate to the increments in any of the gems at docker/Gemfile
.
Image tags starting with pr<PULL REQUEST NUMBER>-<GIT SHA>
are generated when opening and pushing to a pull request and will periodically be cleaned up.
The docs
folder represents a Helm repository served via GitHub Pages at https://puppetlabs.github.io/vmpooler-deployment
$ helm repo add vmpooler-deployment https://puppetlabs.github.io/vmpooler-deployment
"vmpooler-deployment" has been added to your repositories
Update the helm chart in helm-charts/vmpooler. Run ./update-chart
.
Prerequisites:
- Become familiar with the configuration file
docker/vmpooler.yaml
as described in VMPooler Core.- The default configuration file enables the dummy provider built into VMPooler Core. See each project for documentation on how to use provider specific options:
- If you are not using Dynamic DNS, then the following DNS plugins can be used to manage records across different compute providers:
- Chose a Development method:
-
Develop via local source:
-
Clone all of the known vmpooler projects listed at vmpooler-components under a common directory, for example:
|-- vmpooler-projects | |--vmpooler | |--vmpooler-deployment | |--vmpooler-dns-gcp | |--vmpooler-provider-ec2 | |--vmpooler-provider-gce | |--vmpooler-provider-vsphere
-
From the
vmpooler-projects/vmpooler-deployment
directory rundocker compose -f docker/docker-compose.dev.yml up --build
-
-
Develop via Git source:
- For the component(s) you are developing on, commit and push changes to a branch.
- Change to the
docker
directory and modify theGemfile
as needed to pull the gem(s) from your git branch. - Run
./update-gemfile-lock
to update theGemfile.lock
- Run
docker compose build && docker compose up
.
-
When a dependency Helm chart is updated, always run ./update-chart-lock
to update the lockfile, otherwise the test and release workflows will fail.
These are the default ports used in the docker compose file. To change them edit the ports
key under the service in either docker/docker-compose.yml
or docker/docker-compose.local.yml
.
Tracing data is sent to the Jaeger instance, a prometheus server scrapes metrics, and both are pre-configured in Grafana as datasources for easy visualization and history of data.
App/Endpoint | Path |
---|---|
Redis Server | localhost:6379 (Password: vmpooler ) |
Redis Commander | http://localhost:8080 (Credentials: admin:admin ) |
Jaeger | http://localhost:8081 |
VMPooler API | http://localhost:8082/api/v3 |
VMPooler Dashboard | http://localhost:8082/dashboard |
Metrics (API) | http://localhost:8082/prometheus |
Metrics (Manager) | http://localhost:8083/prometheus |
Prometheus Server | http://localhost:9090 |
Grafana Server | http://localhost:3000 (Credentials: admin:admin ) |
Helm charts are hosted with GitHub Pages since GitHub Packages does not support Helm, so you will need to build the chart locally and push the chart to your own helm repository. Follow these steps to generate a chart to host internally:
- Update the "appVersion" key in
helm-charts/vmpooler/Chart.yaml
to the docker image tag that was generated by opening a pull request. - Update the "version" key to a pre-release tag, something like "x.y.z-rc.1", then run
./build-chart
to build the chart locally, and upload it to your desired location.
Artifactory Example:
curl -H 'X-JFrog-Art-Api:<YOUR_API_KEY>' -T vmpooler-x.y.z-rc.1.tgz "https://artifactory.example.com/artifactory/helm__local/vmpooler-x.y.z-rc.1.tgz"
Create a GitHub tag and release, publish a new docker image, and helm chart by opening a release prep pull request and running the release action below.
NOTE: Due to the GitHub limitation that does not allow any method of bypassing status checks on a protected branch, the process below will publish the helm chart pointing to a nonexistent docker tag until the release workflow is run.
- Increment the "appVersion" key in
helm-charts/vmpooler/Chart.yaml
appropriately based on changes todocker/Gemfile
anddocker/Gemfile.lock
in merged pull requests since the last release.- This key pertains to the docker tag that will be pushed upon release.
- Increment the "version" key in
helm-charts/vmpooler/Chart.yaml
appropriately based on changes to the chart itself and increments of the "appVersion" in merged pull requests since the last release.- This key pertains to the helm chart verison that will be pushed upon release.
- Run
./update-changelog
to updateCHANGELOG.md
. - Run
./build-chart
to package the new chart and update the repo index. - Commit and push changes to a new branch then open a pull request against
main
and be sure to add the "maintenance" label. - After the pull request is approved and merged, then navigate to Actions --> Docker and Helm Release --> run workflow --> Branch: main --> Run workflow.
- This action will push a tagged docker image to the GitHub container registry and helm chart to GitHub pages.
vmpooler-deployment is distributed under the Apache License, Version 2.0. See the LICENSE file for more details.