vagrant-adbinfo 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b601a8239cb4fda104bbbb7aa7406a9625138997
4
- data.tar.gz: 994cb677baa05fc1582e27f3622a2dbadd140bb7
3
+ metadata.gz: e4bac8d96f69854d32666321b38047366c833df6
4
+ data.tar.gz: 01b69fe6b83fed7c7a33384fb0b20bd501d9fdd1
5
5
  SHA512:
6
- metadata.gz: dd7aa89b8d77f0e284b83c34e3fcebec20178c7ada7bda02332bd64aa8a360ccab49da6ed17591d8ffc7d3733c39da3f590a6d9b131469f74fd85780ffd052fb
7
- data.tar.gz: 6fefe725adb2bf8cf3c55ccdf1a71a44d90eaac4e5c13c9de1573f5466e3d3897f60261701e6a49ba509936c9937eb4a93f849633c985a6c7228c63ed9686ed8
6
+ metadata.gz: d3ddf5383fd6a698c5dd2744b5e7d8ea3eec8876e90ca71821a6cebde19d35ffbfad83cd9fdfdfb352aa58f2b8a5a46066cdf2e8166ec0eef2dc27d2c5627397
7
+ data.tar.gz: 2f2a779c7f4346e2b616ed18856d7c0b82e53c55addeba869c1e32d6210021b6f61d7632cccf1a5a3d88270fcebb8404d443cba4c220f8d68e579a6a675ef3ce
data/README.md CHANGED
@@ -18,6 +18,8 @@ Based in part on the work done by Michael Kuzmin for vagrant-guestip at https://
18
18
 
19
19
  7 - rake build # puts the gemfile in pkg/
20
20
 
21
+ 8 - get bex to do a `rake release` after bumping the version number, etc.
22
+
21
23
 
22
24
  # Potential Plans/Ideas (in Priority Order)
23
25
 
@@ -49,3 +51,6 @@ Why? vagrant-libvirt has two challenges:
49
51
  - Support inbound network and no port forward for VirtualBox.
50
52
  - Support a port forward on libvirt.
51
53
 
54
+ ## Other Ideas (not started)
55
+
56
+ - Support `vagrant adbinfo <target>` (multiple targets?)
data/lib/command.rb CHANGED
@@ -7,16 +7,31 @@ module VagrantPlugins
7
7
 
8
8
  def execute
9
9
  with_target_vms(nil, {:single_target=>true}) do |machine|
10
- port = machine.provider.capability(:forwarded_ports).index(2376)
10
+ # Path to the private_key and where we will store the TLS Certificates
11
+ secrets_path = machine.data_dir
12
+
13
+ # First, get the TLS Certificates, if needed
14
+ if !File.directory?(File.expand_path(".docker", secrets_path)) then
15
+ # Finds the host machine port forwarded from guest sshd
16
+ hport = machine.provider.capability(:forwarded_ports).key(22)
17
+
18
+ # scp over the client side certs from guest to host machine
19
+ `scp -r -P #{hport} -o LogLevel=FATAL -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i #{secrets_path}/private_key vagrant@127.0.0.1:/home/vagrant/.docker #{secrets_path}`
20
+ end
21
+
22
+ # Print configuration information for accesing the docker daemon
23
+
24
+ # Finds the host machine port forwarded from guest docker
25
+ port = machine.provider.capability(:forwarded_ports).key(2376)
11
26
  message =
12
27
  <<-eos
13
28
  Set the following environment variables to enable access to the
14
29
  docker daemon running inside of the vagrant virtual machine:
15
30
 
16
31
  export DOCKER_HOST=tcp://127.0.0.1:#{port}
17
- export DOCKER_CERT_PATH=PATH_NEEDED
32
+ export DOCKER_CERT_PATH=#{secrets_path}/.docker
18
33
  export DOCKER_TLS_VERIFY=1
19
- export DOCKER_MACHINE_NAME=\"#{machine.id}\"
34
+ export DOCKER_MACHINE_NAME=\"#{machine.index_uuid[0..6]}\"
20
35
  eos
21
36
  @env.ui.info(message)
22
37
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'vagrant-adbinfo'
3
- spec.version = '0.0.1'
3
+ spec.version = '0.0.3'
4
4
  spec.homepage = 'https://github.com/bexelbie/vagrant-adbinfo'
5
5
  spec.summary = 'Vagrant plugin that provides the IP address:port and tls certificate file location for a docker daemon'
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-adbinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Exelbierd
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-11 00:00:00.000000000 Z
12
+ date: 2015-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler