kitchen-vz 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 26d28c6e026fec30c78adec6069fcafc53f48c18
4
- data.tar.gz: 1240a2ec9c2f869e25658fe1cb75a5b296e55635
3
+ metadata.gz: 4c2477b6da19fbce4b92f40852883f89aeb5a78d
4
+ data.tar.gz: d35333107e212aa6f8538b5023d21845bb94fbda
5
5
  SHA512:
6
- metadata.gz: d2614c137bf77f6fd3445df14ff1c75620e62f7f62d34f2dce975cb29959e3a48c52291d51e29cfe4520b2298ec1aa4a75911f4417eec979c7354fb3b2daa8ce
7
- data.tar.gz: 1e76e21db61060d93d70de593b41658f42a22223e11a1312bc7021130ded74e2d44266732860ff9edaa2914f5462474cba628072670f0dba19850fbdfb6c100a
6
+ metadata.gz: 263ba5bb5693fd5c856482d28576457e68004d51f10163dc7582522d7ab82a4f0e0f916622e91a514e962f297f29ed556894a3a3102075e3aa627300907d1ff7
7
+ data.tar.gz: 46606b309c3fa6923f41ab0ee2b0d1305c8e8c64ec5d803820f63fa128c3e0fde957455a573b5b506c34bfc55ccf99f5d750e7c85151714106a8e277537ba1ea
@@ -1,3 +1,7 @@
1
+ ## 0.1.4
2
+
3
+ * Add 'use_agent_forwarding' option. This option allows to use host ssh-agent to forward keys into container.
4
+
1
5
  ## 0.1.3
2
6
 
3
7
  * Add `additional_options` option. This option allows to set additional options for container, such as features.
data/README.md CHANGED
@@ -38,6 +38,7 @@ Example `.kitchen.local.yml`:
38
38
  |:customize|Hash with container settings. It may contain :memory, :disk and :cpus options.|memory: '512M', disk: '10G', cpus: 2|
39
39
  |:private_key|Path to private key. This key pair used by the kitchen to login into container.|.kitchen/kitchen_id_rsa|
40
40
  |:public_key|Path to public key. This key pair used by the kitchen to login into container.|.kitchen/kitchen_id_rsa.pub|
41
+ |:use_agent_forwarding| Set agent forwarding option into container.|'False'|
41
42
  |:ostemplate|Virtuozzo template which will be used for container creating.||
42
43
  |:use_sudo|It shows will sudo be used or not.|true|
43
44
  |:additional_options|Array with `prlctl set` options, which will be pass as is. Example: ["--features nfs:on"]|[]|
@@ -31,6 +31,7 @@ module Kitchen
31
31
  default_config :username, 'kitchen'
32
32
  default_config :private_key, File.join(Dir.pwd, '.kitchen', 'kitchen_id_rsa')
33
33
  default_config :public_key, File.join(Dir.pwd, '.kitchen', 'kitchen_id_rsa.pub')
34
+ default_config :use_agent_forwarding, false
34
35
  default_config :network, 'Bridged' => { dhcp: true }
35
36
  default_config :use_sudo, true
36
37
  default_config :arch, 'x86_64'
@@ -135,7 +136,9 @@ module Kitchen
135
136
 
136
137
  def create_user(state)
137
138
  ["useradd #{config[:username]}",
138
- "mkdir /home/#{config[:username]}/.ssh",
139
+ "mkdir -p /home/#{config[:username]}/.ssh",
140
+ "chown #{config[:username]}: /home/#{config[:username]}",
141
+ "chmod 700 /home/#{config[:username]}",
139
142
  "chown #{config[:username]}: /home/#{config[:username]}/.ssh",
140
143
  "chmod 700 /home/#{config[:username]}/.ssh",
141
144
  "echo '#{File.open(config[:public_key]).read}' > /home/#{config[:username]}/.ssh/authorized_keys",
@@ -206,7 +209,7 @@ module Kitchen
206
209
  end
207
210
 
208
211
  def ssh_connection
209
- @connection ||= Net::SSH.start(uri.host, uri.user, port: uri.port)
212
+ @connection ||= Net::SSH.start(uri.host, uri.user, port: uri.port, forward_agent: config[:use_agent_forwarding])
210
213
  end
211
214
  end
212
215
  end
@@ -19,6 +19,6 @@
19
19
  module Kitchen
20
20
  module Driver
21
21
  # Version string for Vz Kitchen driver
22
- VZ_VERSION = '0.1.3'.freeze
22
+ VZ_VERSION = '0.1.4'.freeze
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-vz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Yudin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-19 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -119,9 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.6.6
122
+ rubygems_version: 2.5.2
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: A Virtuozzo driver for Test Kitchen
126
126
  test_files: []
127
- has_rdoc: