No description
Find a file
2023-08-21 08:54:04 -07:00
.github Revert "Comment changelog validation until jira support is added" 2023-07-10 15:47:05 -04:00
docker (maint) Update vmpooler to 3.4.0, vmpooler-provider-gce to 1.3.0, and vmpooler-provider-vsphere to 3.3.0 2023-08-21 06:53:30 -07:00
docs (maint) Release prep for 3.4.0 2023-08-21 07:20:17 -07:00
helm-charts/vmpooler (maint) Release prep for 3.4.0 2023-08-21 07:20:17 -07:00
.github_changelog_generator Add changelog 2023-01-27 11:55:42 -05:00
.gitignore Improve development experience 2023-08-14 14:17:11 -04:00
build-chart 2.0.0 release prep 2023-01-30 11:16:55 -05:00
CHANGELOG.md (maint) Fix changelog for vmpooler 3.4.0 release 2023-08-21 08:54:04 -07:00
CODEOWNERS Remove DIO as codeowners 2022-08-26 09:36:37 -04:00
LICENSE Initial commit 2021-11-30 17:01:17 -05:00
README.md Improve development experience 2023-08-14 14:17:11 -04:00
update-changelog Consolidate dockerfiles and add docs for development 2023-01-27 11:44:48 -05:00
update-chart-lock Consolidate dockerfiles and add docs for development 2023-01-27 11:44:48 -05:00
Vagrantfile Initial commit 2021-11-30 17:01:17 -05:00

vmpooler-deployment

This repo contains Dockerfiles and a Helm chart that can be used to deploy VMPooler. The Release Engineering team at Puppet uses the code here as part of operating our VMPooler instances.

VMPooler Components

The docker image gnerated and hosted by this project contain the following VMPooler components:

Docker Registry

The GitHub Actions in this repository publish images to GitHub Packages. You can browse the VMPooler containers here.

The vmpooler officially released docker image tags use a semantic version, where 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.

Helm Repository

The docs/ folder in this repository 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

Adding / updating charts

Make the desired changes to the helm chart in helm-charts/vmpooler and run ./update-chart.

Development

Prerequisites:

  1. Become familiar with the configuration file docker/vmpooler.yaml as described in VMPooler Core.
  2. Chose a Development method:
    • Develop via local source:

      1. 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
        
      2. From the vmpooler-projects/vmpooler-deployment directory run docker compose -f docker/docker-compose.dev.yml up --build

    • Develop via Git source:

      1. For the component(s) you are developing on, commit and push changes to a branch.
      2. Change to the docker directory and modify the Gemfile as needed to pull the gem(s) from your git branch.
      3. Run ./update-gemfile-lock to update the Gemfile.lock
      4. Run docker compose build && docker compose up.

When a dependency Helm chart is updated, be sure to run ./update-chart-lock to update the lockfile, otherwise the test and release workflows will fail.

Docker Compose URLs

These are the default ports used in the docker compose file, to change them edit the ports key under the desired service in either docker/docker-compose.yml or docker/docker-compose.local.yml.

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

Deploy Chart for Testing

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:

  1. Update the "appVersion" key in helm-charts/vmpooler/Chart.yaml to the docker image tag that was generated by opening a pull request.
  2. 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"

Releasing

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 technically publish the helm chart pointing to a nonexistent docker tag until the release workflow is run.

  1. Bump the "appVersion" key in helm-charts/vmpooler/Chart.yaml appropriately based on changes to docker/Gemfile and docker/Gemfile.lock in merged pull requests since the last release.
    • This key pertains to the docker tag that will be pushed upon release.
  2. Bump 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.
  3. Run ./update-changelog to update CHANGELOG.md.
  4. Run ./build-chart to package the new chart and update the repo index.
  5. Commit and push changes to a new branch, then open a pull request against main and be sure to add the "maintenance" label.
  6. 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.

Contributing

We welcome and encourage contributions!

License

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