mirror of
https://github.com/puppetlabs/vmpooler-provider-ec2.git
synced 2026-01-26 10:28:41 -05:00
Compare commits
60 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fe13d6c2a | ||
|
|
190f587235 | ||
|
|
b2d6e2f757 | ||
|
|
c79d9c384d | ||
|
|
71ef3389be | ||
|
|
d5a48f229d | ||
|
|
1e16f9b4b7 | ||
|
|
89ad66b17b | ||
|
|
1d9565183d | ||
|
|
6fd840c050 | ||
|
|
017453870c | ||
|
|
006e2e719d | ||
|
|
fa23812f28 | ||
|
|
3c30b57d73 | ||
|
|
d459aaea5f | ||
|
|
87f3440808 | ||
|
|
9d0106ebfc | ||
|
|
3e0ffd4501 | ||
|
|
fb3d682b4e | ||
|
|
bfbe50d718 | ||
|
|
ac9bc1ab91 | ||
|
|
44c2edc24f | ||
|
|
c5ed155b9b | ||
|
|
8e82f009c9 | ||
|
|
58a06bfbfa | ||
|
|
99c288db9c | ||
|
|
7506872596 | ||
|
|
673a6fb5de | ||
|
|
bdd00e6d05 | ||
|
|
a23f664685 | ||
|
|
5733373200 | ||
|
|
2370b425ef | ||
|
|
456c8a226d | ||
|
|
fd449be206 | ||
|
|
56348c5f1d | ||
|
|
4049e96889 | ||
|
|
03ac1e9b03 | ||
|
|
f28558b3f6 | ||
|
|
740f4b50ad | ||
|
|
d3940ee71f | ||
|
|
44d2e438e6 | ||
|
|
6bfe95d271 | ||
|
|
4847398547 | ||
|
|
380814bbb0 | ||
|
|
c2582e9fb2 | ||
|
|
4287880807 | ||
|
|
845de6b353 | ||
|
|
b672364a53 | ||
|
|
1bba644da5 | ||
|
|
b418940998 | ||
|
|
7f6eaf1f4e | ||
|
|
d2ecc03d9a | ||
|
|
4ee1abb54f | ||
|
|
3c8dc0257f | ||
|
|
5148c318cd | ||
|
|
c81f3327af | ||
|
|
729a2981b7 | ||
|
|
0a6e61fe0e | ||
|
|
4a615d6adf | ||
|
|
c2c946ac19 |
17 changed files with 496 additions and 20 deletions
9
.github/dependabot.yml
vendored
9
.github/dependabot.yml
vendored
|
|
@ -3,6 +3,11 @@ updates:
|
||||||
- package-ecosystem: bundler
|
- package-ecosystem: bundler
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: weekly
|
||||||
time: "13:00"
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
|
||||||
12
.github/workflows/auto_release_prep.yml
vendored
Normal file
12
.github/workflows/auto_release_prep.yml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
name: Automated release prep
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto_release_prep:
|
||||||
|
uses: puppetlabs/release-engineering-repo-standards/.github/workflows/auto_release_prep.yml@v1
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
project-type: ruby
|
||||||
|
version-file-path: lib/vmpooler-provider-ec2/version.rb
|
||||||
8
.github/workflows/dependabot_merge.yml
vendored
Normal file
8
.github/workflows/dependabot_merge.yml
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
name: Dependabot auto-merge
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependabot_merge:
|
||||||
|
uses: puppetlabs/release-engineering-repo-standards/.github/workflows/dependabot_merge.yml@v1
|
||||||
|
secrets: inherit
|
||||||
8
.github/workflows/ensure_label.yml
vendored
Normal file
8
.github/workflows/ensure_label.yml
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
name: Ensure label
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ensure_label:
|
||||||
|
uses: puppetlabs/release-engineering-repo-standards/.github/workflows/ensure_label.yml@v1
|
||||||
|
secrets: inherit
|
||||||
66
.github/workflows/release.yml
vendored
66
.github/workflows/release.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: Release
|
name: Release Gem
|
||||||
|
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
|
@ -7,25 +7,77 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'puppetlabs/vmpooler-provider-ec2'
|
if: github.repository == 'puppetlabs/vmpooler-provider-ec2'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Get Version
|
|
||||||
id: gv
|
- name: Get Current Version
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
id: cv
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const { data: response } = await github.rest.repos.getLatestRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
})
|
||||||
|
console.log(`The latest release is ${response.tag_name}`)
|
||||||
|
return response.tag_name
|
||||||
|
result-encoding: string
|
||||||
|
|
||||||
|
- name: Get Next Version
|
||||||
|
id: nv
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=ver::$(grep VERSION lib/vmpooler-provider-ec2/version.rb |rev |cut -d "'" -f2 |rev)"
|
version=$(grep VERSION lib/vmpooler-provider-ec2/version.rb |rev |cut -d "'" -f2 |rev)
|
||||||
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
echo "Found version $version from lib/vmpooler-provider-ec2/version.rb"
|
||||||
|
|
||||||
|
- name: Generate Changelog
|
||||||
|
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
||||||
|
with:
|
||||||
|
args: >-
|
||||||
|
--future-release ${{ steps.nv.outputs.version }}
|
||||||
|
env:
|
||||||
|
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Validate Changelog
|
||||||
|
run : |
|
||||||
|
set -e
|
||||||
|
if [[ -n $(git status --porcelain) ]]; then
|
||||||
|
echo "Here is the current git status:"
|
||||||
|
git status
|
||||||
|
echo
|
||||||
|
echo "The following changes were detected:"
|
||||||
|
git --no-pager diff
|
||||||
|
echo "Uncommitted PRs found in the changelog. Please submit a release prep PR of changes after running `./update-changelog`"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Generate Release Notes
|
||||||
|
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
||||||
|
with:
|
||||||
|
args: >-
|
||||||
|
--since-tag ${{ steps.cv.outputs.result }}
|
||||||
|
--future-release ${{ steps.nv.outputs.version }}
|
||||||
|
--output release-notes.md
|
||||||
|
env:
|
||||||
|
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Tag Release
|
- name: Tag Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.gv.outputs.ver }}
|
tag: ${{ steps.nv.outputs.version }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
bodyfile: release-notes.md
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
generateReleaseNotes: true
|
|
||||||
|
# This step should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
||||||
- name: Install Ruby jruby-9.3.6.0
|
- name: Install Ruby jruby-9.3.6.0
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 'jruby-9.3.6.0'
|
ruby-version: 'jruby-9.3.6.0'
|
||||||
|
|
||||||
- name: Build gem
|
- name: Build gem
|
||||||
run: gem build *.gemspec
|
run: gem build *.gemspec
|
||||||
|
|
||||||
- name: Publish gem
|
- name: Publish gem
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/.gem
|
mkdir -p $HOME/.gem
|
||||||
|
|
|
||||||
39
.github/workflows/security.yml
vendored
Normal file
39
.github/workflows/security.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: Security
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
scan:
|
||||||
|
name: Mend Scanning
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout repo content
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: setup ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.7
|
||||||
|
# setup a package lock if one doesn't exist, otherwise do nothing
|
||||||
|
- name: check lock
|
||||||
|
run: '[ -f "Gemfile.lock" ] && echo "package lock file exists, skipping" || bundle lock'
|
||||||
|
# install java
|
||||||
|
- uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
|
java-version: '17'
|
||||||
|
# download mend
|
||||||
|
- name: download_mend
|
||||||
|
run: curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
|
||||||
|
- name: run mend
|
||||||
|
run: java -jar wss-unified-agent.jar
|
||||||
|
env:
|
||||||
|
WS_APIKEY: ${{ secrets.MEND_API_KEY }}
|
||||||
|
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
|
||||||
|
WS_USERKEY: ${{ secrets.MEND_TOKEN }}
|
||||||
|
WS_PRODUCTNAME: RE
|
||||||
|
WS_PROJECTNAME: ${{ github.event.repository.name }}
|
||||||
6
.github/workflows/testing.yml
vendored
6
.github/workflows/testing.yml
vendored
|
|
@ -19,8 +19,9 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
ruby-version:
|
ruby-version:
|
||||||
- 'jruby-9.3.6.0'
|
- 'jruby-9.3.6.0'
|
||||||
|
- 'jruby-9.4.0.0'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
|
|
@ -35,8 +36,9 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
ruby-version:
|
ruby-version:
|
||||||
- 'jruby-9.3.6.0'
|
- 'jruby-9.3.6.0'
|
||||||
|
- 'jruby-9.4.0.0'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
3
.github_changelog_generator
Normal file
3
.github_changelog_generator
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
project=vmpooler-provider-ec2
|
||||||
|
user=puppetlabs
|
||||||
|
exclude_labels=maintenance
|
||||||
37
CHANGELOG.md
Normal file
37
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [Unreleased](https://github.com/puppetlabs/vmpooler-provider-ec2/tree/HEAD)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-ec2/compare/0.0.2...HEAD)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- \(RE-15111\) Migrate Snyk to Mend Scanning [\#12](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/12) ([yachub](https://github.com/yachub))
|
||||||
|
- \(RE-14811\) Remove DIO as codeowners [\#11](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/11) ([yachub](https://github.com/yachub))
|
||||||
|
- Add Snyk action [\#10](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/10) ([yachub](https://github.com/yachub))
|
||||||
|
- Add release-engineering to codeowners [\#9](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/9) ([yachub](https://github.com/yachub))
|
||||||
|
|
||||||
|
## [0.0.2](https://github.com/puppetlabs/vmpooler-provider-ec2/tree/0.0.2) (2022-08-02)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-ec2/compare/0.0.1...0.0.2)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Update version.rb [\#8](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/8) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
|
||||||
|
## [0.0.1](https://github.com/puppetlabs/vmpooler-provider-ec2/tree/0.0.1) (2022-08-02)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-ec2/compare/be877a20c5dc7b7ba839ca2c046c6407d1ed22b4...0.0.1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- \(DIO-3163\) Implement Cloud DNS for EC2 VMs [\#7](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/7) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
- \(DIO-3163\) Code improvements after initial testing in vmpooler [\#6](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/6) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
- Revert "Update net-ssh requirement from ~\> 6.2.0.rc2 to \>= 6.2, \< 7.1" [\#4](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/4) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
- Change the way we load secrets so that we do not have to pass them as… [\#3](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/3) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
- Update net-ssh requirement from ~\> 6.2.0.rc2 to \>= 6.2, \< 7.1 [\#2](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/2) ([dependabot[bot]](https://github.com/apps/dependabot))
|
||||||
|
- Added aws dependency and renamed directories [\#1](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/1) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
# added by slack-gitbot
|
# added by slack-gitbot
|
||||||
* @puppetlabs/dio
|
* @puppetlabs/release-engineering
|
||||||
264
Gemfile.lock
Normal file
264
Gemfile.lock
Normal file
|
|
@ -0,0 +1,264 @@
|
||||||
|
PATH
|
||||||
|
remote: .
|
||||||
|
specs:
|
||||||
|
vmpooler-provider-ec2 (0.0.2)
|
||||||
|
aws-sdk-ec2 (~> 1)
|
||||||
|
net-ssh (>= 6.2, < 7.1)
|
||||||
|
vmpooler (~> 2.3, >= 1.3.0)
|
||||||
|
vmpooler-provider-gce (~> 0.4, >= 0.4.0)
|
||||||
|
|
||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
addressable (2.8.1)
|
||||||
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
|
ast (2.4.2)
|
||||||
|
aws-eventstream (1.2.0)
|
||||||
|
aws-partitions (1.834.0)
|
||||||
|
aws-sdk-core (3.185.1)
|
||||||
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
|
aws-partitions (~> 1, >= 1.651.0)
|
||||||
|
aws-sigv4 (~> 1.5)
|
||||||
|
jmespath (~> 1, >= 1.6.1)
|
||||||
|
aws-sdk-ec2 (1.412.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.184.0)
|
||||||
|
aws-sigv4 (~> 1.1)
|
||||||
|
aws-sigv4 (1.6.0)
|
||||||
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
|
bindata (2.4.14)
|
||||||
|
builder (3.2.4)
|
||||||
|
climate_control (1.2.0)
|
||||||
|
coderay (1.1.3)
|
||||||
|
concurrent-ruby (1.2.0)
|
||||||
|
connection_pool (2.3.0)
|
||||||
|
declarative (0.0.20)
|
||||||
|
deep_merge (1.2.2)
|
||||||
|
diff-lcs (1.5.1)
|
||||||
|
docile (1.4.0)
|
||||||
|
faraday (2.7.4)
|
||||||
|
faraday-net_http (>= 2.0, < 3.1)
|
||||||
|
ruby2_keywords (>= 0.0.4)
|
||||||
|
faraday-net_http (3.0.2)
|
||||||
|
ffi (1.15.5-java)
|
||||||
|
google-apis-compute_v1 (0.60.0)
|
||||||
|
google-apis-core (>= 0.9.1, < 2.a)
|
||||||
|
google-apis-core (0.10.0)
|
||||||
|
addressable (~> 2.5, >= 2.5.1)
|
||||||
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
|
httpclient (>= 2.8.1, < 3.a)
|
||||||
|
mini_mime (~> 1.0)
|
||||||
|
representable (~> 3.0)
|
||||||
|
retriable (>= 2.0, < 4.a)
|
||||||
|
rexml
|
||||||
|
webrick
|
||||||
|
google-apis-dns_v1 (0.29.0)
|
||||||
|
google-apis-core (>= 0.9.1, < 2.a)
|
||||||
|
google-cloud-core (1.6.0)
|
||||||
|
google-cloud-env (~> 1.0)
|
||||||
|
google-cloud-errors (~> 1.0)
|
||||||
|
google-cloud-dns (0.35.1)
|
||||||
|
google-apis-dns_v1 (~> 0.1)
|
||||||
|
google-cloud-core (~> 1.6)
|
||||||
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
|
zonefile (~> 1.04)
|
||||||
|
google-cloud-env (1.6.0)
|
||||||
|
faraday (>= 0.17.3, < 3.0)
|
||||||
|
google-cloud-errors (1.3.0)
|
||||||
|
googleauth (1.2.0)
|
||||||
|
faraday (>= 0.17.3, < 3.a)
|
||||||
|
jwt (>= 1.4, < 3.0)
|
||||||
|
memoist (~> 0.16)
|
||||||
|
multi_json (~> 1.11)
|
||||||
|
os (>= 0.9, < 2.0)
|
||||||
|
signet (>= 0.16, < 2.a)
|
||||||
|
httpclient (2.8.3)
|
||||||
|
jmespath (1.6.2)
|
||||||
|
json (2.6.3)
|
||||||
|
json (2.6.3-java)
|
||||||
|
jwt (2.6.0)
|
||||||
|
memoist (0.16.2)
|
||||||
|
method_source (1.0.0)
|
||||||
|
mini_mime (1.1.2)
|
||||||
|
mock_redis (0.36.0)
|
||||||
|
ruby2_keywords
|
||||||
|
multi_json (1.15.0)
|
||||||
|
mustermann (2.0.2)
|
||||||
|
ruby2_keywords (~> 0.0.1)
|
||||||
|
net-ldap (0.17.1)
|
||||||
|
net-ssh (7.0.1)
|
||||||
|
nio4r (2.5.2)
|
||||||
|
nio4r (2.5.2-java)
|
||||||
|
opentelemetry-api (1.1.0)
|
||||||
|
opentelemetry-common (0.19.6)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
opentelemetry-exporter-jaeger (0.20.1)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
opentelemetry-common (~> 0.19.2)
|
||||||
|
opentelemetry-sdk (~> 1.0)
|
||||||
|
thrift
|
||||||
|
opentelemetry-instrumentation-base (0.19.0)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
opentelemetry-instrumentation-concurrent_ruby (0.19.2)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
opentelemetry-instrumentation-base (~> 0.19.0)
|
||||||
|
opentelemetry-instrumentation-http_client (0.19.4)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
opentelemetry-common (~> 0.19.3)
|
||||||
|
opentelemetry-instrumentation-base (~> 0.19.0)
|
||||||
|
opentelemetry-instrumentation-redis (0.21.3)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
opentelemetry-common (~> 0.19.3)
|
||||||
|
opentelemetry-instrumentation-base (~> 0.19.0)
|
||||||
|
opentelemetry-instrumentation-sinatra (0.19.3)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
opentelemetry-common (~> 0.19.3)
|
||||||
|
opentelemetry-instrumentation-base (~> 0.19.0)
|
||||||
|
opentelemetry-registry (0.2.0)
|
||||||
|
opentelemetry-api (~> 1.1)
|
||||||
|
opentelemetry-resource_detectors (0.19.1)
|
||||||
|
google-cloud-env
|
||||||
|
opentelemetry-sdk
|
||||||
|
opentelemetry-sdk (1.2.0)
|
||||||
|
opentelemetry-api (~> 1.1)
|
||||||
|
opentelemetry-common (~> 0.19.3)
|
||||||
|
opentelemetry-registry (~> 0.2)
|
||||||
|
opentelemetry-semantic_conventions
|
||||||
|
opentelemetry-semantic_conventions (1.8.0)
|
||||||
|
opentelemetry-api (~> 1.0)
|
||||||
|
os (1.1.4)
|
||||||
|
parallel (1.23.0)
|
||||||
|
parser (3.2.2.1)
|
||||||
|
ast (~> 2.4.1)
|
||||||
|
pickup (0.0.11)
|
||||||
|
prometheus-client (2.1.0)
|
||||||
|
pry (0.14.2)
|
||||||
|
coderay (~> 1.1)
|
||||||
|
method_source (~> 1.0)
|
||||||
|
pry (0.14.2-java)
|
||||||
|
coderay (~> 1.1)
|
||||||
|
method_source (~> 1.0)
|
||||||
|
spoon (~> 0.0)
|
||||||
|
public_suffix (5.0.1)
|
||||||
|
puma (5.6.5)
|
||||||
|
nio4r (~> 2.0)
|
||||||
|
puma (5.6.5-java)
|
||||||
|
nio4r (~> 2.0)
|
||||||
|
rack (2.2.6.4)
|
||||||
|
rack-protection (2.2.4)
|
||||||
|
rack
|
||||||
|
rack-test (2.1.0)
|
||||||
|
rack (>= 1.3)
|
||||||
|
rainbow (3.1.1)
|
||||||
|
rake (13.0.6)
|
||||||
|
redis (4.8.0)
|
||||||
|
regexp_parser (2.8.0)
|
||||||
|
representable (3.2.0)
|
||||||
|
declarative (< 0.1.0)
|
||||||
|
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||||
|
uber (< 0.2.0)
|
||||||
|
retriable (3.1.2)
|
||||||
|
rexml (3.2.5)
|
||||||
|
rspec (3.13.0)
|
||||||
|
rspec-core (~> 3.13.0)
|
||||||
|
rspec-expectations (~> 3.13.0)
|
||||||
|
rspec-mocks (~> 3.13.0)
|
||||||
|
rspec-core (3.13.0)
|
||||||
|
rspec-support (~> 3.13.0)
|
||||||
|
rspec-expectations (3.13.0)
|
||||||
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
|
rspec-support (~> 3.13.0)
|
||||||
|
rspec-mocks (3.13.0)
|
||||||
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
|
rspec-support (~> 3.13.0)
|
||||||
|
rspec-support (3.13.0)
|
||||||
|
rubocop (1.50.2)
|
||||||
|
json (~> 2.3)
|
||||||
|
parallel (~> 1.10)
|
||||||
|
parser (>= 3.2.0.0)
|
||||||
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
|
rexml (>= 3.2.5, < 4.0)
|
||||||
|
rubocop-ast (>= 1.28.0, < 2.0)
|
||||||
|
ruby-progressbar (~> 1.7)
|
||||||
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
|
rubocop-ast (1.28.1)
|
||||||
|
parser (>= 3.2.1.0)
|
||||||
|
ruby-progressbar (1.13.0)
|
||||||
|
ruby2_keywords (0.0.5)
|
||||||
|
signet (0.17.0)
|
||||||
|
addressable (~> 2.8)
|
||||||
|
faraday (>= 0.17.5, < 3.a)
|
||||||
|
jwt (>= 1.5, < 3.0)
|
||||||
|
multi_json (~> 1.10)
|
||||||
|
simplecov (0.22.0)
|
||||||
|
docile (~> 1.1)
|
||||||
|
simplecov-html (~> 0.11)
|
||||||
|
simplecov_json_formatter (~> 0.1)
|
||||||
|
simplecov-html (0.12.3)
|
||||||
|
simplecov_json_formatter (0.1.4)
|
||||||
|
sinatra (2.2.4)
|
||||||
|
mustermann (~> 2.0)
|
||||||
|
rack (~> 2.2)
|
||||||
|
rack-protection (= 2.2.4)
|
||||||
|
tilt (~> 2.0)
|
||||||
|
spicy-proton (2.1.15)
|
||||||
|
bindata (~> 2.3)
|
||||||
|
spoon (0.0.6)
|
||||||
|
ffi
|
||||||
|
statsd-ruby (1.5.0)
|
||||||
|
thor (1.2.2)
|
||||||
|
thrift (0.17.0)
|
||||||
|
tilt (2.0.11)
|
||||||
|
trailblazer-option (0.1.2)
|
||||||
|
uber (0.1.0)
|
||||||
|
unicode-display_width (2.4.2)
|
||||||
|
vmpooler (2.5.0)
|
||||||
|
concurrent-ruby (~> 1.1)
|
||||||
|
connection_pool (~> 2.2)
|
||||||
|
deep_merge (~> 1.2)
|
||||||
|
net-ldap (~> 0.16)
|
||||||
|
opentelemetry-exporter-jaeger (= 0.20.1)
|
||||||
|
opentelemetry-instrumentation-concurrent_ruby (= 0.19.2)
|
||||||
|
opentelemetry-instrumentation-http_client (= 0.19.4)
|
||||||
|
opentelemetry-instrumentation-redis (= 0.21.3)
|
||||||
|
opentelemetry-instrumentation-sinatra (= 0.19.3)
|
||||||
|
opentelemetry-resource_detectors (= 0.19.1)
|
||||||
|
opentelemetry-sdk (~> 1.0, >= 1.0.2)
|
||||||
|
pickup (~> 0.0.11)
|
||||||
|
prometheus-client (~> 2.0)
|
||||||
|
puma (~> 5.0, >= 5.0.4)
|
||||||
|
rack (~> 2.2)
|
||||||
|
rake (~> 13.0)
|
||||||
|
redis (~> 4.1)
|
||||||
|
sinatra (~> 2.0)
|
||||||
|
spicy-proton (~> 2.1)
|
||||||
|
statsd-ruby (~> 1.4)
|
||||||
|
vmpooler-provider-gce (0.4.0)
|
||||||
|
google-apis-compute_v1 (~> 0.14)
|
||||||
|
google-cloud-dns (~> 0.35.1)
|
||||||
|
googleauth (>= 0.16.2, < 1.3.0)
|
||||||
|
webrick (1.8.1)
|
||||||
|
yarjuf (2.0.0)
|
||||||
|
builder
|
||||||
|
rspec (~> 3)
|
||||||
|
zonefile (1.06)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
universal-java-1.8
|
||||||
|
universal-java-11
|
||||||
|
x86_64-linux
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
climate_control (>= 0.2.0)
|
||||||
|
mock_redis (>= 0.17.0)
|
||||||
|
pry
|
||||||
|
rack-test (>= 0.6)
|
||||||
|
rspec (>= 3.2)
|
||||||
|
rubocop (~> 1.50.2)
|
||||||
|
simplecov (>= 0.11.2)
|
||||||
|
thor (~> 1.0, >= 1.0.1)
|
||||||
|
vmpooler-provider-ec2!
|
||||||
|
yarjuf (>= 2.0)
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
2.4.5
|
||||||
26
README.md
26
README.md
|
|
@ -1,5 +1,15 @@
|
||||||
# vmpooler-provider-aws
|
# vmpooler-provider-aws
|
||||||
|
|
||||||
|
- [vmpooler-provider-aws](#vmpooler-provider-aws)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Provisioning the new nodes](#provisioning-the-new-nodes)
|
||||||
|
- [DNS](#dns)
|
||||||
|
- [Labels](#labels)
|
||||||
|
- [Pre-requisite](#pre-requisite)
|
||||||
|
- [Update the Gemfile Lock](#update-the-gemfile-lock)
|
||||||
|
- [Releasing](#releasing)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
This is a provider for [VMPooler](https://github.com/puppetlabs/vmpooler) allows using aws to create instances, disks,
|
This is a provider for [VMPooler](https://github.com/puppetlabs/vmpooler) allows using aws to create instances, disks,
|
||||||
snapshots, or destroy instances for specific pools.
|
snapshots, or destroy instances for specific pools.
|
||||||
|
|
||||||
|
|
@ -55,6 +65,22 @@ do not have the pool label, and can be configured to allow a specific list of un
|
||||||
- An IAM user must exist in the target AWS account with permissions to create, delete vms etc
|
- An IAM user must exist in the target AWS account with permissions to create, delete vms etc
|
||||||
- if using DNS see section above, and a service account with permissions to change Cloud DNS need to exist
|
- if using DNS see section above, and a service account with permissions to change Cloud DNS need to exist
|
||||||
|
|
||||||
|
## Update the Gemfile Lock
|
||||||
|
|
||||||
|
To update the `Gemfile.lock` run `./update-gemfile-lock`.
|
||||||
|
|
||||||
|
Verify, and update if needed, that the docker tag in the script and GitHub action workflows matches what is used in the [vmpooler-deployment Dockerfile](https://github.com/puppetlabs/vmpooler-deployment/blob/main/docker/Dockerfile).
|
||||||
|
|
||||||
|
## Releasing
|
||||||
|
|
||||||
|
Follow these steps to publish a new GitHub release, and build and push the gem to <https://rubygems.org>.
|
||||||
|
|
||||||
|
1. Bump the "VERSION" in `lib/vmpooler-provider-ec2/version.rb` appropriately based on changes in `CHANGELOG.md` since the last release.
|
||||||
|
2. Run `./update-gemfile-lock` to update `Gemfile.lock`.
|
||||||
|
3. Run `./update-changelog` to update `CHANGELOG.md`.
|
||||||
|
4. Commit and push changes to a new branch, then open a pull request against `main` and be sure to add the "maintenance" label.
|
||||||
|
5. After the pull request is approved and merged, then navigate to Actions --> Release Gem --> run workflow --> Branch: main --> Run workflow.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
vmpooler-provider-aws is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). See the [LICENSE](LICENSE) file for more details.
|
vmpooler-provider-aws is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). See the [LICENSE](LICENSE) file for more details.
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module VmpoolerProviderEc2
|
module VmpoolerProviderEc2
|
||||||
VERSION = '0.0.1'
|
VERSION = '0.0.2'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ module Vmpooler
|
||||||
# check if a vm is ready by opening a socket on port 22
|
# check if a vm is ready by opening a socket on port 22
|
||||||
# if a domain is set, it will use vn_name.domain,
|
# if a domain is set, it will use vn_name.domain,
|
||||||
# if not then it will use the private dns name directly (AWS workaround)
|
# if not then it will use the private dns name directly (AWS workaround)
|
||||||
def vm_ready?(pool_name, vm_name)
|
def vm_ready?(pool_name, vm_name, redis)
|
||||||
begin
|
begin
|
||||||
domain_set = domain
|
domain_set = domain
|
||||||
if domain_set.nil?
|
if domain_set.nil?
|
||||||
|
|
@ -415,9 +415,10 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
open_socket(vm_name, domain_set)
|
open_socket(vm_name, domain_set)
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
@logger.log('s', "[!] [#{pool_name}] '#{vm_name}' instance cannot be reached by vmpooler on tcp port 22; #{e}")
|
redis.hset("vmpooler__vm__#{vm_name}", 'open_socket_error', e.to_s)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
redis.hdel("vmpooler__vm__#{vm_name}", 'open_socket_error')
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
14
release-prep
Executable file
14
release-prep
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# The container tag should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
||||||
|
#
|
||||||
|
# Update Gemfile.lock
|
||||||
|
docker run -t --rm \
|
||||||
|
-v $(pwd):/app \
|
||||||
|
jruby:9.4.3.0-jdk11 \
|
||||||
|
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends git make netbase && cd /app && gem install bundler && bundle install --jobs 3; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
|
||||||
|
|
||||||
|
# Update Changelog
|
||||||
|
docker run -t --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
|
||||||
|
githubchangeloggenerator/github-changelog-generator:1.16.2 \
|
||||||
|
github_changelog_generator --future-release $(grep VERSION lib/vmpooler-provider-ec2/version.rb |rev |cut -d "'" -f2 |rev)
|
||||||
7
update-gemfile-lock
Executable file
7
update-gemfile-lock
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# The container tag should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
||||||
|
docker run -it --rm \
|
||||||
|
-v $(pwd):/app \
|
||||||
|
jruby:9.3.6-jdk \
|
||||||
|
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends make git && cd /app && gem install bundler && bundle install --jobs 3 && bundle update; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
|
||||||
|
|
@ -17,10 +17,8 @@ Gem::Specification.new do |s|
|
||||||
s.require_paths = ["lib"]
|
s.require_paths = ["lib"]
|
||||||
s.add_dependency 'aws-sdk-ec2', '~> 1'
|
s.add_dependency 'aws-sdk-ec2', '~> 1'
|
||||||
s.add_dependency 'net-ssh', '>= 6.2', '< 7.1'
|
s.add_dependency 'net-ssh', '>= 6.2', '< 7.1'
|
||||||
|
s.add_dependency 'vmpooler', '>= 1.3.0', '~> 2.3'
|
||||||
s.add_development_dependency 'vmpooler', '>= 1.3.0', '~> 2.3'
|
s.add_dependency 'vmpooler-provider-gce', '>= 0.4.0', '~> 0.4'
|
||||||
#s.add_development_dependency 'vmpooler-provider-gce', '>= 0.4.0', '~> 0.4'
|
|
||||||
s.add_development_dependency 'vmpooler-provider-gce', '>= 0.4.0', '~> 0.4'
|
|
||||||
|
|
||||||
# Testing dependencies
|
# Testing dependencies
|
||||||
s.add_development_dependency 'climate_control', '>= 0.2.0'
|
s.add_development_dependency 'climate_control', '>= 0.2.0'
|
||||||
|
|
@ -28,7 +26,7 @@ Gem::Specification.new do |s|
|
||||||
s.add_development_dependency 'pry'
|
s.add_development_dependency 'pry'
|
||||||
s.add_development_dependency 'rack-test', '>= 0.6'
|
s.add_development_dependency 'rack-test', '>= 0.6'
|
||||||
s.add_development_dependency 'rspec', '>= 3.2'
|
s.add_development_dependency 'rspec', '>= 3.2'
|
||||||
s.add_development_dependency 'rubocop', '~> 1.28.2'
|
s.add_development_dependency 'rubocop', '~> 1.50.2'
|
||||||
s.add_development_dependency 'simplecov', '>= 0.11.2'
|
s.add_development_dependency 'simplecov', '>= 0.11.2'
|
||||||
s.add_development_dependency 'thor', '~> 1.0', '>= 1.0.1'
|
s.add_development_dependency 'thor', '~> 1.0', '>= 1.0.1'
|
||||||
s.add_development_dependency 'yarjuf', '>= 2.0'
|
s.add_development_dependency 'yarjuf', '>= 2.0'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue