vagrant-service-manager 1.1.0 → 1.2.0

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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/ansible/roles/centos/tasks/main.yml +3 -2
  3. data/.ci/jenkins-execute-script.py +6 -4
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +13 -0
  6. data/.rubocop_todo.yml +55 -0
  7. data/CHANGELOG.md +22 -1
  8. data/CONTRIBUTING.adoc +6 -6
  9. data/Gemfile +12 -4
  10. data/README.adoc +104 -70
  11. data/Rakefile +235 -66
  12. data/features/box-command.feature +26 -1
  13. data/features/env-command.feature +20 -3
  14. data/features/help-command.feature +4 -1
  15. data/features/install-cli.feature +58 -0
  16. data/features/openshift.feature +2 -1
  17. data/features/service-operation.feature +76 -3
  18. data/features/support/env.rb +26 -10
  19. data/lib/vagrant-service-manager.rb +7 -2
  20. data/lib/vagrant-service-manager/action/setup_network.rb +0 -2
  21. data/lib/vagrant-service-manager/archive_handlers/tar_handler.rb +26 -0
  22. data/lib/vagrant-service-manager/archive_handlers/zip_handler.rb +25 -0
  23. data/lib/vagrant-service-manager/binary_handlers/adb_binary_handler.rb +55 -0
  24. data/lib/vagrant-service-manager/binary_handlers/adb_docker_binary_handler.rb +38 -0
  25. data/lib/vagrant-service-manager/binary_handlers/adb_openshift_binary_handler.rb +49 -0
  26. data/lib/vagrant-service-manager/binary_handlers/binary_handler.rb +119 -0
  27. data/lib/vagrant-service-manager/binary_handlers/cdk_binary_handler.rb +33 -0
  28. data/lib/vagrant-service-manager/binary_handlers/cdk_docker_binary_handler.rb +9 -0
  29. data/lib/vagrant-service-manager/binary_handlers/cdk_openshift_binary_handler.rb +9 -0
  30. data/lib/vagrant-service-manager/command.rb +90 -15
  31. data/lib/vagrant-service-manager/config.rb +8 -8
  32. data/lib/vagrant-service-manager/installer.rb +49 -0
  33. data/lib/vagrant-service-manager/plugin.rb +2 -2
  34. data/lib/vagrant-service-manager/plugin_logger.rb +2 -2
  35. data/lib/vagrant-service-manager/plugin_util.rb +29 -6
  36. data/lib/vagrant-service-manager/service.rb +4 -3
  37. data/lib/vagrant-service-manager/service_base.rb +11 -0
  38. data/lib/vagrant-service-manager/services/docker.rb +29 -29
  39. data/lib/vagrant-service-manager/services/kubernetes.rb +7 -7
  40. data/lib/vagrant-service-manager/services/open_shift.rb +42 -41
  41. data/lib/vagrant-service-manager/version.rb +1 -1
  42. data/locales/en.yml +42 -4
  43. data/plugins/guests/redhat/cap/machine_ip.rb +2 -1
  44. data/plugins/guests/redhat/plugin.rb +1 -1
  45. data/plugins/hosts/darwin/cap/os_arch.rb +11 -0
  46. data/plugins/hosts/darwin/plugin.rb +13 -0
  47. data/plugins/hosts/linux/cap/os_arch.rb +11 -0
  48. data/plugins/hosts/linux/plugin.rb +13 -0
  49. data/plugins/hosts/windows/cap/os_arch.rb +18 -0
  50. data/plugins/hosts/windows/plugin.rb +13 -0
  51. data/test/test_data/docker-1.10.0.tar.gz +0 -0
  52. data/test/test_data/docker-1.11.0.tgz +0 -0
  53. data/test/test_data/docker-1.9.1.zip +0 -0
  54. data/test/test_data/openshift-origin-client-tools-v1.2.0-2e62fab-linux-64bit.tar.gz +0 -0
  55. data/test/test_data/openshift-origin-client-tools-v1.2.0-2e62fab-linux-64bit.zip +0 -0
  56. data/test/test_data/openshift-origin-client-tools-v1.2.0-2e62fab-mac.zip +0 -0
  57. data/test/test_helper.rb +121 -0
  58. data/test/vagrant-service-manager/archive_handler_test.rb +49 -0
  59. data/test/vagrant-service-manager/binary_handlers/adb_docker_binary_handler_test.rb +111 -0
  60. data/test/vagrant-service-manager/binary_handlers/adb_openshift_binary_handler_test.rb +107 -0
  61. data/test/vagrant-service-manager/installer_test.rb +96 -0
  62. data/vagrant-service-manager.gemspec +4 -3
  63. metadata +43 -16
  64. data/TODO +0 -24
  65. data/Vagrantfile +0 -29
  66. data/lib/vagrant-service-manager/os.rb +0 -22
  67. data/vagrant-service-manager.spec +0 -215
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a07e2bb53c36d17f60301f92f65614e1ad0a0a53
4
- data.tar.gz: 74b02d8dc2bdcdc63097538aca9de66de0169f04
3
+ metadata.gz: 85d5930d50032ff227fe63924f9e96e3f43877d0
4
+ data.tar.gz: 1960b2b1b233f3154b5c80961e56f9a8ad94a60b
5
5
  SHA512:
6
- metadata.gz: 6992490bc94977e327eab53a6feda53715e3df022a18e443340f7be9601d560ab257a4941f2982eee52672609a59c517f156c96f58316ce5eef74185fbb66351
7
- data.tar.gz: 25d843b9d45177b669eb8764c0e95366b83576bee53e03fceedc7deaf0c6af37d1da59e0f5b40091cf54fe8e6737f7b305f777349b0a3deaeac51708adbcb6cc
6
+ metadata.gz: c4a8326b93fbebe49b33f562bf569af44a1136f3d21cb33a7bef8ff0d14ff7e85eb73a160bd419c446c6bc7130860a24f26075176e2767186f1661d385897d61
7
+ data.tar.gz: 58fb6c65fad2cb6d46295d65f3322fb193a003ed073873e388563ed2798af29bb1f8a40a5390580db2bf49ce95a546f0b21e0eaeddb32be8c56f0e53176e7795
@@ -19,8 +19,9 @@
19
19
  - gcc
20
20
  - kernel-devel
21
21
 
22
- - name: Install VirtualBox
23
- yum: name=http://download.virtualbox.org/virtualbox/rpm/rhel/7/x86_64/VirtualBox-5.0-5.0.8_103449_el7-1.x86_64.rpm state=present
22
+ # TODO enable when we test against VirtualBox as well
23
+ #- name: Install VirtualBox
24
+ # yum: name=http://download.virtualbox.org/virtualbox/rpm/rhel/7/x86_64/VirtualBox-5.0-5.0.8_103449_el7-1.x86_64.rpm state=present
24
25
 
25
26
  - name: start-enable-libvirtd
26
27
  service: name=libvirtd state=started enabled=yes
@@ -64,15 +64,17 @@ for host in data['hosts']:
64
64
 
65
65
  # setup the environment
66
66
  setup_cmd = 'cd vagrant-service-manager && '
67
- setup_cmd += 'gem install bundler -v 1.10.0 && '
67
+ setup_cmd += 'gem install bundler && '
68
68
  setup_cmd += 'bundle install --no-color'
69
69
  execute_on_host(host, setup_cmd, "Unable to setup Ruby environment")
70
70
 
71
71
  # run build and features
72
72
  build_cmd = 'cd vagrant-service-manager && '
73
- build_cmd += 'bundle exec rake build && '
74
- build_cmd += 'bundle exec rake get_adb[\'libvirt\'] && '
75
- build_cmd += 'bundle exec rake features CUCUMBER_OPTS=\'-p ci\' PROVIDER=libvirt'
73
+ build_cmd += 'bundle exec rake rubocop && '
74
+ build_cmd += 'bundle exec rake test && '
75
+ build_cmd += 'bundle exec rake features CUCUMBER_OPTS=\'-p ci\' PROVIDER=libvirt BOX=adb,cdk && '
76
+ build_cmd += 'bundle exec rake build'
77
+
76
78
  execute_on_host(host, build_cmd, "Tests failures")
77
79
 
78
80
  done_nodes_url = "%s/Node/done?key=%s&sside=%s" % (url_base, api_key, data['ssid'])
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ Gemfile.lock
15
15
  tmp
16
16
  build
17
17
  pkg
