vagrant-openshift 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.asciidoc +1 -1
- data/lib/vagrant-openshift/action/create_yum_repositories.rb +1 -1
- data/lib/vagrant-openshift/action/generate_template.rb +3 -2
- data/lib/vagrant-openshift/action/yum_update.rb +1 -1
- data/lib/vagrant-openshift/command/origin_init.rb +7 -1
- data/lib/vagrant-openshift/helper/command_helper.rb +16 -9
- data/lib/vagrant-openshift/version.rb +1 -1
- 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: b3fe170f2452ac6b16bb9b59aae8b97b545d4fc2
|
4
|
+
data.tar.gz: 19294c1010b526c4b390e8a365066b115e0bd936
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 108a4d36deec143097fc7b8f5379f796f5ed70271809a0d9e94adea90694e5c22ed0d503da7312e812e2be695f8ca5d7a4d7a4162c09be0d736961c3358e4743
|
7
|
+
data.tar.gz: fb31ad53478510a18bb165e3fa69f19df98fa1254086dd9f2d211ce1fb17114f068f7352e6395456b4ab80e9ceaab05d616ecce45d131a8be62daaa6ae168a82
|
data/README.asciidoc
CHANGED
@@ -46,7 +46,7 @@ $ bundle exec rake
|
|
46
46
|
|
47
47
|
NOTE: If at this point a warning like `git://github.com/mitchellh/vagrant.git (at master) is not yet checked out. Run bundle install first.` appears, run `bundle install` and then re-run `bundle exec rake`. The warning will most likely not go away, but it is safe to proceed regardless.
|
48
48
|
|
49
|
-
Install the plugin using Vagrant:
|
49
|
+
Install the plugin using Vagrant (only necessary if `bundle exec rake` still failed with the above noted warning):
|
50
50
|
|
51
51
|
[source,sh]
|
52
52
|
----
|
@@ -55,7 +55,7 @@ module Vagrant
|
|
55
55
|
|
56
56
|
unless is_fedora
|
57
57
|
unless env[:machine].communicate.test("rpm -q epel-release")
|
58
|
-
sudo(env[:machine], "yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-
|
58
|
+
sudo(env[:machine], "yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm")
|
59
59
|
|
60
60
|
#Workaround broken RHEL image which does not recover after restart.
|
61
61
|
if "VagrantPlugins::AWS::Provider" == env[:machine].provider.class.to_s
|
@@ -122,8 +122,9 @@ module Vagrant
|
|
122
122
|
|
123
123
|
aws_compute = Fog::Compute.new(fog_config)
|
124
124
|
@env[:ui].info("Searching for latest base AMI")
|
125
|
-
|
126
|
-
|
125
|
+
image_filter = {'Owner' => 'self', 'name' => "#{box_info[:aws][:ami_tag_prefix]}*", 'state' => 'available' }
|
126
|
+
image_filter['tag:Name'] = @options[:required_name_tag] unless @options[:required_name_tag].nil?
|
127
|
+
images = aws_compute.images.all(image_filter)
|
127
128
|
latest_image = images.sort_by{ |i| i.name.split("_")[-1].to_i }.last
|
128
129
|
box_info[:aws][:ami] = latest_image.id
|
129
130
|
@env[:ui].info("Found: #{latest_image.id} (#{latest_image.name})")
|
@@ -28,7 +28,7 @@ module Vagrant
|
|
28
28
|
def call(env)
|
29
29
|
sudo env[:machine], "rm -rf /etc/yum.repos.d/openshift-origin.repo"
|
30
30
|
sudo env[:machine], "yum clean all"
|
31
|
-
sudo env[:machine], "yum -y update --
|
31
|
+
sudo env[:machine], "yum -y update --exclude=kernel*", {fail_on_error: false, :timeout=>60*30}
|
32
32
|
sudo env[:machine], "yum list installed"
|
33
33
|
|
34
34
|
env[:machine].ui.warn "Increasing YUM cache timeout to 9999999. You will need manually clear cache to get additional updates."
|
@@ -34,7 +34,8 @@ module Vagrant
|
|
34
34
|
:volume_size => 25,
|
35
35
|
:port_mappings => [],
|
36
36
|
:no_synced_folders => false,
|
37
|
-
:no_insert_key => false
|
37
|
+
:no_insert_key => false,
|
38
|
+
:required_name_tag => nil
|
38
39
|
}
|
39
40
|
|
40
41
|
valid_stage = ['os','deps','inst']
|
@@ -71,6 +72,11 @@ module Vagrant
|
|
71
72
|
o.on('--volume-size', "--volume-size [size]", String, "Specify the volume size for the instance") do |f|
|
72
73
|
options[:volume_size] = f.to_i
|
73
74
|
end
|
75
|
+
|
76
|
+
o.on("--required-name-tag [name]", String, "Specify name tag to match against images, if supported") do |f|
|
77
|
+
name_tag = f.strip
|
78
|
+
options[:required_name_tag] = name_tag unless name_tag.empty?
|
79
|
+
end
|
74
80
|
end
|
75
81
|
|
76
82
|
# Parse the options
|
@@ -140,21 +140,27 @@ popd
|
|
140
140
|
if @options[:replace]
|
141
141
|
command += %{
|
142
142
|
echo 'Replacing: #{repo_path}'
|
143
|
-
|
143
|
+
pushd #{repo_path}
|
144
|
+
git fetch origin
|
145
|
+
git reset --hard origin/master
|
146
|
+
git clean -fdx
|
147
|
+
set +e
|
148
|
+
git branch | grep -ve " master$" | xargs git branch -D
|
149
|
+
set -e
|
150
|
+
popd
|
144
151
|
}
|
145
152
|
else
|
146
153
|
command += "echo 'Already cloned: #{repo}'\n"
|
147
154
|
end
|
148
|
-
|
149
|
-
|
150
|
-
command += %{
|
155
|
+
else
|
156
|
+
command += %{
|
151
157
|
cloned=false
|
152
158
|
echo 'Cloning #{repo} ...'
|
153
159
|
}
|
154
160
|
|
155
|
-
|
156
|
-
|
157
|
-
|
161
|
+
if @options[:user]
|
162
|
+
user_repo_url="git@github.com:#{@options[:user]}/#{repo}"
|
163
|
+
command += %{
|
158
164
|
echo 'Cloning #{user_repo_url}'
|
159
165
|
git clone --quiet #{user_repo_url}
|
160
166
|
if [ $? -eq 0 ]; then
|
@@ -165,11 +171,12 @@ echo 'Fork of repo #{repo} not found. Cloning read-only copy from upstream'
|
|
165
171
|
fi
|
166
172
|
}
|
167
173
|
|
168
|
-
|
169
|
-
|
174
|
+
end
|
175
|
+
command += %{
|
170
176
|
[ $cloned != true ] && git clone --quiet #{url}
|
171
177
|
( cd #{repo} && git checkout #{@options[:branch]} &>/dev/null)
|
172
178
|
}
|
179
|
+
end
|
173
180
|
|
174
181
|
command
|
175
182
|
end
|
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: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Red Hat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|