vagrant-service-manager 1.4.0 → 1.4.1

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: 649f720bd5476d1eefde64dbbea8675afc14d30f
4
- data.tar.gz: ed744a9624ac588790d00aa23467e34bba0f69a2
3
+ metadata.gz: 5865b4ded5fb8b167fb6bad3617ced706128d9ad
4
+ data.tar.gz: 50ee25f87f5008d4358fd8b530809c60688b535d
5
5
  SHA512:
6
- metadata.gz: ae010abd5e3bd9d0272810eca811d78cfb5ff1ec023e47e46b1318daa7019629f44a1b364034a14bc43bca7f001ed3f5f4a0fb0cbbda0c70170b38bb3c0ecc0b
7
- data.tar.gz: 8ec4d235277ad550b3b1adfadcb2822db3dbb463bc7b904c04a9ae1f891fa2f65313512d36749ad9f795d3cfc2e26c88f09cbc9ada5c9adea39ecde30471e943
6
+ metadata.gz: 7982fc202d71510528e996d352f5228ad422563447bc614c6f28936839390fd4df188d8f2df264d4b82155fe121a07cd575e00de76f5026a12ab03bb6b141b77
7
+ data.tar.gz: e137145f206dc26bb95ec8a8aeadceb54aab1e1a16e2938db2521f8f94801b7aa3baf0e0e63fded8b1cc409a126a8024a21e66247bf5693c30c61c8ae5fa5663
@@ -1,14 +1,9 @@
1
1
  # config/cucumber.yml
2
2
  ##YAML Template
3
3
  ---
4
- default: --profile html --tags ~@ci-only
4
+ default: --profile html --tags ~@ci-only --tags ~@todo
5
+ ci: --format CiFormatter --no-color -m -b --tags ~@todo
5
6
  all: --profile html
6
7
 
7
8
  pretty: --format pretty -b
8
9
  html: --format progress --format html --out=build/features_report.html -b
9
- ci: --format pretty --format html --out=build/features_report.html --no-color -b
10
-
11
- help: --tags @help --profile html
12
- box: --tags @box --profile html
13
- env: --tags @env --profile html
14
- openshift: --tags @openshift --profile html
@@ -1,20 +1,36 @@
1
1
  = Revision History
2
2
  :toc:
3
3
 
4
+ [[v1.4.1-nov-17-2016]]
5
+ == 1.4.1 November 17, 2016
6
+ * Fix #346 Adding a Rake task for Asciidoctor and enabling Guard and Live Reload @hferentschik
7
+ * Fix #389 Refactoring proxy test @hferentschik
8
+ * Fix #389 Support the use of install-cli in HTTP proxy environment @budhrg
9
+ * Fix #434 Align proxy config names similar to 'sccli' @budhrg
10
+ * Fix #362 Adding OpenShift configuration options back into VSM Readme @Preeticp
11
+ * Fix #335 'bundle exec vagrant up --provider=libvirt' should work @budhrg
12
+ * Fix #429 Minor language and formatting edits to Proxy section etc @Preeticp
13
+ * Fix #427 Add acceptance test for 'box version' command @budhrg
14
+ * Fix #425 Disabling CDK OpenShift tests until issue #415 gets resolved @hferentschik
15
+ * Fix #425 Organizing Cucumber features around service functionality @hferentschik
16
+ * Fix #419 Adding additional column to example table to print status [passed|failure|skipped] @hferentschik
17
+ * Fix #417 Updated rake task to download latest CDK version @budhrg
18
+ * Fix #421 Correct the order of drafting the release and updating to dev version @budhrg
19
+
4
20
  [[v1.4.0-oct-21-2016]]
5
21
  == 1.4.0 October 21, 2016
6
- * Fix #376 --path option of install cli not working as expected
7
- * Fix #327 and #326: Tests and docs for --cli-version and --path options
8
- * Fix #412 Pin the rubocop version and minimize the offenses
9
- * Fix #409 fixes Openshift service failed message on vagrant up
10
- * Fix #406 Service hooks doesn't start in vagrant reload
11
- * Fix #338 Updating broken links in CONTRIBUTING.adoc
12
- * Fix #407 Converted CHANGELOG from markdown to asciidoc
13
- * Fix #402 rename open_shift.rb file to openshift
14
- * Fix #302 service-manager config options for HTTP proxy
15
- * Fix #393 Fix expectations for Kubernetes tests on OS X
16
- * Fix #394 Forcing used Bundler version to 1.12.5 as required by Vagrant.
17
- * Fix #397 Using a guard clause instead of wrapping the code inside a conditional
22
+ * Fix #376 --path option of install cli not working as expected @budhrg
23
+ * Fix #327 and #326: Tests and docs for --cli-version and --path options @budhrg
24
+ * Fix #412 Pin the rubocop version and minimize the offenses @budhrg
25
+ * Fix #409 fixes Openshift service failed message on vagrant up @budhrg
26
+ * Fix #406 Service hooks doesn't start in vagrant reload @budhrg
27
+ * Fix #338 Updating broken links in CONTRIBUTING.adoc @Preeticp
28
+ * Fix #407 Converted CHANGELOG from markdown to asciidoc @thatdocslady
29
+ * Fix #402 rename open_shift.rb file to openshift @budhrg
30
+ * Fix #302 service-manager config options for HTTP proxy @budhrg
31
+ * Fix #393 Fix expectations for Kubernetes tests on OS X @budhrg
32
+ * Fix #394 Forcing used Bundler version to 1.12.5 as required by Vagrant @hferentschik
33
+ * Fix #397 Using a guard clause instead of wrapping the code inside a conditional @hferentschik
18
34
 
19
35
  [[v1.3.3-sep-1-2016]]
20
36
  == 1.3.3 September 1, 2016
@@ -25,7 +41,7 @@ exist @alexeykazakov
25
41
  [[v1.3.2-aug-31-2016]]
26
42
  == 1.3.2 August 31, 2016
27
43
 
28
- * Fix #384 don't execute os_variant for unsupported box
44
+ * Fix #384 don't execute os_variant for unsupported box @budhrg
29
45
 
30
46
  [[v1.3.1-aug-25-2016]]
31
47
  == 1.3.1 August 25, 2016
@@ -120,10 +120,10 @@ $ git push origin master
120
120
  `vagrant-service-manager version=<version>`
121
121
  * Push commit to upstream
122
122
  * Release the gem: `bundle exec rake release`
123
+ * Create a Github https://github.com/projectatomic/vagrant-service-manager/releases[release] and paste change log for release
123
124
  * Update link:lib/vagrant-service-manager/version.rb[version.rb] with the next anticipated release version, eg _1.42.0.dev_
124
125
  * Commit with message: `vagrant-service-manager setting dev version <version>.dev`
125
126
  * Push upstream
126
- * Create a Github https://github.com/projectatomic/vagrant-service-manager/releases[release] and paste change log for release
127
127
 
128
128
  == Maintainers
129
129
 
data/Gemfile CHANGED
@@ -4,8 +4,6 @@ group :development do
4
4
  gem 'vagrant',
5
5
  git: 'https://github.com/mitchellh/vagrant.git',
6
6
  ref: 'v1.8.4'
7
- gem 'vagrant-libvirt' if RUBY_PLATFORM =~ /linux/i
8
- gem 'fog-libvirt', '0.0.3' if RUBY_PLATFORM =~ /linux/i # https://github.com/pradels/vagrant-libvirt/issues/568
9
7
  gem 'mechanize'
10
8
  gem 'json'
11
9
  gem 'cucumber', '~> 2.1'
@@ -14,6 +12,9 @@ group :development do
14
12
  gem 'launchy'
15
13
  gem 'rake', '10.4.2'
16
14
  gem 'rubocop', '0.44.1'
15
+ gem 'guard-rake'
16
+ gem 'guard-livereload', '~> 2.5', require: false
17
+ gem 'asciidoctor'
17
18
  end
18
19
 
19
20
  group :test do
@@ -23,4 +24,6 @@ end
23
24
 
24
25
  group :plugins do
25
26
  gemspec
27
+ gem 'vagrant-libvirt' if RUBY_PLATFORM =~ /linux/i
28
+ gem 'fog-libvirt', '0.0.3' if RUBY_PLATFORM =~ /linux/i # https://github.com/pradels/vagrant-libvirt/issues/568
26
29
  end
@@ -0,0 +1,10 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'rake', task: 'html' do
5
+ watch(/^.*.adoc/)
6
+ end
7
+
8
+ guard 'livereload' do
9
+ watch(/^.*.html/)
10
+ end
@@ -47,14 +47,15 @@ https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/in
47
47
  ----------------------------------------------
48
48
  vagrant plugin install vagrant-service-manager
49
49
  ----------------------------------------------
50
+
50
51
  1. Download the relevant Vagrantfile for your
51
52
  https://github.com/projectatomic/adb-atomic-developer-bundle[ADB]
52
53
  vagrant box, from the
53
54
  https://github.com/projectatomic/adb-atomic-developer-bundle/tree/master/components/centos[repository].
54
55
  For further details on the usage of custom Vagrantfiles designed for
55
- specific use cases, refer to the
56
- https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/using.rst[Usage
57
- Documentation].
56
+ specific use cases, refer to the Download ADB section in the
57
+ https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/installing.adoc[Installing ADB] Documentation.
58
+
58
59
  1. Start the ADB vagrant box using `vagrant up`. For detailed
59
60
  instructions consult the
60
61
  https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/installing.rst[Installation
@@ -66,7 +67,7 @@ non NAT network interface declaration in the Vagrantfile. If the user
66
67
  does not provide a network declaration in the Vagrantfile, a private
67
68
  DHCP network is added by default and a warning is displayed.
68
69
 
69
- 1. Run the plugin to get environment variables and certificates:
70
+ 1. Run the plugin to get the environment variables and certificates:
70
71
  +
71
72
  ----------------------------------------------------------------------------
72
73
  $ vagrant service-manager env docker
@@ -90,16 +91,13 @@ will also re-download the certificates onto the host machine.
90
91
 
91
92
  === Available commands
92
93
 
93
- The following section lists the high level commands available for the plugin,
94
- which enable you to:
95
-
96
- - set up your environment variables and get the TLS certificates to secure the
97
- Docker communication channel
98
- - identify the routable ip address as well as the version of your VM
99
- - and manage the life cycle of the configured services
100
-
101
94
  For a detailed list of all available commands and their explanations refer
102
- to the link:commands.adoc[Commands Document].
95
+ to the link:commands.adoc[Commands Document]. +
96
+ The following section lists the high level commands available for the plugin.
97
+ which enable you to set up your environment variables and get the TLS
98
+ certificates to secure the Docker communication channel; identify the
99
+ routable ip address as well as the version of your VM and manage the life
100
+ cycle of the configured services.
103
101
 
104
102
  - `vagrant service-manager [command] [--help | -h]` +
105
103
  Displays the possible commands, options and other relevant information
@@ -154,31 +152,58 @@ have IPv4 addresses, the address on eth2 is used.
154
152
 
155
153
  === HTTP Proxy Settings
156
154
 
157
- In an environment where HTTP traffic needs pass through a HTTP proxy, Docker
158
- and OpenShift need to be aware of the required proxy settings in order to function.
159
- `http_proxy`, `http_proxy_user` and `http_proxy_password` configurations need to be
160
- specified through Vagrantfile. You can do so via:
155
+ In an environment where the HTTP traffic needs to pass through an
156
+ HTTP proxy server, set the `proxy`, `proxy_user` and
157
+ `proxy_password` proxy configurations in the Vagrantfiles to enable
158
+ services like Docker and OpenShift to function correctly. +
159
+ You can do so via:
160
+ +
161
+ -----
162
+ config.servicemanager.proxy = <Proxy URL>
163
+ config.servicemanager.proxy_user = <Proxy user name>
164
+ config.servicemanager.proxy_password = <Proxy user password>
165
+ -----
161
166
 
162
- ----------------------------------------------------------------------------
163
- config.servicemanager.http_proxy = <Proxy URL>
164
- config.servicemanager.http_proxy_user = <Proxy user name>
165
- config.servicemanager.http_proxy_password = <Proxy user password>
166
- ----------------------------------------------------------------------------
167
+ When these settings are applied, they are passed through to the Docker and OpenShift services. In an unauthenticated proxy environment, the `proxy_user` and `proxy_password` configurations can be omitted.
168
+
169
+ NOTE: `http_proxy`, `http_proxy_user` and `http_proxy_password` have been depreacted now.
170
+
171
+ === Configuring Services
172
+ The vagrant-service-manager helps you configure the service of your choice:
173
+
174
+ . Enable the desired service(s) in the ADB Vagrantfile as:
175
+ +
176
+ `config.servicemanager.services = 'openshift'`
177
+ +
178
+ [NOTE]
179
+ ====
180
+ - Docker is the default service for the Atomic Developer Bundle and does not require any configuration to ensure it is started whereas, the Red Hat Enterprise Linux Container Development Kit, which is based on ADB, automatically starts OpenShift. +
181
+ - You can use a comma-separated list to enable multiple services. For instance: docker, openshift.
182
+ ====
183
+
184
+ . Enable the relevant option for the services you have selected in the Vagrantfile. For example, specific versions of OpenShift can be set using the following variables:
185
+ +
186
+
187
+ - `config.servicemanager.openshift_docker_registry = "docker.io"` - Specifies the registry from where the OpenShift image is pulled.
188
+ +
189
+ - `config.servicemanager.openshift_image_name = "openshift/origin"` - Specifies the image to be used.
190
+ +
191
+ - `config.servicemanager.openshift_image_tag = "v1.3.0"` - Specifies the version of the image to be used.
167
192
 
168
- When these settings are applied, they are passed through to the Docker and
169
- OpenShift service. `http_proxy_user` and `http_proxy_password` can be omitted in an
170
- unauthenticated proxy environment.
171
193
 
172
194
  == Development
173
195
 
174
196
  === Setup
175
197
 
176
198
  1. After cloning the repository, install the http://bundler.io/[Bundler]
177
- gem (Note, you need to specify 1.12.5. It won't work with the latest version of Bundler):
199
+ gem:
178
200
  +
179
201
  ---------------------
180
202
  $ gem install bundler -v 1.12.5
181
203
  ---------------------
204
+ +
205
+ NOTE: You need to specify version 1.12.5. It will not work with the latest version of Bundler.
206
+
182
207
 
183
208
  1. Then setup your project dependencies:
184
209
  +
@@ -187,7 +212,7 @@ $ bundle install
187
212
  ----------------
188
213
 
189
214
  1. The build is driven via `rake`. All build related tasks should be executed
190
- in the Bundler environment, e.g. `bundle exec rake clean`. You can get a
215
+ in the Bundler environment, for example `bundle exec rake clean`. You can get a
191
216
  list of available Rake tasks via:
192
217
  +
193
218
  ---------------------
@@ -303,6 +328,31 @@ _build/features_report.html_. They can be opened via:
303
328
  $ bundle exec rake features:open_report
304
329
  ---------------------------------------
305
330
 
331
+ === Asciidoc
332
+
333
+ The documentation of this plugin is written in http://asciidoctor.org[Asciidoc]. If you need some syntax help,
334
+ refer to the http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[AsciiDoc Syntax Quick Reference].
335
+
336
+ To build the documentation you can execute
337
+
338
+ ----
339
+ $ bundle exec rake html
340
+ ----
341
+
342
+ which will build the HTML documentation into the folder _build/html_.
343
+
344
+ The source code also contains a link:Guardfile[Guardfile] for the https://github.com/guard/guard[Guard] library.
345
+ You can execute
346
+
347
+ ----
348
+ $ bundle exec guard
349
+ ----
350
+
351
+ and your HTML documentation will be automatically updated on each change to an Asciidoc source file.
352
+ https://github.com/guard/guard-livereload[Live reload] is also enabled, so you just need to install the right
353
+ http://livereload.com/extensions/#installing-sections[LiveReload Safari/Chrome/Firefox extension] and your
354
+ browser will refresh the page each time you save a change to your Asciidoc files.
355
+
306
356
  == Getting involved
307
357
 
308
358
  We welcome your input. You can submit issues or pull requests with
data/Rakefile CHANGED
@@ -8,6 +8,7 @@ require 'fileutils'
8
8
  require 'yaml'
9
9
  require 'launchy'
10
10
  require 'date'
11
+ require 'asciidoctor'
11
12
 
12
13
  CLOBBER.include('pkg')
13
14
  CLEAN.include('build')
@@ -43,6 +44,14 @@ namespace :features do
43
44
  end
44
45
  end
45
46
 
47
+ desc 'Render Asciidoc into HTML'
48
+ adoc_files = Rake::FileList['**/*.adoc']
49
+ task html: adoc_files.ext('.html')
50
+ rule '.html' => '.adoc' do |t|
51
+ FileUtils.mkdir_p 'build/html'
52
+ Asciidoctor.convert_file t.source, to_dir: 'build/html'
53
+ end
54
+
46
55
  desc 'Download the required Vagrant boxes for the Cucumber tests'
47
56
  task get_boxes: :init do
48
57
  box_dir = File.join(File.dirname(__FILE__), BOX_DIR)
@@ -233,9 +242,9 @@ class NightlyCDKDownloader < DownloadTask
233
242
  end
234
243
 
235
244
  class PublicCDKDownloader < DownloadTask
236
- CDK_DOWNLOAD_URL = 'https://access.redhat.com/downloads/content/293/ver=2.1/rhel---7/2.1.0/x86_64/product-software'.freeze
237
- CDK_BOX_BASE_NAME = 'rhel-cdk-kubernetes-7.2-25.x86_64.vagrant'.freeze
238
- LATEST_VERSION = 'v. 2.1.0 for x86_64'.freeze
245
+ CDK_DOWNLOAD_URL = 'https://access.redhat.com/downloads/content/293/ver=2.2/rhel---7/2.2.0/x86_64/product-software'.freeze
246
+ CDK_BOX_BASE_NAME = 'rhel-cdk-kubernetes-7.2-29.x86_64.vagrant'.freeze
247
+ LATEST_VERSION = 'v. 2.2.0 for x86_64'.freeze
239
248
 
240
249
  def initialize(box_dir, provider)
241
250
  super(box_dir, provider)
@@ -22,7 +22,7 @@ Feature: Command output from various OpenShift related commands in ADB
22
22
  config.vm.provider('libvirt') { |v| v.memory = 3072 }
23
23
  config.vm.provider('virtualbox') { |v| v.memory = 3072 }
24
24
 
25
- config.servicemanager.services = 'docker, openshift'
25
+ config.servicemanager.services = 'openshift'
26
26
  end
27
27
  """
28
28
 
@@ -37,8 +37,7 @@ Feature: Command output from various OpenShift related commands in ADB
37
37
  And I successfully run `bundle exec vagrant service-manager status`
38
38
  Then stdout from "bundle exec vagrant service-manager status" should contain "openshift - running"
39
39
 
40
- When I sleep for 10 seconds
41
- And I successfully run `bundle exec vagrant service-manager env openshift`
40
+ When I successfully run `bundle exec vagrant service-manager env openshift`
42
41
  Then stdout from "bundle exec vagrant service-manager env openshift" should be evaluable in a shell
43
42
  And stdout from "bundle exec vagrant service-manager env openshift" should contain:
44
43
  """
@@ -61,14 +60,12 @@ Feature: Command output from various OpenShift related commands in ADB
61
60
  DOCKER_REGISTRY=hub.openshift.centos7-adb.<ip>.xip.io
62
61
  """
63
62
 
64
- When I sleep for 10 seconds
65
- And I successfully run `bundle exec vagrant service-manager install-cli openshift --cli-version 1.3.0`
63
+ When I successfully run `bundle exec vagrant service-manager install-cli openshift --cli-version 1.3.0`
66
64
  Then the exit status should be 0
67
65
  And the binary "oc" of service "openshift" should be installed with version "1.3.0"
68
66
  And stdout from "bundle exec vagrant service-manager install-cli openshift --cli-version 1.3.0" should be evaluable in a shell
69
67
 
70
- When I sleep for 10 seconds
71
- And I evaluate and run `bundle exec vagrant service-manager install-cli openshift --cli-version 1.3.0 --path #{ENV['VAGRANT_HOME']}/oc`
68
+ When I evaluate and run `bundle exec vagrant service-manager install-cli openshift --cli-version 1.3.0 --path #{ENV['VAGRANT_HOME']}/oc`
72
69
  Then the exit status should be 0
73
70
  And the binary should be installed in path "#{ENV['VAGRANT_HOME']}/oc"
74
71
  And stdout after evaluating and running "bundle exec vagrant service-manager install-cli openshift --cli-version 1.3.0 --path #{ENV['VAGRANT_HOME']}/oc" should be evaluable in a shell
@@ -1,7 +1,7 @@
1
1
  Feature: Command output from various OpenShift related commands in CDK
2
2
  service-manager should return the correct output from commands affecting OpenShift in CDK
3
3
 
4
- @openshift
4
+ @todo
5
5
  Scenario Outline: Boot and execute commands
6
6
  Given box is <box>
7
7
  And provider is <provider>
@@ -22,7 +22,7 @@ Feature: Command output from various OpenShift related commands in CDK
22
22
  config.vm.provider('libvirt') { |v| v.memory = 3072 }
23
23
  config.vm.provider('virtualbox') { |v| v.memory = 3072 }
24
24
 
25
- config.servicemanager.services = 'docker, openshift'
25
+ config.servicemanager.services = 'openshift'
26
26
  end
27
27
  """
28
28
 
@@ -32,8 +32,8 @@ Feature: Command output from various OpenShift related commands in CDK
32
32
  ==> default: Docker service configured successfully...
33
33
  ==> default: OpenShift service configured successfully...
34
34
  """
35
-
36
- When I successfully run `bundle exec vagrant service-manager status`
35
+
36
+ And I successfully run `bundle exec vagrant service-manager status`
37
37
  Then stdout from "bundle exec vagrant service-manager status" should contain "openshift - running"
38
38
 
39
39
  When I successfully run `bundle exec vagrant service-manager env openshift`
@@ -0,0 +1,298 @@
1
+ Feature: Command output from box command
2
+ service-manager should return the correct output from box commands
3
+
4
+ Scenario Outline: Boot and execute box commands
5
+ Given box is <box>
6
+ And provider is <provider>
7
+ And a file named "Vagrantfile" with:
8
+ """
9
+ begin
10
+ require 'vagrant-libvirt'
11
+ rescue LoadError
12
+ # NOOP
13
+ end
14
+
15
+ Vagrant.configure('2') do |config|
16
+ config.vm.box = '<box>'
17
+ config.vm.box_url = 'file://../../.boxes/<box>-<provider>.box'
18
+ config.vm.network :private_network, ip: '<ip>'
19
+ config.vm.synced_folder '.', '/vagrant', disabled: true
20
+ config.servicemanager.services = 'docker'
21
+ end
22
+ """
23
+
24
+ When I run `bundle exec vagrant up --provider <provider>`
25
+ Then the exit status should be 0
26
+ And stdout from "bundle exec vagrant up --provider <provider>" should contain:
27
+ """
28
+ ==> default: Docker service configured successfully...
29
+ """
30
+
31
+ ####################################################################################################################
32
+ # BOX command
33
+ ####################################################################################################################
34
+ When I run `bundle exec vagrant service-manager box`
35
+ Then the exit status should be 1
36
+ And stdout from "bundle exec vagrant service-manager box" should contain:
37
+ """
38
+ Usage: vagrant service-manager box <sub-command> [options]
39
+
40
+ Sub-Command:
41
+ version display version and release information about the running VM
42
+ ip display routable IP address of the running VM
43
+
44
+ Options:
45
+ --script-readable display information in a script readable format
46
+ -h, --help print this help
47
+ """
48
+
49
+ When I successfully run `bundle exec vagrant service-manager box --help`
50
+ Then the exit status should be 0
51
+ And stdout from "bundle exec vagrant service-manager box --help" should contain:
52
+ """
53
+ Usage: vagrant service-manager box <sub-command> [options]
54
+
55
+ Sub-Command:
56
+ version display version and release information about the running VM
57
+ ip display routable IP address of the running VM
58
+
59
+ Options:
60
+ --script-readable display information in a script readable format
61
+ -h, --help print this help
62
+
63
+ Examples:
64
+ vagrant service-manager box version
65
+ vagrant service-manager box version --script-readable
66
+ vagrant service-manager box ip
67
+ vagrant service-manager box ip --script-readable
68
+ """
69
+
70
+ When I successfully run `bundle exec vagrant service-manager box ip`
71
+ Then stdout from "bundle exec vagrant service-manager box ip" should contain "<ip>"
72
+
73
+ When I successfully run `bundle exec vagrant service-manager box ip --script-readable`
74
+ Then stdout from "bundle exec vagrant service-manager box ip --script-readable" should contain "IP=<ip>"
75
+ And stdout from "bundle exec vagrant service-manager box ip --script-readable" should be script readable
76
+
77
+ When I successfully run `bundle exec vagrant service-manager box version`
78
+ Then stdout from "bundle exec vagrant service-manager box version" should match /(Container Development Kit \(CDK\) \d.\d.?\d?|Atomic Developer Bundle \(ADB\) \d.\d.?\d?)/
79
+
80
+ When I successfully run `bundle exec vagrant service-manager box version --script-readable`
81
+ Then stdout from "bundle exec vagrant service-manager box version --script-readable" should match /(Container Development Kit \(CDK\)|Atomic Developer Bundle \(ADB\))/
82
+ And stdout from "bundle exec vagrant service-manager box version --script-readable" should match /VARIANT_ID="<box>"/
83
+ And stdout from "bundle exec vagrant service-manager box version --script-readable" should match /VARIANT_VERSION="\d.\d.?\d?"/
84
+ And stdout from "bundle exec vagrant service-manager box version --script-readable" should be script readable
85
+
86
+ ####################################################################################################################
87
+ # ENV command
88
+ ####################################################################################################################
89
+ When I successfully run `bundle exec vagrant service-manager env --help`
90
+ Then the exit status should be 0
91
+ And stdout from "bundle exec vagrant service-manager env --help" should contain:
92
+ """
93
+ Usage: vagrant service-manager env [object] [options]
94
+
95
+ Objects:
96
+ docker display information and environment variables for docker
97
+ openshift display information and environment variables for openshift
98
+ kubernetes display information and environment variables for kubernetes
99
+
100
+ If OBJECT is omitted, display the information for all active services
101
+
102
+ Options:
103
+ --script-readable display information in a script readable format.
104
+ -h, --help print this help
105
+ """
106
+
107
+ When I successfully run `bundle exec vagrant service-manager env`
108
+ Then stdout from "bundle exec vagrant service-manager env" should be evaluable in a shell
109
+
110
+ When I successfully run `bundle exec vagrant service-manager env --script-readable`
111
+ Then stdout from "bundle exec vagrant service-manager env --script-readable" should be script readable
112
+
113
+ When I successfully run `bundle exec vagrant service-manager env docker`
114
+ Then stdout from "bundle exec vagrant service-manager env docker" should be evaluable in a shell
115
+ And stdout from "bundle exec vagrant service-manager env docker" should contain "export DOCKER_HOST=tcp://<ip>:2376"
116
+ And stdout from "bundle exec vagrant service-manager env docker" should match /export DOCKER_CERT_PATH=.*\/.vagrant\/machines\/cdk\/virtualbox\/docker/
117
+ And stdout from "bundle exec vagrant service-manager env docker" should contain "export DOCKER_TLS_VERIFY=1"
118
+ And stdout from "bundle exec vagrant service-manager env docker" should match /export DOCKER_API_VERSION=1.2\d/
119
+ And stdout from "bundle exec vagrant service-manager env docker" should match /# eval "\$\(vagrant service-manager env docker\)"/
120
+
121
+ When I successfully run `bundle exec vagrant service-manager env docker --script-readable`
122
+ Then stdout from "bundle exec vagrant service-manager env docker --script-readable" should be script readable
123
+
124
+ When I run `bundle exec vagrant service-manager env openshift`
125
+ Then the exit status should be 126
126
+ And stderr from "bundle exec vagrant service-manager env openshift" should contain:
127
+ """
128
+ # OpenShift service is not running in the vagrant box.
129
+ """
130
+
131
+ When I successfully run `bundle exec vagrant service-manager env --debug`
132
+ Then stdout from "bundle exec vagrant service-manager env --debug" should match /DEBUG command: [ service-manager: env ]/
133
+
134
+
135
+ ####################################################################################################################
136
+ # INSTALL-CLI command
137
+ ####################################################################################################################
138
+ When I successfully run `bundle exec vagrant service-manager install-cli --help`
139
+ Then the exit status should be 0
140
+ And stdout from "bundle exec vagrant service-manager install-cli --help" should contain:
141
+ """
142
+ Install the client binary for the specified service
143
+
144
+ Usage: vagrant service-manager install-cli [service] [options]
145
+
146
+ Service:
147
+ A supported service. For example: docker, kubernetes or openshift.
148
+
149
+ Options:
150
+ -h, --help print this help
151
+ --cli-version binary version to install
152
+ --path absolute or relative path where to install the binary
153
+
154
+ Example:
155
+ vagrant service-manager install-cli docker
156
+ """
157
+
158
+ When I run `bundle exec vagrant service-manager install-cli`
159
+ Then the exit status should be 126
160
+ And stdout from "bundle exec vagrant service-manager install-cli" should match /Service name missing/
161
+
162
+ When I run `bundle exec vagrant service-manager install-cli docker --cli-version 111.222.333`
163
+ Then the exit status should be 126
164
+
165
+ When I run `bundle exec vagrant service-manager install-cli docker`
166
+ Then the exit status should be 0
167
+ And the binary "docker" should be installed
168
+ And the stderr should not contain anything
169
+
170
+ When I run `bundle exec vagrant service-manager install-cli docker --cli-version 1.12.1`
171
+ Then the exit status should be 0
172
+ And the binary "docker" of service "docker" should be installed with version "1.12.1"
173
+ And the stderr should not contain anything
174
+
175
+ When I evaluate and run `bundle exec vagrant service-manager install-cli docker --path #{ENV['VAGRANT_HOME']}/docker`
176
+ Then the exit status should be 0
177
+ And the binary should be installed in path "#{ENV['VAGRANT_HOME']}/docker"
178
+ And the stderr should not contain anything
179
+
180
+ When I evaluate and run `bundle exec vagrant service-manager install-cli docker --path #{ENV['VAGRANT_HOME']}/unknown_dir/docker`
181
+ Then the exit status should be 126
182
+ And stderr from evaluating and running "bundle exec vagrant service-manager install-cli docker --path #{ENV['VAGRANT_HOME']}/unknown_dir/docker" should match /Directory path #{ENV['VAGRANT_HOME']}/unknown_dir is invalid or doesn't exist/
183
+
184
+ When I run `bundle exec vagrant service-manager install-cli docker --path /foo/bar/docker`
185
+ Then the exit status should be 126
186
+ And stderr from evaluating and running "bundle exec vagrant service-manager install-cli docker --path /foo/bar/docker" should match /Permission denied @ dir_s_mkdir - /foo/
187
+
188
+ ####################################################################################################################
189
+ # START/STOP/STATUS/RESTART command
190
+ ####################################################################################################################
191
+ When I successfully run `bundle exec vagrant service-manager status --help`
192
+ Then the exit status should be 0
193
+ And stdout from "bundle exec vagrant service-manager status --help" should contain:
194
+ """
195
+ Usage: vagrant service-manager status [service] [options]
196
+
197
+ Options:
198
+ -h, --help print this help
199
+
200
+ If a service is provided, only that service is reported.
201
+ If no service is provided only supported orchestrators are reported.
202
+
203
+ Example:
204
+ vagrant service-manager status openshift
205
+ """
206
+
207
+ And I successfully run `bundle exec vagrant service-manager stop --help`
208
+ Then the exit status should be 0
209
+ And stdout from "bundle exec vagrant service-manager stop --help" should contain:
210
+ """
211
+ stops the service
212
+
213
+ Usage: vagrant service-manager stop <service> [options]
214
+
215
+ Service:
216
+ A service provided by sccli. For example:
217
+ docker, kubernetes, openshift etc
218
+
219
+ Options:
220
+ -h, --help print this help
221
+
222
+ Examples:
223
+ vagrant service-manager stop docker
224
+ """
225
+
226
+ And I successfully run `bundle exec vagrant service-manager start --help`
227
+ Then the exit status should be 0
228
+ And stdout from "bundle exec vagrant service-manager start --help" should contain:
229
+ """
230
+ starts the service
231
+
232
+ Usage: vagrant service-manager start <service> [options]
233
+
234
+ Service:
235
+ A service provided by sccli. For example:
236
+ docker, kubernetes, openshift etc
237
+
238
+ Options:
239
+ -h, --help print this help
240
+
241
+ Examples:
242
+ vagrant service-manager start docker
243
+ """
244
+
245
+ And I successfully run `bundle exec vagrant service-manager restart --help`
246
+ Then the exit status should be 0
247
+ And stdout from "bundle exec vagrant service-manager restart --help" should contain:
248
+ """
249
+ restarts the service
250
+
251
+ Usage: vagrant service-manager restart <service> [options]
252
+
253
+ Service:
254
+ A service provided by sccli. For example:
255
+ docker, kubernetes, openshift etc
256
+
257
+ Options:
258
+ -h, --help print this help
259
+
260
+ Examples:
261
+ vagrant service-manager restart docker
262
+ """
263
+
264
+ When I successfully run `bundle exec vagrant service-manager status`
265
+ Then stdout from "bundle exec vagrant service-manager status" should contain "docker - running"
266
+ Then stdout from "bundle exec vagrant service-manager status" should contain "openshift - stopped"
267
+ Then stdout from "bundle exec vagrant service-manager status" should contain "kubernetes - stopped"
268
+
269
+ When I successfully run `bundle exec vagrant service-manager status docker`
270
+ Then stdout from "bundle exec vagrant service-manager status" should contain "docker - running"
271
+
272
+ When I run `bundle exec vagrant service-manager status abcd`
273
+ Then the exit status should be 126
274
+ And stderr from "bundle exec vagrant service-manager status abcd" should contain:
275
+ """
276
+ Unknown service 'abcd'.
277
+ Supported services are docker, openshift, kubernetes etc.
278
+ """
279
+
280
+ When the "docker" service is running
281
+ And I successfully run `bundle exec vagrant service-manager stop docker`
282
+ Then the service "docker" should be stopped
283
+
284
+ When the "docker" service is not running
285
+ And I successfully run `bundle exec vagrant service-manager start docker`
286
+ Then the service "docker" should be running
287
+
288
+ When the "docker" service is running
289
+ And I successfully run `bundle exec vagrant service-manager restart docker`
290
+ Then the service "docker" should be running
291
+ And have a new pid for "docker" service
292
+
293
+ Examples:
294
+ | box | provider | ip |
295
+ | cdk | virtualbox | 10.10.10.42 |
296
+ | adb | virtualbox | 10.10.10.42 |
297
+ | cdk | libvirt | 10.10.10.42 |
298
+ | adb | libvirt | 10.10.10.42 |