vagrant-openshift 2.0.8 → 2.0.9
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 +4 -4
- data/lib/vagrant-openshift/action/{install_openshift_images.rb → atomic_host_upgrade.rb} +4 -19
- data/lib/vagrant-openshift/action/build_openshift.rb +4 -7
- data/lib/vagrant-openshift/action/install_openshift_base_dependencies.rb +4 -1
- data/lib/vagrant-openshift/action/run_openshift_tests.rb +3 -3
- data/lib/vagrant-openshift/action.rb +8 -1
- data/lib/vagrant-openshift/command/build_atomic_host.rb +50 -0
- data/lib/vagrant-openshift/plugin.rb +5 -0
- data/lib/vagrant-openshift/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1016fc5cb2140527ddf4ac73c2f635c460c471
|
4
|
+
data.tar.gz: d352b58cf8cc8d2a666a3a8e7bdb732c50f580b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa8c92f03ceaddb2418e60692160bab0e5ff81f4fc5c7510c24d058dc1f7d2cb870b1d5b73bcc80bb508750f6f7760d60797a1d50d7715a567a9cd48c8797e0f
|
7
|
+
data.tar.gz: cf02fb45bbf8583a0a377fcd640034e6b8ce18f85c9e959fc98e89d5cd1b7f9f4cbdc225934aae92d2a634f1492ae5a79ab822633a9c8c0954ceac23b539270d
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright
|
2
|
+
# Copyright 2013 Red Hat, Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -17,7 +17,7 @@
|
|
17
17
|
module Vagrant
|
18
18
|
module Openshift
|
19
19
|
module Action
|
20
|
-
class
|
20
|
+
class AtomicHostUpgrade
|
21
21
|
include CommandHelper
|
22
22
|
|
23
23
|
def initialize(app, env)
|
@@ -26,25 +26,10 @@ module Vagrant
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def call(env)
|
29
|
-
|
30
|
-
puts "Importing #{image_name} from Docker index"
|
31
|
-
sudo(env[:machine], pull_docker_image_cmd(image_name), {
|
32
|
-
:timeout=>60*20
|
33
|
-
})
|
34
|
-
end
|
35
|
-
@app.call(env)
|
36
|
-
end
|
29
|
+
sudo env[:machine], "atomic host upgrade"
|
37
30
|
|
38
|
-
|
39
|
-
%{
|
40
|
-
docker pull '#{image_name}'
|
41
|
-
if ! docker inspect '#{image_name}' 2>&1 > /dev/null
|
42
|
-
then
|
43
|
-
docker pull '#{image_name}'
|
44
|
-
fi
|
45
|
-
}
|
31
|
+
@app.call(env)
|
46
32
|
end
|
47
|
-
|
48
33
|
end
|
49
34
|
end
|
50
35
|
end
|
@@ -29,18 +29,15 @@ module Vagrant
|
|
29
29
|
def call(env)
|
30
30
|
if @options[:images]
|
31
31
|
cmd = %{
|
32
|
-
echo "Performing openshift release build..."
|
32
|
+
echo "Performing openshift release build with images..."
|
33
33
|
set -e
|
34
|
-
|
35
|
-
hack/build-release.sh
|
36
|
-
hack/build-images.sh
|
34
|
+
make release
|
37
35
|
}
|
38
36
|
else
|
39
37
|
cmd = %{
|
40
|
-
echo "Performing openshift build..."
|
38
|
+
echo "Performing openshift release build..."
|
41
39
|
set -e
|
42
|
-
|
43
|
-
hack/build-go.sh
|
40
|
+
make release-binaries
|
44
41
|
}
|
45
42
|
end
|
46
43
|
cmd += %{
|
@@ -112,9 +112,12 @@ GOPATH=/data go get golang.org/x/tools/cmd/vet
|
|
112
112
|
|
113
113
|
chown -R #{ssh_user}:#{ssh_user} /data
|
114
114
|
|
115
|
+
sed -i "s,^#DefaultTimeoutStartSec=.*,DefaultTimeoutStartSec=240s," /etc/systemd/system.conf
|
116
|
+
|
117
|
+
systemctl daemon-reexec
|
115
118
|
systemctl daemon-reload
|
116
119
|
systemctl enable docker
|
117
|
-
systemctl start docker
|
120
|
+
time systemctl start docker
|
118
121
|
}, {:timeout=>60*30})
|
119
122
|
@app.call(env)
|
120
123
|
end
|
@@ -91,13 +91,13 @@ popd >/dev/null
|
|
91
91
|
end
|
92
92
|
|
93
93
|
cmd = cmd_env.join(' ') + ' ' + build_targets.join(' ')
|
94
|
-
env[:test_exit_code] = run_tests(env, [cmd],
|
94
|
+
env[:test_exit_code] = run_tests(env, [cmd], false)
|
95
95
|
|
96
96
|
if env[:test_exit_code] == 0 && @options[:extended_test_packages].length > 0
|
97
97
|
# for extended tests we need a ginkgo binary
|
98
98
|
do_execute(env[:machine], "go get github.com/onsi/ginkgo/ginkgo", {:timeout => 60*60*2, :fail_on_error => true, :verbose => false})
|
99
|
-
|
100
|
-
env[:test_exit_code] = run_tests(env,
|
99
|
+
cmds = @options[:extended_test_packages].split(",").map{ |p| 'test/extended/'+Shellwords.escape(p)+'.sh'}
|
100
|
+
env[:test_exit_code] = run_tests(env, cmds, true)
|
101
101
|
end
|
102
102
|
|
103
103
|
|
@@ -21,6 +21,12 @@ module Vagrant
|
|
21
21
|
module Action
|
22
22
|
include Vagrant::Action::Builtin
|
23
23
|
|
24
|
+
def self.build_atomic_host(options)
|
25
|
+
Vagrant::Action::Builder.new.tap do |b|
|
26
|
+
b.use AtomicHostUpgrade
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
24
30
|
def self.build_openshift_base(options)
|
25
31
|
Vagrant::Action::Builder.new.tap do |b|
|
26
32
|
b.use CreateYumRepositories
|
@@ -32,7 +38,7 @@ module Vagrant
|
|
32
38
|
|
33
39
|
def self.install_openshift(options)
|
34
40
|
Vagrant::Action::Builder.new.tap do |b|
|
35
|
-
|
41
|
+
b.use YumUpdate
|
36
42
|
b.use SetHostName
|
37
43
|
b.use InstallOpenshift
|
38
44
|
b.use InstallOpenshiftRhel7
|
@@ -228,6 +234,7 @@ module Vagrant
|
|
228
234
|
autoload :TestExitCode, action_root.join("test_exit_code")
|
229
235
|
autoload :CleanNetworkSetup, action_root.join("clean_network_setup")
|
230
236
|
autoload :RunSystemctl, action_root.join("run_systemctl")
|
237
|
+
autoload :AtomicHostUpgrade, action_root.join("atomic_host_upgrade")
|
231
238
|
end
|
232
239
|
end
|
233
240
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright 2013 Red Hat, Inc.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#++
|
16
|
+
require_relative "../action"
|
17
|
+
|
18
|
+
module Vagrant
|
19
|
+
module Openshift
|
20
|
+
module Commands
|
21
|
+
class BuildAtomicHost < Vagrant.plugin(2, :command)
|
22
|
+
include CommandHelper
|
23
|
+
|
24
|
+
def self.synopsis
|
25
|
+
"Upgrade the atomic host to the latest OStree"
|
26
|
+
end
|
27
|
+
|
28
|
+
def execute
|
29
|
+
options = {}
|
30
|
+
options[:clean] = false
|
31
|
+
|
32
|
+
opts = OptionParser.new do |o|
|
33
|
+
o.banner = "Usage: vagrant build-atomic-host [vm-name]"
|
34
|
+
o.separator ""
|
35
|
+
end
|
36
|
+
|
37
|
+
# Parse the options
|
38
|
+
argv = parse_options(opts)
|
39
|
+
return if !argv
|
40
|
+
|
41
|
+
with_target_vms(argv, :reverse => true) do |machine|
|
42
|
+
actions = Vagrant::Openshift::Action.build_atomic_host(options)
|
43
|
+
@env.action_runner.run actions, {:machine => machine}
|
44
|
+
0
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -42,6 +42,11 @@ module Vagrant
|
|
42
42
|
Commands::RepoSyncSti
|
43
43
|
end
|
44
44
|
|
45
|
+
command "build-atomic-host" do
|
46
|
+
require_relative "command/build_atomic_host"
|
47
|
+
Commands::BuildAtomicHost
|
48
|
+
end
|
49
|
+
|
45
50
|
command "build-openshift-base" do
|
46
51
|
require_relative "command/build_openshift_base"
|
47
52
|
Commands::BuildOpenshiftBase
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-openshift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Red Hat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- Rakefile
|
123
123
|
- lib/vagrant-openshift.rb
|
124
124
|
- lib/vagrant-openshift/action.rb
|
125
|
+
- lib/vagrant-openshift/action/atomic_host_upgrade.rb
|
125
126
|
- lib/vagrant-openshift/action/build_openshift.rb
|
126
127
|
- lib/vagrant-openshift/action/build_openshift_base_images.rb
|
127
128
|
- lib/vagrant-openshift/action/build_sti.rb
|
@@ -138,7 +139,6 @@ files:
|
|
138
139
|
- lib/vagrant-openshift/action/install_openshift.rb
|
139
140
|
- lib/vagrant-openshift/action/install_openshift_asset_dependencies.rb
|
140
141
|
- lib/vagrant-openshift/action/install_openshift_base_dependencies.rb
|
141
|
-
- lib/vagrant-openshift/action/install_openshift_images.rb
|
142
142
|
- lib/vagrant-openshift/action/install_openshift_rhel7.rb
|
143
143
|
- lib/vagrant-openshift/action/local_openshift_checkout.rb
|
144
144
|
- lib/vagrant-openshift/action/modify_ami.rb
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- lib/vagrant-openshift/action/test_exit_code.rb
|
156
156
|
- lib/vagrant-openshift/action/yum_update.rb
|
157
157
|
- lib/vagrant-openshift/command/bootstrap_openshift.rb
|
158
|
+
- lib/vagrant-openshift/command/build_atomic_host.rb
|
158
159
|
- lib/vagrant-openshift/command/build_openshift.rb
|
159
160
|
- lib/vagrant-openshift/command/build_openshift_base.rb
|
160
161
|
- lib/vagrant-openshift/command/build_openshift_base_images.rb
|