rename from AWS to EC2 for consistency

The other cloud provider is GCE and not GCP. In the same way we are creating VMs
in EC2 on AWS.
This commit is contained in:
Samuel Beaulieu 2022-07-07 08:43:03 -05:00
parent ee36ee868d
commit 65c797137e
No known key found for this signature in database
GPG key ID: 12030F74136D0F34
9 changed files with 20 additions and 19 deletions

View file

@ -5,13 +5,13 @@ on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'puppetlabs/vmpooler-provider-aws'
if: github.repository == 'puppetlabs/vmpooler-provider-ec2'
steps:
- uses: actions/checkout@v2
- name: Get Version
id: gv
run: |
echo "::set-output name=ver::$(grep VERSION lib/vmpooler-provider-aws/version.rb |rev |cut -d "'" -f2 |rev)"
echo "::set-output name=ver::$(grep VERSION lib/vmpooler-provider-ec2/version.rb |rev |cut -d "'" -f2 |rev)"
- name: Tag Release
uses: ncipollo/release-action@v1
with:

1
.gitignore vendored
View file

@ -9,3 +9,4 @@ results.xml
/vmpooler.yaml
.idea
*.json
.secrets/

View file

@ -20,7 +20,7 @@ aws authorization is handled via two required ENV vars
When you add the pool config `provision: true` to a pool, the new VMs will also get initialized with extra steps to setup the sshd config via NET:SSH
These steps expect two environment vars
1. ROOT_KEYS_SCRIPT: (optional) the URI location of a script (eg https in github) that will be run to setup keys. If not set, this will be skipped
2. KEY_FILE_LOCATION: (required) the location on local disk where the ssh key resides for VMPooler to connect via SSH to the AWS node
2. KEY_FILE_LOCATION: (required) the location on local disk where the ssh key resides for VMPooler to connect via SSH to the EC2 node
### DNS
AWS will setup a private ip and private dns hostname for the VM once running. Optionally we can setup a human readable DNS entry to resolve the VMPooler provider `spicy-proton` fqdn

View file

@ -1,5 +1,5 @@
# frozen_string_literal: true
module VmpoolerProviderAws
module VmpoolerProviderEc2
VERSION = '0.0.1'
end

View file

@ -10,7 +10,7 @@ module Vmpooler
class PoolManager
class Provider
# This class represent a GCE provider to CRUD resources in a gce cloud.
class Aws < Vmpooler::PoolManager::Provider::Base
class Ec2 < Vmpooler::PoolManager::Provider::Base
# The connection_pool method is normally used only for testing
attr_reader :connection_pool
@ -51,7 +51,7 @@ module Vmpooler
# name of the provider class
def name
'aws'
'ec2'
end
def connection

View file

@ -1,13 +1,13 @@
require 'spec_helper'
require 'mock_redis'
require 'ec2_helper'
require 'vmpooler/providers/aws'
require 'vmpooler/providers/ec2'
RSpec::Matchers.define :relocation_spec_with_host do |value|
match { |actual| actual[:spec].host == value }
end
describe 'Vmpooler::PoolManager::Provider::Aws' do
describe 'Vmpooler::PoolManager::Provider::Ec2' do
let(:logger) { MockLogger.new }
let(:metrics) { Vmpooler::Metrics::DummyStatsd.new }
let(:poolname) { 'debian-9' }
@ -20,7 +20,7 @@ describe 'Vmpooler::PoolManager::Provider::Aws' do
max_tries: 3
retry_factor: 10
:providers:
:aws:
:ec2:
connection_pool_timeout: 1
zone: '#{zone}'
region: '#{region}'
@ -32,7 +32,7 @@ describe 'Vmpooler::PoolManager::Provider::Aws' do
size: 5
timeout: 10
ready_ttl: 1440
provider: 'aws'
provider: 'ec2'
EOT
)
}
@ -49,7 +49,7 @@ EOT
) { MockRedis.new }
end
subject { Vmpooler::PoolManager::Provider::Aws.new(config, logger, metrics, redis_connection_pool, 'aws', provider_options) }
subject { Vmpooler::PoolManager::Provider::Ec2.new(config, logger, metrics, redis_connection_pool, 'ec2', provider_options) }
describe '#manual tests live' do
context 'in itsysops' do

View file

@ -1,9 +1,9 @@
require 'rspec'
describe 'VmpoolerProviderAws' do
describe 'VmpoolerProviderEc2' do
context 'when creating class ' do
it 'sets a version' do
expect(VmpoolerProviderAws::VERSION).not_to be_nil
expect(VmpoolerProviderEc2::VERSION).not_to be_nil
end
end
end

View file

@ -1,15 +1,15 @@
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'vmpooler-provider-aws/version'
require 'vmpooler-provider-ec2/version'
Gem::Specification.new do |s|
s.name = 'vmpooler-provider-aws'
s.version = VmpoolerProviderAws::VERSION
s.name = 'vmpooler-provider-ec2'
s.version = VmpoolerProviderEc2::VERSION
s.authors = ['Puppet']
s.email = ['support@puppet.com']
s.summary = 'AWS provider for VMPooler'
s.homepage = 'https://github.com/puppetlabs/vmpooler-provider-aws'
s.summary = 'EC2 provider for VMPooler'
s.homepage = 'https://github.com/puppetlabs/vmpooler-provider-ec2'
s.license = 'Apache-2.0'
s.required_ruby_version = Gem::Requirement.new('>= 2.3.0')

View file

@ -138,7 +138,7 @@
#
# Provider specific pool settings
#
# AWS provider
# EC2 provider
# - zone
# The zone to create the VMs in
# (optional: default is global provider zone value)