You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Deploy Chart for Testing](#deploy-chart-for-testing)
11
+
-[Releasing](#releasing)
12
+
-[Contributing](#contributing)
13
+
-[License](#license)
14
+
3
15
This repo contains Dockerfiles and a Helm chart that can be used to deploy [VMPooler](https://github.com/puppetlabs/vmpooler). The Release Engineering team at Puppet uses the code here as part of operating our VMPooler instances.
4
16
17
+
## VMPooler Components
18
+
19
+
The docker image gnerated and hosted by this project contain the following VMPooler components:
The GitHub Actions in this repository publish images to GitHub Packages. You can browse the VMPooler containers [here](https://github.com/puppetlabs/vmpooler-deployment/pkgs/container/vmpooler-deployment%2Fvmpooler).
8
29
9
-
Containers are organized using image tags:
30
+
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`.
10
31
11
-
-`x.y.z-prod-all-providers` represents images built using the Dockerfile in `docker/prod-all-providers`. These images use the Gemfile in the same directory to pull in current versions of the `vmpooler` gem and the gems for all known production-grade providers.
32
+
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.
1. Become familiar with the configuration file `docker/vmpooler.yaml` as described in [VMPooler](https://github.com/puppetlabs/vmpooler) Core.
55
+
- The default configuration file only enables the dummy provider built into [VMPooler](https://github.com/puppetlabs/vmpooler) Core. See each project below for documentation on how to use provider specific options:
1. Clone all of the known vmpooler projects listed at [vmpooler-components](#vmpooler-components) under a common directory, for example:
62
+
63
+
```bash
64
+
|-- vmpooler-projects
65
+
||--vmpooler-deployment
66
+
||--vmpooler-provider-ec2
67
+
||--vmpooler-provider-gce
68
+
||--vmpooler-provider-vsphere
69
+
```
70
+
71
+
2. From the `vmpooler-projects` directory run `docker build -t vmpooler-local -f vmpooler-deployment/docker/Dockerfile.local .`
72
+
3. Run `docker compose -f vmpooler-deployment/docker/docker-compose.local.yml up`
73
+
74
+
- Develop via Git source:
75
+
1. For the component(s) you are developing on, commit and push changes to a branch.
76
+
2. Change to the `docker` directory and modify the `Gemfile` as needed to pull the gem(s) from your git branch.
77
+
3. Run `./update-gemfile-lock` to update the `Gemfile.lock`
78
+
4. Run `docker compose build && docker compose up`.
79
+
80
+
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.
81
+
82
+
### Docker Compose URLs
83
+
84
+
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`.
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:
99
+
100
+
1. Update the "appVersion" key in`helm-charts/vmpooler/Chart.yaml` to the docker image tag that was generated by opening a pull request.
101
+
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.
102
+
103
+
## Releasing
104
+
105
+
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:
106
+
107
+
1. Bump the "appVersion" key in`helm-charts/vmpooler/Chart.yaml` appropriately based on changes to `docker/Gemfile` abd `docker/Gemfile.lock`in merged pull requests since the last release.
108
+
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.
109
+
3. Run `./update-changelog` to update `CHANGELOG.md`.
110
+
4. Commit and push changes to a new branch, then open a pull request against `main` and be sure to add the "maintenance" label.
111
+
5. After the pull request is approved and merged, then navigate to Actions --> Docker and Helm Release --> run workflow --> Branch: main --> Run workflow.
112
+
- This action will push a tagged docker image to the GitHub container registry and helm chart to GitHub pages.
0 commit comments