mirror of
https://github.com/puppetlabs/vmpooler-deployment.git
synced 2026-01-26 03:28:41 -05:00
Update local development for vmpooler 3.0
This commit is contained in:
parent
9b123644b4
commit
c081251826
7 changed files with 55 additions and 33 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
|||
/*/**/vendor/bundle/
|
||||
/docker/**/vmpooler.yaml
|
||||
/docker/data/*.json
|
||||
.vagrant/
|
||||
.idea/
|
||||
helm-charts/vmpooler/charts/
|
||||
|
|
|
|||
33
README.md
33
README.md
|
|
@ -1,16 +1,15 @@
|
|||
# vmpooler-deployment
|
||||
|
||||
- [vmpooler-deployment](#vmpooler-deployment)
|
||||
- [VMPooler Components](#vmpooler-components)
|
||||
- [Docker Registry](#docker-registry)
|
||||
- [Helm Repository](#helm-repository)
|
||||
- [Adding / updating charts](#adding--updating-charts)
|
||||
- [Development](#development)
|
||||
- [Docker Compose URLs](#docker-compose-urls)
|
||||
- [Deploy Chart for Testing](#deploy-chart-for-testing)
|
||||
- [Releasing](#releasing)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
- [VMPooler Components](#vmpooler-components)
|
||||
- [Docker Registry](#docker-registry)
|
||||
- [Helm Repository](#helm-repository)
|
||||
- [Adding / updating charts](#adding--updating-charts)
|
||||
- [Development](#development)
|
||||
- [Docker Compose URLs](#docker-compose-urls)
|
||||
- [Deploy Chart for Testing](#deploy-chart-for-testing)
|
||||
- [Releasing](#releasing)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -19,6 +18,7 @@ This repo contains Dockerfiles and a Helm chart that can be used to deploy [VMPo
|
|||
The docker image gnerated and hosted by this project contain the following VMPooler components:
|
||||
|
||||
- [VMPooler Core](https://github.com/puppetlabs/vmpooler)
|
||||
- [VMPooler Google CloudDNS Plugin](https://github.com/puppetlabs/vmpooler-dns-google-clouddns)
|
||||
- [VMPooler EC2 Provider](https://github.com/puppetlabs/vmpooler-provider-ec2)
|
||||
- [VMPooler GCE Provider](https://github.com/puppetlabs/vmpooler-provider-gce)
|
||||
- [VMPooler vSphere Provider](https://github.com/puppetlabs/vmpooler-provider-vsphere)
|
||||
|
|
@ -56,6 +56,8 @@ Prerequisites:
|
|||
- [vmpooler-provider-ec2](https://github.com/puppetlabs/vmpooler-provider-ec2)
|
||||
- [vmpooler-provider-gce](https://github.com/puppetlabs/vmpooler-provider-gce)
|
||||
- [vmpooler-provider-vsphere](https://github.com/puppetlabs/vmpooler-provider-vsphere)
|
||||
- If you are not using Dynamic DNS, then the following DNS plugins can be used to manage records across different compute providers:
|
||||
- [VMPooler Google CloudDNS Plugin](https://github.com/puppetlabs/vmpooler-dns-google-clouddns)
|
||||
2. Chose a Development method:
|
||||
- Develop via local source:
|
||||
1. Clone all of the known vmpooler projects listed at [vmpooler-components](#vmpooler-components) under a common directory, for example:
|
||||
|
|
@ -63,6 +65,7 @@ Prerequisites:
|
|||
```bash
|
||||
|-- vmpooler-projects
|
||||
| |--vmpooler-deployment
|
||||
| |--vmpooler-dns-google-clouddns
|
||||
| |--vmpooler-provider-ec2
|
||||
| |--vmpooler-provider-gce
|
||||
| |--vmpooler-provider-vsphere
|
||||
|
|
@ -72,10 +75,10 @@ Prerequisites:
|
|||
3. Run `docker compose -f vmpooler-deployment/docker/docker-compose.local.yml up`
|
||||
|
||||
- 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`.
|
||||
4. For the component(s) you are developing on, commit and push changes to a branch.
|
||||
5. Change to the `docker` directory and modify the `Gemfile` as needed to pull the gem(s) from your git branch.
|
||||
6. Run `./update-gemfile-lock` to update the `Gemfile.lock`
|
||||
7. 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.
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ RUN apt-get update -qq && \
|
|||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY vmpooler /opt/vmpooler
|
||||
COPY vmpooler-dns-gcp /opt/vmpooler-dns-gcp
|
||||
COPY vmpooler-provider-ec2 /opt/vmpooler-provider-ec2
|
||||
COPY vmpooler-provider-gce /opt/vmpooler-provider-gce
|
||||
COPY vmpooler-provider-vsphere /opt/vmpooler-provider-vsphere
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
||||
|
||||
gem 'vmpooler', '~> 2.5'
|
||||
# Remove temporarily until a stable minor release is published
|
||||
# gem 'vmpooler-provider-ec2', '~> 0.0.1'
|
||||
gem 'vmpooler-provider-gce', '~> 0.5'
|
||||
gem 'vmpooler-provider-vsphere', '~> 2.1'
|
||||
|
||||
# For development install via a git branch use something like:
|
||||
# gem 'vmpooler', git: 'https://github.com/puppetlabs/vmpooler.git', branch: 'my-feature'
|
||||
# gem 'vmpooler-provider-ec2', git: 'https://github.com/puppetlabs/vmpooler-provider-ec2.git', branch: 'my-feature'
|
||||
# gem 'vmpooler-provider-gce', git: 'https://github.com/puppetlabs/vmpooler-provider-gce.git', branch: 'my-feature'
|
||||
# gem 'vmpooler-provider-vsphere', git: 'https://github.com/puppetlabs/vmpooler-provider-vsphere.git', branch: 'my-feature'
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
||||
|
||||
gem 'vmpooler', path: '/opt/vmpooler'
|
||||
gem 'vmpooler-dns-gcp', path: '/opt/vmpooler-dns-gcp'
|
||||
gem 'vmpooler-provider-ec2', path: '/opt/vmpooler-provider-ec2'
|
||||
gem 'vmpooler-provider-gce', path: '/opt/vmpooler-provider-gce'
|
||||
gem 'vmpooler-provider-vsphere', path: '/opt/vmpooler-provider-vsphere'
|
||||
|
|
@ -1,5 +1,18 @@
|
|||
---
|
||||
:dns_configs:
|
||||
ddns_domain: 'dynamic.example.com'
|
||||
:gcp-clouddns:
|
||||
project: vmpooler-example
|
||||
domain: vmpooler.example.com
|
||||
dns_zone_resource_name: vmpooler-example-com
|
||||
|
||||
:providers:
|
||||
# :gce:
|
||||
# network_name: projects/vmpooler-example/global/networks/default
|
||||
# project: vmpooler-example
|
||||
# title: gce
|
||||
# zone: us-west1-b
|
||||
|
||||
:dummy:
|
||||
filename: '/tmp/dummy-backing.yaml'
|
||||
|
||||
|
|
@ -23,13 +36,19 @@
|
|||
allowed_tags:
|
||||
- 'created_by'
|
||||
- 'project'
|
||||
domain: 'example.com'
|
||||
# domain: 'localhost' # Flip these out for local requests
|
||||
|
||||
:pools:
|
||||
- name: 'debian-10-x86_64'
|
||||
template: 'Templates/debian-7-x86_64'
|
||||
folder: 'Pooled VMs/debian-7-x86_64'
|
||||
# - name: 'fedora-36-x86_64'
|
||||
# template: 'projects/fedora-cloud/global/images/fedora-cloud-base-gcp-36-20220506-n-0-x86-64'
|
||||
# size: 0
|
||||
# provider: 'gce'
|
||||
# dns_plugin: 'google-clouddns'
|
||||
# machine_type: 'zones/us-west1-b/machineTypes/n1-standard-2'
|
||||
# disk_type: 'pd-ssd'
|
||||
# subnetwork_name: 'projects/vmpooler-example/regions/us-west1/subnetworks/default'
|
||||
- name: 'debian-11-x86_64'
|
||||
template: 'Templates/debian-11-x86_64'
|
||||
folder: 'Pooled VMs/debian-11-x86_64'
|
||||
datastore: 'vmstorage'
|
||||
size: 5
|
||||
timeout: 15
|
||||
|
|
|
|||
|
|
@ -41,16 +41,21 @@ services:
|
|||
- type: bind
|
||||
source: ./data/vmpooler.yaml
|
||||
target: /etc/vmpooler/vmpooler.yaml
|
||||
# - type: bind
|
||||
# source: ./data/vmpooler-example-key.json
|
||||
# target: /etc/vmpooler/vmpooler-example-key.json
|
||||
ports:
|
||||
- "8082:4567"
|
||||
environment:
|
||||
- VMPOOLER_DEBUG=true # for use of dummy auth
|
||||
- DEBUG_FLAG=true
|
||||
- VMPOOLER_CONFIG_FILE=/etc/vmpooler/vmpooler.yaml
|
||||
- REDIS_SERVER=redis-server
|
||||
- REDIS_PASSWORD=vmpooler
|
||||
- LOGFILE=/dev/null
|
||||
- VMPOOLER_TRACING_ENABLED=true
|
||||
- VMPOOLER_TRACING_JAEGER_HOST=http://jaeger-aio:14268/api/traces
|
||||
# - GOOGLE_APPLICATION_CREDENTIALS=/etc/vmpooler/vmpooler-example-key.json
|
||||
command: api
|
||||
links:
|
||||
- redis-server
|
||||
|
|
@ -63,16 +68,21 @@ services:
|
|||
- type: bind
|
||||
source: ./data/vmpooler.yaml
|
||||
target: /etc/vmpooler/vmpooler.yaml
|
||||
# - type: bind
|
||||
# source: ./data/vmpooler-example-key.json
|
||||
# target: /etc/vmpooler/vmpooler-example-key.json
|
||||
ports:
|
||||
- "8083:4567"
|
||||
environment:
|
||||
- VMPOOLER_DEBUG=true # for use of dummy auth
|
||||
- DEBUG_FLAG=true
|
||||
- VMPOOLER_CONFIG_FILE=/etc/vmpooler/vmpooler.yaml
|
||||
- REDIS_SERVER=redis-server
|
||||
- REDIS_PASSWORD=vmpooler
|
||||
- LOGFILE=/dev/null
|
||||
- VMPOOLER_TRACING_ENABLED=true
|
||||
- VMPOOLER_TRACING_JAEGER_HOST=http://jaeger-aio:14268/api/traces
|
||||
# - GOOGLE_APPLICATION_CREDENTIALS=/etc/vmpooler/vmpooler-example-key.json
|
||||
command: manager
|
||||
links:
|
||||
- redis-server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue