vagrant-rancher 1.1.0 → 1.1.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
  SHA1:
3
- metadata.gz: 5cc5f9f9ce9ca77cca5003504ebf18990b5a889c
4
- data.tar.gz: 2237ae2b0cd21006ac30159ab52feff0e275dbea
3
+ metadata.gz: 8df01d7347f365d50d14833847a6a5103220cd93
4
+ data.tar.gz: 9495ee02ae5dcce82bf6a3bda1436790e4539195
5
5
  SHA512:
6
- metadata.gz: 0bec5ec68204cfaf5ef8e2c50138fe6685d1130e8fcfa4a37f3a712d03d806778cae184ad0a3123f86dbf678790ead9b63deb0ee95a6817d608154c9c66351fd
7
- data.tar.gz: e3c094d730166f34309f395cb1d39ebb5f567e21750f452defede44be10f6aed292274c07b6bce2b947ac00f5e3a5e9ece91edb4f850ef6f325a167da99216d9
6
+ metadata.gz: 7989517da08c24d0016e9b075ae3a100d436a0922ef70a27b1381db2a1ab9a1a4b1cbb17647b195381400de76414db13f8941141097aaea9b00d59385c67d69a
7
+ data.tar.gz: 8a4c7c15b785bab4ebe4cbdda16319648009568c84a6e5086d019426378f8a94952bf1f507183c3026028f4cfc5b802c3b4c50b99677b16279071a0ff4df80ee
data/README.md CHANGED
@@ -38,6 +38,7 @@ The `vagrant-rancher` plugin requires the hostname being set to either a DNS nam
38
38
  * `role` (*optional*, default: `'server'`): either 'server' (to run the Rancher server) or 'agent' to only run the Rancher agent
39
39
  * `version` (*optional*, default: `'latest'`): version (tag) of the Rancher server container to run
40
40
  * `port` (*optional*, default: `8080`): port to run the rancher server on in the case of the server, and communicate with in the case of the agent
41
+ * `rancher_server_image` (*optional*, default: `rancher/server`): Override default Rancher server image name. Allows for pull from a private registry
41
42
  * `server_args` (*optional*, default: `''`): additional args to pass to the Docker run command when starting the Rancher server
42
43
  * `labels` (*optional*, default: `[]`): array of key=value pairs of labels to assign to the agent (ex. ["role=server","env=local"])
43
44
  * `deactivate` (*optional*, default: `false`): deactivate the host in Rancher to prevent it from being scheduled on
@@ -6,6 +6,7 @@ module VagrantPlugins
6
6
  attr_accessor :hostname
7
7
  attr_accessor :port
8
8
  attr_accessor :deactivate
9
+ attr_accessor :rancher_server_image
9
10
  attr_accessor :server_args
10
11
  attr_accessor :labels
11
12
  attr_accessor :project
@@ -16,6 +17,7 @@ module VagrantPlugins
16
17
  @version = UNSET_VALUE
17
18
  @hostname = UNSET_VALUE
18
19
  @port = UNSET_VALUE
20
+ @rancher_server_image = UNSET_VALUE
19
21
  @server_args = UNSET_VALUE
20
22
  @labels = UNSET_VALUE
21
23
  @deactivate = UNSET_VALUE
@@ -28,6 +30,7 @@ module VagrantPlugins
28
30
  @version = 'latest' if @version == UNSET_VALUE
29
31
  @hostname = nil if @hostname == UNSET_VALUE
30
32
  @port = 8080 if @port == UNSET_VALUE
33
+ @rancher_server_image = 'rancher/server' if @rancher_server_image == UNSET_VALUE
31
34
  @server_args = nil if @server_args == UNSET_VALUE
32
35
  @labels = nil if @labels == UNSET_VALUE
33
36
  @deactivate = false if @deactivate == UNSET_VALUE
@@ -53,7 +56,11 @@ module VagrantPlugins
53
56
  unless port.is_a?(Fixnum) || port.is_a?(Fixnum)
54
57
  errors << ':rancher provisioner requires port to be a number'
55
58
  end
56
-
59
+
60
+ unless rancher_server_image.is_a?(String) || rancher_server_image.nil?
61
+ errors << ':rancher provisioner requires rancher_server_image to be a string'
62
+ end
63
+
57
64
  unless server_args.is_a?(String) || server_args.nil?
58
65
  errors << ':rancher provisioner requires server_args to be a string'
59
66
  end
@@ -31,7 +31,7 @@ module VagrantPlugins
31
31
  def install_server
32
32
  # check to see if the rancher server is already running
33
33
  unless @machine.communicate.test('sudo docker inspect rancher-server')
34
- @machine.ui.info "Starting server container: rancher/server:#{config.version}..."
34
+ @machine.ui.info "Starting server container: #{config.rancher_server_image}:#{config.version}..."
35
35
 
36
36
  docker_cmd = "docker run -d -t --name rancher-server -p #{@config.port}:8080"
37
37
 
@@ -41,7 +41,7 @@ module VagrantPlugins
41
41
  end
42
42
 
43
43
  # start the server and error if there is a failure
44
- unless @machine.communicate.sudo("#{docker_cmd} rancher/server:#{config.version}")
44
+ unless @machine.communicate.sudo("#{docker_cmd} #{config.rancher_server_image}:#{config.version}")
45
45
  @machine.ui.error 'Could not start Rancher server container'
46
46
  raise Errors::RancherServerContainer
47
47
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Rancher
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-rancher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nextrevision
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-30 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler