vagrant-service-manager 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +17 -8
- data/lib/vagrant-service-manager/command.rb +18 -15
- data/lib/vagrant-service-manager/services/open_shift.rb +8 -5
- data/lib/vagrant-service-manager/version.rb +1 -1
- data/vagrant-service-manager.spec +12 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d986d92937e542b815d38f6d34bd7911ca12d887
|
4
|
+
data.tar.gz: 3fde086dabca156fd5a958edf3832b77909545fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba9588c35837fc5f063a92186459fb11d6d7fccdfeb38ff10bb894c2659c6d5b21b78d40a2f4c105a0b29142ab84ab6a3483091bea04a3e027d5b4294f6f71e1
|
7
|
+
data.tar.gz: 8130ab6f386b595a102de50d81be20c7777d4ee4d40548a5e25f6ae37e0ec17afd98f543b21ac5dd52b97d25bd66e1395dbc2defc26e55422ce912bfb6f61b76
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## v1.0.1 Apr 12, 2016
|
6
|
+
- Updated SPEC (v1.0.0) for url, date and format @budhrg
|
7
|
+
- Added Table of Contents for README @bexelbie
|
8
|
+
- Fix #160: "vagrant service-manager restart openshift" not working as expected @budhrg
|
9
|
+
- Fix #166: For CDK box, provisioners are not executed by default on Vagrant up @budhrg
|
10
|
+
- Fix #170: vagrant-service-manager version 1.0.1 release @navidshaikh
|
11
|
+
|
5
12
|
## v1.0.0 Apr 07, 2016
|
6
13
|
- Fix #132: vagrant-service-manager 1.0.0 release @navidshaikh
|
7
14
|
- Fix #133: Adds restart command for services @navidshaikh
|
data/README.md
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
# vagrant-service-manager
|
2
2
|
|
3
|
+
* [Objective](#objective)
|
4
|
+
* [Quick Start](#quick_start)
|
5
|
+
* [Exit codes](#exit_codes)
|
6
|
+
* [IP Address Detection](#ip_addr)
|
7
|
+
* [Get Involved/Contact Us](#involved)
|
8
|
+
* [How to Develop/Test](#develop)
|
9
|
+
* [How to build the Vagrant plugin using Bundler](#bundler)
|
10
|
+
* [Builds](#builds)
|
11
|
+
|
3
12
|
This plugin provides setup information, including environment variables and certificates, required to access services provided by an [Atomic Developer Bundle (ADB)](https://github.com/projectatomic/adb-atomic-developer-bundle). This plugin makes it easier to use the ADB with host-based tools such as Eclipse and the docker and kubernetes CLI commands. Details on this usage pattern can be found in the [ADB Documentation](https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/using.rst).
|
4
13
|
|
5
|
-
##Objective
|
14
|
+
## Objective <a name="objective"></a>
|
6
15
|
|
7
16
|
* To provide the user a CLI to configure the
|
8
17
|
[ADB](https://github.com/projectatomic/adb-atomic-developer-bundle)
|
@@ -18,7 +27,7 @@ is Vagrant box that provides a ready-to-use development environment
|
|
18
27
|
for container applications. With ADB, developers can dive right into
|
19
28
|
producing complex, multi-container applications.
|
20
29
|
|
21
|
-
## Quick Start
|
30
|
+
## Quick Start <a name="quick_start"></a>
|
22
31
|
|
23
32
|
1. Install `vagrant-service-manager` plugin:
|
24
33
|
|
@@ -66,7 +75,7 @@ producing complex, multi-container applications.
|
|
66
75
|
|
67
76
|
7. Begin using your host-based tools.
|
68
77
|
|
69
|
-
## Exit codes
|
78
|
+
## Exit codes <a name="exit_codes"></a>
|
70
79
|
|
71
80
|
The following table lists the plugin's exit codes and their meaning:
|
72
81
|
|
@@ -77,19 +86,19 @@ Exit Code Number | Meaning
|
|
77
86
|
3 | Vagrant box is not running and must be before this command can succeed
|
78
87
|
126 | A service inside the box is not running / Command invoked cannot execute
|
79
88
|
|
80
|
-
## IP Address Detection
|
89
|
+
## IP Address Detection <a name="ip_addr"></a>
|
81
90
|
|
82
91
|
There is no standarized way of detection Vagrant box IP addresses.
|
83
92
|
This code uses the last IPv4 address available from the set of configured
|
84
93
|
addresses that are *up*. i.e. if eth0, eth1, and eth2 are all up and
|
85
94
|
have IPv4 addresses, the address on eth2 is used.
|
86
95
|
|
87
|
-
## Get Involved/Contact Us
|
96
|
+
## Get Involved/Contact Us <a name="involved"></a>
|
88
97
|
|
89
98
|
* IRC: #atomic and #nulecule on freenode
|
90
99
|
* Mailing List: container-tools@redhat.com
|
91
100
|
|
92
|
-
## How to Develop/Test
|
101
|
+
## How to Develop/Test <a name="develop"></a>
|
93
102
|
|
94
103
|
1. Install the Atomic Developer Bundle (ADB), as
|
95
104
|
[documented](https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/docs/installing.rst)
|
@@ -121,7 +130,7 @@ in the ADB project. Do not start the box yet.
|
|
121
130
|
|
122
131
|
5. Create a Github release
|
123
132
|
|
124
|
-
### How to build the Vagrant plugin using Bundler
|
133
|
+
### How to build the Vagrant plugin using Bundler <a name="bundler"></a>
|
125
134
|
|
126
135
|
You can also use Bundler to build the plugin and install it manually in
|
127
136
|
your Vagrant environment
|
@@ -138,7 +147,7 @@ Install the plugin using:
|
|
138
147
|
vagrant plugin install pkg/<gem name>
|
139
148
|
|
140
149
|
|
141
|
-
## Builds
|
150
|
+
## Builds <a name="builds"></a>
|
142
151
|
|
143
152
|
- Gemfile: https://rubygems.org/gems/vagrant-service-manager
|
144
153
|
|
@@ -5,7 +5,7 @@ module Vagrant
|
|
5
5
|
module ServiceManager
|
6
6
|
DOCKER_PATH = '/home/vagrant/.docker'
|
7
7
|
SUPPORTED_SERVICES = ['docker', 'openshift', 'kubernetes']
|
8
|
-
SCCLI_SERVICES = [
|
8
|
+
SCCLI_SERVICES = ['openshift', 'k8s']
|
9
9
|
|
10
10
|
class Command < Vagrant.plugin(2, :command)
|
11
11
|
OS_RELEASE_FILE = '/etc/os-release'
|
@@ -266,21 +266,24 @@ module Vagrant
|
|
266
266
|
end
|
267
267
|
|
268
268
|
def restart_service(service)
|
269
|
-
|
270
|
-
if SCCLI_SERVICES.include? service
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
269
|
+
errors = []
|
270
|
+
command = if SCCLI_SERVICES.include? service
|
271
|
+
# TODO : Handle the case where user wants to pass extra arguments
|
272
|
+
# to OpenShift service
|
273
|
+
"sccli #{service}"
|
274
|
+
else
|
275
|
+
"systemctl restart #{service}"
|
276
|
+
end
|
277
|
+
|
278
|
+
with_target_vms(nil, single_target: true) do |machine|
|
279
|
+
exit_code = machine.communicate.sudo(command) do |type, error|
|
280
|
+
errors << error if type == :stderr
|
281
|
+
end
|
282
|
+
unless exit_code.zero?
|
283
|
+
@env.ui.error errors.join("\n")
|
284
|
+
exit exit_code
|
283
285
|
end
|
286
|
+
exit_code
|
284
287
|
end
|
285
288
|
end
|
286
289
|
|
@@ -8,14 +8,17 @@ module Vagrant
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def execute
|
11
|
+
errors = []
|
11
12
|
full_cmd = "#{@extra_cmd} sccli openshift"
|
12
13
|
|
13
|
-
@machine.communicate.sudo(full_cmd) do |type,
|
14
|
-
if type == :stderr
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
exit_code = @machine.communicate.sudo(full_cmd) do |type, error|
|
15
|
+
errors << error if type == :stderr
|
16
|
+
end
|
17
|
+
unless exit_code.zero?
|
18
|
+
@env.ui.error errors.join("\n")
|
19
|
+
exit exit_code
|
18
20
|
end
|
21
|
+
exit_code
|
19
22
|
end
|
20
23
|
|
21
24
|
private
|
@@ -2,12 +2,12 @@
|
|
2
2
|
%global vagrant_plugin_name vagrant-service-manager
|
3
3
|
|
4
4
|
Name: %{vagrant_plugin_name}
|
5
|
-
Version: 1.0.
|
5
|
+
Version: 1.0.1
|
6
6
|
Release: 1%{?dist}
|
7
7
|
Summary: To provide the user a CLI to configure the ADB/CDK for different use cases and to provide glue between ADB/CDK and the user's developer environment.
|
8
8
|
Group: Development/Languages
|
9
9
|
License: GPLv2
|
10
|
-
URL: https://github.com/
|
10
|
+
URL: https://github.com/projectatomic/vagrant-service-manager
|
11
11
|
Source0: https://rubygems.org/gems/%{vagrant_plugin_name}-%{version}.gem
|
12
12
|
Requires(posttrans): vagrant
|
13
13
|
Requires(preun): vagrant
|
@@ -39,7 +39,7 @@ gem unpack %{SOURCE0}
|
|
39
39
|
gem spec %{SOURCE0} -l --ruby > %{vagrant_plugin_name}.gemspec
|
40
40
|
|
41
41
|
%build
|
42
|
-
# Create the gem as gem install only works on a gem file
|
42
|
+
# Create the gem as "gem install" only works on a gem file
|
43
43
|
gem build %{vagrant_plugin_name}.gemspec
|
44
44
|
|
45
45
|
# %%vagrant_plugin_install compiles any C extensions and installs the gem into ./%%gem_dir
|
@@ -88,7 +88,14 @@ popd
|
|
88
88
|
%{vagrant_plugin_instdir}/.gitattributes
|
89
89
|
|
90
90
|
%changelog
|
91
|
-
* Tue
|
91
|
+
* Tue Apr 12 2016 Navid Shaikh - 1.0.1-1
|
92
|
+
- Updated SPEC (v1.0.0) for url, date and format @budhrg
|
93
|
+
- Added Table of Contents for README @bexelbie
|
94
|
+
- Fix #160: "vagrant service-manager restart openshift" not working as expected @budhrg
|
95
|
+
- Fix #166: For CDK box, provisioners are not executed by default on Vagrant up @budhrg
|
96
|
+
- Fix #170: vagrant-service-manager version 1.0.1 release @navidshaikh
|
97
|
+
|
98
|
+
* Thu Apr 7 2016 Navid Shaikh - 1.0.0-1
|
92
99
|
- Bumps the plugin version to 1.0.0
|
93
100
|
- Fix #132: vagrant-service-manager 1.0.0 release @navidshaikh
|
94
101
|
- Fix #133: Adds restart command for services @navidshaikh
|
@@ -96,7 +103,7 @@ popd
|
|
96
103
|
- Fix #150: Adds .gitattributes to fix the CHANGELOG.md merge conflicts @bexelbie
|
97
104
|
- Fix #142: Removes # before human readable output of openshift env info @navidshaikh
|
98
105
|
- Fix #75 and #141: Improves `vagrant service-manager env` output @navidshaikh
|
99
|
-
- Fix#146: Updates docker 1.9.1 API call for `docker version` @navidshaikh
|
106
|
+
- Fix #146: Updates docker 1.9.1 API call for `docker version` @navidshaikh
|
100
107
|
- Updating CONTRIBUTING with note about entry loc @bexelbie
|
101
108
|
- Update IP detection routine and fix for libvirt @bexelbie
|
102
109
|
- Fix #50: Add --help @budhrg
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-service-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
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: 2016-04-
|
12
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Provides setup information, including environment variables and certificates,
|
15
15
|
required to access services provided by ADB/CDK.
|