beaker-abs 0.7.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64463104e5baa6488316a4824290f54d746e9ad36a91fad15d4e549a45d525fa
4
- data.tar.gz: 4c957500c3726171b389eb6610b4c65e8197f984edb868e2da31f8cdf67236cb
3
+ metadata.gz: 9e71b0f3712201cfa7d1a16790657faad5c448f929d610a5a0530e2fb4442d00
4
+ data.tar.gz: b29f88d99c39480d7b90b328e43784a3e1e480156791de64d185f25794e6712f
5
5
  SHA512:
6
- metadata.gz: fc6272ea353435e50fa23c78635db4701a8fa2086ea0a44ce074e5aa95e56c16568618d84f8140d12d4bb7d4bbbe8c3f3d8f283cb315708589113c3939dcea9e
7
- data.tar.gz: d094be28dac020761822898a028593b3f4e3c4b3de0cfcc2ea3fc7ed6c52ea508c30e18d76940e9840a50d3d7c4b1379bf15bc9d2160dbd02a37cf214882b40b
6
+ metadata.gz: bdf47ea69b4c7822110289ee2a78cb1b98600dc0390ecf7da13977e1293158db4b2c630bfb64d9d80f612bac1cfa19ef193ad60aab72bab1dce157023d29e992
7
+ data.tar.gz: c43c807d7db562e8ca5615d2261f514a91af04bca3758807b14a5fe2d396fcd62f306dbd6c141eb06b1a14f9bbb2b9d208b4c9a89879c3c63fa6bb32cbb4841a
data/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @puppetlabs/beaker
1
+ * @puppetlabs/dio
data/README.md CHANGED
@@ -17,6 +17,12 @@ s.add_runtime_dependency 'beaker', '~>4.0'
17
17
  s.add_runtime_dependency 'beaker-abs'
18
18
  ~~~
19
19
 
20
+ Beaker-abs changes the default beaker (core) behavior of settings the NET::SSH ssh config to 'false' which means do not respect any of the client's ssh_config.
21
+ If beaker-abs detects that the ssh config will be false (it was not replaced in the option files, in the HOST config etc) it sets it to the value of
22
+ SSH_CONFIG_FILE or default to 'true'. True means it will automatically check the typical locations (~/.ssh/config, /etc/ssh_config). Respecting the ssh_config is
23
+ useful to specify things like no strict hostkley checking, and also to support the smallstep 'step' command in CI.
24
+
25
+
20
26
  ## Usage
21
27
 
22
28
  Create a beaker host config with `hypervisor: abs`, and pass the data from the
@@ -51,6 +57,30 @@ the environment variable ABS_SERVICE_NAME or the top level option in the hosts f
51
57
  it will take precedence over CI tests. Be careful not to run a CI test with this option. The priority can be configured via
52
58
  the environment variable ABS_SERVICE_PRIORITY or the top level option in the hosts file abs_service_priority.
53
59
 
60
+ #### Examples
61
+
62
+ Changing from default priority 1 to 3 via env var
63
+ ```
64
+ ABS_SERVICE_PRIORITY=3 bundle exec beaker --provision --hosts=hosts.cfg --tests acceptance/tests
65
+ ```
66
+
67
+ Changing the service name to look for in ~/.vmfloaty.yml via a beaker option file
68
+ ```
69
+ $ cat options.rb
70
+ {
71
+ provision: 'true',
72
+ abs_service_name: "FOOBAR"
73
+ }
74
+ $ bundle exec beaker --hosts=hosts.cfg --tests acceptance/tests --options options.rb
75
+ ```
76
+
77
+ ## Environment vars
78
+ | Var | Description | Default |
79
+ | ----------- | ----------- | ------ |
80
+ | ABS_SERVICE_NAME | When using locally via vmfloaty, the --service to use | abs |
81
+ | ABS_SERVICE_PRIORITY | When using locally via vmfloaty, the priority to use | 1 |
82
+ | SSH_CONFIG_FILE | If beaker-abs detects the beaker default of 'false', you can specify a file location for the ssh_config. True means it will automatically check the typical locations (~/.ssh/config, /etc/ssh_config). | true |
83
+
54
84
  ## Development
55
85
 
56
86
  After checking out the repo, run `bundle install --path .bundle` to install dependencies. Then, run `bundle exec rake test` to run the tests.
data/beaker-abs.gemspec CHANGED
@@ -19,7 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "beaker", "~> 4.0"
22
- spec.add_dependency "vmfloaty", ">= 1.0", "< 1.2"
22
+ spec.add_dependency "vmfloaty", ">= 1.0", "< 2"
23
+ # accept more keys, for smallstep integration
24
+ spec.add_dependency 'ed25519', ">= 1.2", "< 2.0"
25
+ spec.add_dependency 'bcrypt_pbkdf', ">= 1.0", "< 2.0"
23
26
  spec.add_development_dependency "bundler", "~> 2.1"
24
27
  spec.add_development_dependency "rake", "~> 13.0"
25
28
  spec.add_development_dependency "minitest", "~> 5.0"
@@ -6,12 +6,35 @@ require 'vmfloaty/conf'
6
6
  require 'vmfloaty/utils'
7
7
 
8
8
  module Beaker
9
+ class Clifloaty
10
+ # the floaty service needs a 'cli' object that would normally represent the flags passed on the command line
11
+ # that object is then "merged" with the floaty config files to add/change options
12
+ # creating a dummy cli here
13
+ attr_reader :url, :token, :user, :service, :priority
14
+ def initialize(service, priority)
15
+ @service = service #the name of the service you want to use
16
+ @priority = priority
17
+ end
18
+ end
19
+
9
20
  class Abs < Beaker::Hypervisor
10
21
  def initialize(hosts, options)
11
22
  @options = options
12
23
  @logger = options[:logger]
13
24
  @hosts = hosts
14
25
 
26
+ # set NET:SSH to use the ssh_config files if they exist
27
+ # beaker (upstream) defaults this settings to false
28
+ # NET:SSH documentation: set to true to load the default OpenSSH config files (~/.ssh/config, /etc/ssh_config), or to false to not load them,
29
+ # or to a file-name (or array of file-names) to load those specific configuration files. Defaults to true
30
+ if options[:ssh] && options[:ssh][:config] == false
31
+ options[:ssh][:config] = ENV['SSH_CONFIG_FILE'] || true
32
+ # code smell, replace existing host object (that's where NET::SSH gets the options, and the host has its own copy of the options!)
33
+ @hosts.each_with_index do |host, index|
34
+ @hosts[index] = Beaker::Host.create(host.name, host.host_hash, options)
35
+ end
36
+ end
37
+
15
38
  resource_hosts = ENV['ABS_RESOURCE_HOSTS'] || @options[:abs_resource_hosts]
16
39
 
17
40
  @abs_service_name = ENV['ABS_SERVICE_NAME'] || @options[:abs_service_name] || "abs"
@@ -91,13 +114,7 @@ module Beaker
91
114
  config = Conf.read_config # get the vmfloaty config file in home dir
92
115
 
93
116
  # TODO: the options object provided by the floaty cli is required in get_service_config()
94
- # we should make it optional or accept nil
95
- cli = Object.new
96
- def cli.service() @abs_service_name end
97
- def cli.priority() @abs_service_priority end # forces going ahead of queue
98
- def cli.url() nil end
99
- def cli.token() nil end
100
- def cli.user() nil end
117
+ cli = Clifloaty.new(@abs_service_name, @abs_service_priority)
101
118
 
102
119
  #the service object is the interfacte to all methods
103
120
  abs_service = Service.new(cli, config)
@@ -1,5 +1,5 @@
1
1
  module BeakerAbs
2
2
  module Version
3
- STRING = '0.7.0'
3
+ STRING = '0.10.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-abs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Cooper
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-12-10 00:00:00.000000000 Z
12
+ date: 2022-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: '1.0'
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
- version: '1.2'
37
+ version: '2'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,8 +43,48 @@ dependencies:
43
43
  - !ruby/object:Gem::Version
44
44
  version: '1.0'
45
45
  - - "<"
46
+ - !ruby/object:Gem::Version
47
+ version: '2'
48
+ - !ruby/object:Gem::Dependency
49
+ name: ed25519
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
46
53
  - !ruby/object:Gem::Version
47
54
  version: '1.2'
55
+ - - "<"
56
+ - !ruby/object:Gem::Version
57
+ version: '2.0'
58
+ type: :runtime
59
+ prerelease: false
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '1.2'
65
+ - - "<"
66
+ - !ruby/object:Gem::Version
67
+ version: '2.0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: bcrypt_pbkdf
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '1.0'
75
+ - - "<"
76
+ - !ruby/object:Gem::Version
77
+ version: '2.0'
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '1.0'
85
+ - - "<"
86
+ - !ruby/object:Gem::Version
87
+ version: '2.0'
48
88
  - !ruby/object:Gem::Dependency
49
89
  name: bundler
50
90
  requirement: !ruby/object:Gem::Requirement
@@ -128,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
168
  - !ruby/object:Gem::Version
129
169
  version: '0'
130
170
  requirements: []
131
- rubygems_version: 3.0.8
171
+ rubygems_version: 3.0.9
132
172
  signing_key:
133
173
  specification_version: 4
134
174
  summary: Let's test Puppet, using hosts provisioned by Always Be Scheduling service.