18
+ .boxes
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ Exclude:
5
+ - 'build/**/*'
6
+
7
+ # Offense count: 57
8
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
9
+ # URISchemes: http, https
10
+ Metrics/LineLength:
11
+ Max: 120
12
+ Exclude:
13
+ - 'Rakefile'
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,55 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-07-09 23:34:13 +0200 using RuboCop version 0.41.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 3
10
+ Lint/AmbiguousRegexpLiteral:
11
+ Exclude:
12
+ - 'features/support/env.rb'
13
+ - 'test/vagrant-service-manager/binary_handlers/adb_openshift_binary_handler_test.rb'
14
+
15
+ # Offense count: 1
16
+ Lint/HandleExceptions:
17
+ Exclude:
18
+ - 'lib/vagrant-service-manager/service.rb'
19
+
20
+ # Offense count: 13
21
+ Metrics/AbcSize:
22
+ Max: 53
23
+
24
+ # Offense count: 1
25
+ # Configuration parameters: CountComments.
26
+ Metrics/ClassLength:
27
+ Max: 209
28
+
29
+ # Offense count: 1
30
+ Metrics/CyclomaticComplexity:
31
+ Max: 28
32
+
33
+ # Offense count: 13
34
+ # Configuration parameters: CountComments.
35
+ Metrics/MethodLength:
36
+ Max: 96
37
+
38
+ # Offense count: 1
39
+ # Configuration parameters: CountComments.
40
+ Metrics/ModuleLength:
41
+ Max: 111
42
+
43
+ # Offense count: 1
44
+ Metrics/PerceivedComplexity:
45
+ Max: 13
46
+
47
+ # Offense count: 38
48
+ Style/Documentation:
49
+ Enabled: false
50
+
51
+ # Offense count: 1
52
+ # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
53
+ Style/FileName:
54
+ Exclude:
55
+ - 'lib/vagrant-service-manager.rb'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## v1.2.0 Jul 14, 2016
4
+
5
+ - Issue #331: Update expectation for DOCKER_API_VERSION in cucumber test
6
+ - Issue #323: Add note about default download location of client binaries in README documentation
7
+ - Issue #321: `install-cli docker` errors "Download URL is not accessible" blocker bug
8
+ - Issue #312: install-cli commands throws an error when trying to install Kubernetes CLI bug
9
+ - Issue #291: Update doc example for env to reflect new changes documentation
10
+ - Issue #289: Remove Vagrantfile in root of repository
11
+ - Issue #287: Remove unnecessary TODO file from repo
12
+ - Issue #285: Use native methods to detect host platform instead of OS module
13
+ - Issue #282: Add build status to README build
14
+ - Issue #281: The ADB/CDK download rake tasks should be made proper Rake tasks build enhancement
15
+ - Issue #278: Missing acceptance tests for command like status, service operations test
16
+ - Issue #275: Typo in `vagrant service-manager env --help` command output text bug
17
+ - Issue #270: DOCKER_API_VERSION not set properly on Windows bug
18
+ - Issue #262: Update CI setup configuration
19
+ - Issue #252: Cosmetic bug: vagrant service-manager box ip --script-readable
20
+ - Issue #207: Remove vagrant-service-manager.spec and stop publishing gem as rpm
21
+ - Issue #196: Introduce unit test harness test
22
+ - Issue #93: Implement style guide based test using rubocop test
23
+ - Issue #90: Add install-cli command enhancement focus:devex
24
+ - Issue #20: --force should force redownloading the TLS certificates documentation
4
25
 
5
26
  ## v1.1.0 Jun 08, 2016
6
27
  - Updated README to make Installation Instructions clearer @bexelbie
data/CONTRIBUTING.adoc CHANGED
@@ -49,7 +49,7 @@ using the issue key you are working on. If there is not already an issue
49
49
  covering the work you want to do, create one (see
50
50
  link:#submitting-issues[submitting issues]). Assuming for example you
51
51
  will be working from the master branch and working on the GitHub issue
52
- 123 : `git checkout -b issue-123 master`
52
+ 123 : `git checkout -b fix-123 master`
53
53
 
54
54
  === Code
55
55
 
@@ -59,8 +59,8 @@ section in the link:README.md[README] to get started.
59
59
  === Commit
60
60
 
61
61
  * Make commits of logical units.
62
- * Be sure to use the GitHub issue key in the commit message, eg
63
- `Issue #123 ...`.
62
+ * Be sure to use the GitHub issue key in the commit message, eg `Fix #123 ...`.
63
+ * Make sure your code conforms to the coding style
64
64
  * Make sure you have added the necessary tests for your changes.
65
65
  * Make sure you have added appropriate documentation updates.
66
66
  * Run _all_ the tests to assure nothing else was accidentally broken.
@@ -85,10 +85,10 @@ example work-flow assuming issue 123 from above:
85
85
 
86
86
  -------------------------------------------------------------------------
87
87
  # Create a local branch for the pull request
88
- $ git checkout -b issue-123 master
88
+ $ git checkout -b fix-123 master
89
89
 
90
90
  # Pull the changes
91
- $ git pull <remote of the pull request> issue-123
91
+ $ git pull <remote of the pull request> fix-123
92
92
 
93
93
  # If necessary rebase changes on master to ensure we have a fast forward.
94
94
  $ git rebase -i master
@@ -97,7 +97,7 @@ $ git rebase -i master
97
97
 
98
98
  # Merge changes into master
99
99
  $ git checkout master
100
- $ git merge issue-123
100
+ $ git merge fix-123
101
101
 
102
102
  # Push to origin
103
103
  $ git push origin master
data/Gemfile CHANGED
@@ -3,16 +3,24 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
7
- gem 'rake'
8
- gem 'vagrant-libvirt' if RUBY_PLATFORM =~ /linux/i
9
- gem 'fog-libvirt', '0.0.3' if RUBY_PLATFORM =~ /linux/i # https://github.com/pradels/vagrant-libvirt/issues/568
6
+ gem 'vagrant',
7
+ git: 'git://github.com/mitchellh/vagrant.git',
8
+ ref: 'v1.8.4'
9
+ gem 'vagrant-libvirt' if RUBY_PLATFORM =~ /linux/i
10
+ gem 'fog-libvirt', '0.0.3' if RUBY_PLATFORM =~ /linux/i # https://github.com/pradels/vagrant-libvirt/issues/568
10
11
  gem 'mechanize'
11
12
  gem 'json'
12
13
  gem 'cucumber', '~> 2.1'
13
14
  gem 'aruba', '~> 0.13'
14
15
  gem 'komenda', '~> 0.1.6'
15
16
  gem 'launchy'
17
+ gem 'rake', '10.4.2'
18
+ gem 'rubocop'
19
+ end
20
+
21
+ group :test do
22
+ gem 'minitest'
23
+ gem 'mocha'
16
24
  end
17
25
 
18
26
  group :plugins do
data/README.adoc CHANGED
@@ -7,8 +7,8 @@ easier access to the features and services provided by the
7
7
  https://github.com/projectatomic/adb-atomic-developer-bundle[Atomic
8
8
  Developer Bundle (ADB)]. It provides setup information, including
9
9
  environment variables and certificates, required to access services
10
- provided by the ADB and is a must have for most ADB users.
11
-
10
+ provided by the ADB and is a must have for most ADB users. +
11
+ +
12
12
  This plugin makes it easier to use the ADB with host-based tools such as
13
13
  Eclipse and the docker and kubernetes CLI commands. Details on how to
14
14
  use ADB with this plugin can be found in the
@@ -19,15 +19,15 @@ Documentation].
19
19
  toc::[]
20
20
  '''
21
21
 
22
- == Installation
22
+ == Status
23
23
 
24
- The plugin is distributed as both a Ruby Gem and via RPM using the
25
- Fedora COPR system.
24
+ [[img-build-status]]
25
+ image::https://ci.centos.org/buildStatus/icon?job=vagrant-service-manager[link="https://ci.centos.org/job/vagrant-service-manager"]
26
26
 
27
- === Installing from a RubyGems
27
+ == Installation
28
28
 
29
- The vagrant-service-manager
30
- https://rubygems.org/gems/vagrant-service-manager[gem] is available on
29
+ The vagrant-service-manager plugin is distributed as a Ruby Gem.
30
+ The https://rubygems.org/gems/vagrant-service-manager[gem] is available on
31
31
  https://rubygems.org[RubyGems] and can be installed via the standard
32
32
  Vagrant plugin installation method:
33
33
 
@@ -35,17 +35,6 @@ Vagrant plugin installation method:
35
35
  $ vagrant plugin install vagrant-service-manager
36
36
  ------------------------------------------------
37
37
 
38
- === Installing from RPM
39
-
40
- The
41
- https://copr.fedorainfracloud.org/coprs/nshaikh/vagrant-service-manager/builds/[Copr
42
- build] is accessible via the standard COPR access/install method:
43
-
44
- ----------------------------------------------------------------------------------
45
- $ dnf copr enable nshaikh/vagrant-service-manager
46
- $ dnf --enablerepo=nshaikh-vagrant-service-manager install vagrant-service-manager
47
- ----------------------------------------------------------------------------------
48
-
49
38
  == Usage
50
39
 
51
40
  === Example execution of the plugin
@@ -55,7 +44,7 @@ $ dnf --enablerepo=nshaikh-vagrant-service-manager install vagrant-service-manag
55
44
  ----------------------------------------------
56
45
  vagrant plugin install vagrant-service-manager
57
46
  ----------------------------------------------
58
- 2. Download the relevant Vagrantfile for your
47
+ 1. Download the relevant Vagrantfile for your
59
48
  https://github.com/projectatomic/adb-atomic-developer-bundle[ADB]
60
49
  vagrant box, from the
61
50
  https://github.com/projectatomic/adb-atomic-developer-bundle/tree/master/components/centos[repository].
@@ -63,12 +52,12 @@ For further details on the usage of custom Vagrantfiles designed for
63
52
  specific use cases, refer to the
64
53
  https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/using.rst[Usage
65
54
  Documentation].
66
- 3. Start the ADB vagrant box using `vagrant up`. For detailed
55
+ 1. Start the ADB vagrant box using `vagrant up`. For detailed
67
56
  instructions consult the
68
57
  https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/installing.rst[Installation
69
58
  Documentation].
70
59
  +
71
- *Note:* When the vagrant-service-manager plugin is loaded and a box is
60
+ *Note:* When the vagrant-service-manager plugin is loaded and an ADB box is
72
61
  started using the VirtualBox provider, the user needs to add a routable
73
62
  non NAT network interface declaration in the Vagrantfile. If the user
74
63
  does not provide a network declaration in the Vagrantfile, a private
@@ -80,10 +69,11 @@ DHCP network is added by default and a warning is displayed.
80
69
  $ vagrant service-manager env docker
81
70
  # Set the following environment variables to enable access to the
82
71
  # docker daemon running inside of the vagrant virtual machine:
83
- export DOCKER_HOST=tcp://172.28.128.4:2376
72
+ export DOCKER_HOST=tcp://172.28.128.182:2376
84
73
  export DOCKER_CERT_PATH=/foo/bar/.vagrant/machines/default/virtualbox/docker
85
74
  export DOCKER_TLS_VERIFY=1
86
- export DOCKER_API_VERSION=1.21
75
+ export DOCKER_API_VERSION=1.20
76
+
87
77
  # run following command to configure your shell:
88
78
  # eval "$(vagrant service-manager env docker)"
89
79
  ----------------------------------------------------------------------------
@@ -100,55 +90,63 @@ will also re-download the certificates onto the host machine.
100
90
  The following section lists the available commands for the plugin and
101
91
  their explanation:
102
92
 
93
+ 1. `vagrant service-manager [command] [--help | -h]`
94
+ +
95
+ Displays the possible commands, options and other relevant information
96
+ for the vagrant-service-manager plugin. If a `command` is specified,
97
+ only the help relevant to that command is displayed.
98
+
103
99
  1. `vagrant service-manager env [service] [--script-readable]`
104
100
  +
105
101
  Displays connection information for all active services in the box in a
106
- manner that can be evaluated in a shell. If a `service` is specified,
107
- only the information for that service is displayed. When
108
- `--script-readable` is specified the output is in `key=value` format.
109
- The supported services are: Docker; OpenShift.
110
-
111
- 1. `vagrant service-manager box [command]`
102
+ manner that can be evaluated in a shell. +
103
+ If a `service` is specified, only the information for that service is displayed.
104
+ The supported services are: Docker, OpenShift. +
105
+ When `--script-readable` is specified the output is in `key=value` format. +
106
+ In the case of the _docker_ service, the required TLS certificates for securing the Docker
107
+ communication will be regenerated and copied to the host as part of the command execution.
108
+ If existing certificates are found to be invalid, they get regenerated.
109
+
110
+ 1. `vagrant service-manager box [command] [--script-readable]`
112
111
  +
113
112
  Displays box related information like release version, IP etc.
114
-
115
- 1. `vagrant service-manager box version [--script-readable]`
116
113
  +
117
- Displays the version and release information of the running VM. When
118
- `--script-readable` is specified the output is in `key=value` format.
114
+ The possible options for `command` are:
119
115
 
120
- 1. `vagrant service-manager box ip`
116
+ * `version`: Displays the version and release information of the running VM.
117
+ * `ip`: Displays the routable IP address of the running VM.
121
118
  +
122
- Displays the routable IP address of the running VM.
119
+ When `--script-readable` is specified the output is in `key=value` format.
123
120
 
124
- 1. `vagrant service-manager status [service]`
121
+ 1. `vagrant service-manager [operation] [service]`
122
+ +
123
+ Manages the life cycle of a service.
125
124
  +
126
- Lists services and their running state. If a `service` is specified only
125
+ The possible options for `operation` are:
126
+
127
+ * `status`: Lists services and their running state. If a `service` is specified only
127
128
  the status of that service is displayed. If no service is provided then
128
129
  only supported orchestrators are reported.
129
-
130
- 1. `vagrant service-manager [operation] [service]`
130
+ * `start`: Start the given service in the box.
131
+ * `stop`: Stop the given service in the box.
132
+ * `restart`: Restart the given service in the box.
131
133
  +
132
- where `operation` could be:
134
+ The supported options for `service` are `docker` and `openshift`.
133
135
 
134
- * `restart` : Restart the given service in the box.
135
- * `start` : Start the given service in the box.
136
- * `stop` : Stop the given service in the box.
136
+ 1. `vagrant service-manager install-cli [service]`
137
137
  +
138
- and `service` could be `docker`, `openshift`, `kubernetes` etc.
139
-
140
- 1. `vagrant service-manager [command] [--help | -h]`
138
+ Install the client binary for the specified `service`. Binaries are per default downloaded to
139
+ `$VAGRANT_HOME/data/service-manager/bin/<service>/<cli-version>`, where `$VAGRANT_HOME` defaults to
140
+ `.vagrant.d` in your home directory.
141
141
  +
142
- Displays the possible commands, options and other relevant information
143
- for the vagrant-service-manager plugin. If a `command` is specified,
144
- only the help relevant to that command is displayed.
142
+ The supported options for `service` are `docker` and `openshift`.
145
143
 
146
144
  [[debug-flag]]
147
145
  ==== Debug Flag
148
146
 
149
147
  Append `--debug` flag to enable debug mode.
150
148
 
151
- _Note_: Debug output from `vagrant-service-manager` is prepended with
149
+ *Note:* Debug output from `vagrant-service-manager` is prepended with
152
150
  the following string:
153
151
 
154
152
  `DEBUG command: [ service-manager: <command name / log message> ]`
@@ -182,27 +180,56 @@ have IPv4 addresses, the address on eth2 is used.
182
180
 
183
181
  === Setup
184
182
 
185
- After cloning the repository, install the http://bundler.io/[Bundler]
183
+ 1. After cloning the repository, install the http://bundler.io/[Bundler]
186
184
  gem:
187
-
185
+ +
188
186
  ---------------------
189
187
  $ gem install bundler
190
188
  ---------------------
191
189
 
192
- Then setup your project dependencies:
193
-
190
+ 1. Then setup your project dependencies:
191
+ +
194
192
  ----------------
195
193
  $ bundle install
196
194
  ----------------
197
195
 
198
- The build is driven via rake. All build related tash should be executed
196
+ 1. The build is driven via `rake`. All build related tasks should be executed
199
197
  in the Bundler environment, e.g. `bundle exec rake clean`. You can get a
200
198
  list of available Rake tasks via:
201
-
199
+ +
202
200
  ---------------------
203
201
  $ bundle exec rake -T
204
202
  ---------------------
205
203
 
204
+ === Code style
205
+
206
+ As most other open-source projects, vagrant-service-manager has a set of conventions
207
+ about how to write code for it. It follows the
208
+ https://github.com/bbatsov/ruby-style-guide[Ruby Style Guide].
209
+
210
+ You can verify that your changes adhere to this style using the http://batsov.com/rubocop[RuboCop] Rake task:
211
+
212
+ --------------------------
213
+ $ bundle exec rake rubocop
214
+ --------------------------
215
+
216
+ === Unit tests
217
+
218
+ The source contains a set of http://ruby-doc.org/stdlib-2.0.0/libdoc/minitest/rdoc/MiniTest.html[Minitest]
219
+ unit tests. They can be run as follows:
220
+
221
+ To run the entire test suite:
222
+
223
+ ------------------------
224
+ $ bundle exec rake test
225
+ ------------------------
226
+
227
+ To run a single test:
228
+
229
+ -------------------------------------------------
230
+ $ bundle exec rake test TEST=<path to test file>
231
+ -------------------------------------------------
232
+
206
233
  === Acceptance tests
207
234
 
208
235
  The source also contains a set of https://cucumber.io/[Cucumber]
@@ -212,26 +239,33 @@ acceptance tests. They can be run via:
212
239
  $ bundle exec rake features
213
240
  ---------------------------
214
241
 
215
- _NOTE_: Only Linux OS is supported at present.
216
-
217
- The tests assume that the ADB and CDK box files are available under
218
- _build/boxes/adb-<provider>.box_ resp
219
- _build/boxes/cdk-<provider>.box_. You can either copy the box files
220
- manually or use the _get_adb_ resp. _get_cdk_ Rake tasks.
242
+ *Note:* This Cucumber tests do not run on Windows, pending resolution of
243
+ https://github.com/projectatomic/vagrant-service-manager/issues/213[Issue #213].
221
244
 
222
- Per default only the scenarios for ADB in combination with the
223
- VirtualBox provider are run. However, you can also run against CDK
245
+ Per default, only the scenarios for ADB in combination with the
246
+ VirtualBox provider are run. However, you can also run the tests against CDK
224
247
  and/or use the Libvirt provider using the environment variables _BOX_
225
- resp _PROVIDER_:
248
+ and _PROVIDER_ respectively:
226
249
 
227
250
  -----------------------------------------------------
228
251
  # Run tests against CDK using Libvirt
229
252
  $ bundle exec rake features BOX=cdk PROVIDER=libvirt
230
253
 
231
- # Run against ADB and CDK (boxes are comma seperated)
254
+ # Run against ADB and CDK (boxes are comma separated)
232
255
  $ bundle exec rake features BOX=cdk,adb
256
+
257
+ # Run against ADB and CDK using VirtualBox and Libvirt
258
+ $ bundle exec rake features BOX=cdk,adb PROVIDER=libvirt,virtualbox
233
259
  -----------------------------------------------------
234
260
 
261
+ The _features_ task will transparently download the required Vagrant
262
+ boxes and cache them in _.boxes_. The cache can be cleared
263
+ via the _clean_boxes_ task.
264
+
265
+ Using the variable _NIGHTLY=true_ you can make sure that the
266
+ latest nightly build of the CDK is used (VPN access required).
267
+ Per default the latest public release of the CDK is used.
268
+
235
269
  You can also run a single feature specifying the explicit feature file
236
270
  to use:
237
271
 
@@ -239,8 +273,8 @@ to use:
239
273
  $ bundle exec rake features FEATURE=features/<feature-filename>.feature
240
274
  -----------------------------------------------------------------------
241
275
 
242
- After test execution the Cucumber test reports can be found under
243
- _build/features_report.html_. They can also be opened via
276
+ After test execution, the Cucumber test reports can be found under
277
+ _build/features_report.html_. They can also be opened via:
244
278
 
245
279
  ---------------------------------------
246
280
  $ bundle exec rake features:open_report
@@ -250,7 +284,7 @@ $ bundle exec rake features:open_report
250
284
 
251
285
  We welcome your input. You can submit issues or pull requests with
252
286
  respect to the vagrant-service-manager plugin. Refer to the
253
- https://github.com/projectatomic/vagrant-service-manager/blob/master/CONTRIBUTING.md[contributing
287
+ https://github.com/projectatomic/vagrant-service-manager/blob/master/CONTRIBUTING.adoc[contributing
254
288
  guidelines] for detailed information on how to contribute to this
255
289
  plugin.
256
290