vagrant-openshift 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/lib/vagrant-openshift/action/build_origin_base_images.rb +1 -1
- data/lib/vagrant-openshift/action/download_artifacts_origin.rb +8 -6
- data/lib/vagrant-openshift/action/install_origin_asset_dependencies.rb +5 -1
- data/lib/vagrant-openshift/action/install_origin_base_dependencies.rb +31 -4
- data/lib/vagrant-openshift/action/install_origin_rhel7.rb +21 -0
- data/lib/vagrant-openshift/action/prepare_ssh_config.rb +7 -38
- data/lib/vagrant-openshift/action/push_openshift_images.rb +1 -1
- data/lib/vagrant-openshift/action/push_openshift_release.rb +1 -1
- data/lib/vagrant-openshift/action/run_origin_tests.rb +5 -2
- data/lib/vagrant-openshift/action/sync_local_repository.rb +8 -6
- data/lib/vagrant-openshift/action/yum_update.rb +1 -1
- data/lib/vagrant-openshift/command/test_origin.rb +4 -0
- data/lib/vagrant-openshift/constants.rb +1 -1
- 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: 0c1d9f532660bb3adc5e3749b5fba4d3c52b1154
|
4
|
+
data.tar.gz: 7ffa2c5f6f5d4a483e0f9896a28d294f1f295654
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 383500d85b7811455243bfbe40b76fe05033bafb0037083b839a4438983866cf236bdcff260c0383cc5ed0ba139db1d11659f0e4bf4bac5792a21b60b2320cab
|
7
|
+
data.tar.gz: b6e221c7ec9637cb95269249e6f3e32189bd7c9184e3b9055bf1fbce15521596cf56017116e6ae0e6576c89270db9d0bc478d355c01c450fb3ea1ad1f8d53878
|
data/.travis.yml
CHANGED
@@ -34,12 +34,14 @@ module Vagrant
|
|
34
34
|
|
35
35
|
artifacts_dir = Pathname.new(File.expand_path(machine.env.root_path + "artifacts"))
|
36
36
|
download_map = {
|
37
|
-
"/var/log/yum.log"
|
38
|
-
"/var/log/secure"
|
39
|
-
"/var/log/audit/audit.log"
|
40
|
-
"/tmp/
|
41
|
-
"/tmp/
|
42
|
-
"/tmp/openshift-
|
37
|
+
"/var/log/yum.log" => artifacts_dir + "yum.log",
|
38
|
+
"/var/log/secure" => artifacts_dir + "secure",
|
39
|
+
"/var/log/audit/audit.log" => artifacts_dir + "audit.log",
|
40
|
+
"/tmp/openshift/" => artifacts_dir,
|
41
|
+
"/tmp/origin/e2e/" => artifacts_dir + "e2e/",
|
42
|
+
"/tmp/openshift-extended-tests/" => artifacts_dir + "extended-tests/",
|
43
|
+
"/tmp/openshift-cmd/" => artifacts_dir + "cmd/",
|
44
|
+
"/tmp/openshift-integration/" => artifacts_dir + "integration/",
|
43
45
|
|
44
46
|
"/data/src/github.com/openshift/origin/_output/local/releases/" => artifacts_dir + "release/",
|
45
47
|
"/data/src/github.com/openshift/origin/assets/test/tmp/screenshots/" => artifacts_dir + "screenshots/"
|
@@ -59,13 +59,17 @@ popd
|
|
59
59
|
|
60
60
|
if @options[:backup_assets]
|
61
61
|
cmd += %{
|
62
|
+
# Make sure tests pass before backing up this asset install
|
63
|
+
pushd $ORIGIN_PATH
|
64
|
+
hack/test-assets.sh
|
65
|
+
popd
|
62
66
|
mkdir -p $ASSET_BACKUP_DIR
|
63
67
|
cp -rf $ORIGIN_PATH/assets/node_modules $ASSET_BACKUP_DIR/node_modules
|
64
68
|
cp -rf $ORIGIN_PATH/assets/bower_components $ASSET_BACKUP_DIR/bower_components
|
65
69
|
}
|
66
70
|
end
|
67
71
|
|
68
|
-
do_execute(env[:machine], cmd, :verbose => false, :timeout=>60*
|
72
|
+
do_execute(env[:machine], cmd, :verbose => false, :timeout=>60*60)
|
69
73
|
@app.call(env)
|
70
74
|
end
|
71
75
|
end
|
@@ -57,6 +57,7 @@ fi
|
|
57
57
|
gcc \
|
58
58
|
gcc-c++ \
|
59
59
|
glibc-static \
|
60
|
+
gnuplot \
|
60
61
|
httpie \
|
61
62
|
hg \
|
62
63
|
jq \
|
@@ -73,6 +74,7 @@ fi
|
|
73
74
|
screen \
|
74
75
|
socat \
|
75
76
|
sqlite-devel \
|
77
|
+
sysstat \
|
76
78
|
tig \
|
77
79
|
tmux \
|
78
80
|
unzip \
|
@@ -80,9 +82,9 @@ fi
|
|
80
82
|
wget \
|
81
83
|
xfsprogs \
|
82
84
|
Xvfb \
|
83
|
-
yum-utils",:timeout=>60*
|
85
|
+
yum-utils",:timeout=>60*30, :verbose => false)
|
84
86
|
|
85
|
-
sudo(env[:machine], "yum install -y facter", fail_on_error: false, :timeout=>60*
|
87
|
+
sudo(env[:machine], "yum install -y facter", fail_on_error: false, :timeout=>60*20, :verbose => false)
|
86
88
|
|
87
89
|
# Install Chrome and chromedriver for headless UI testing
|
88
90
|
sudo(env[:machine], %{
|
@@ -105,16 +107,38 @@ unzip chromedriver_linux64.zip
|
|
105
107
|
mv chromedriver /usr/bin/chromedriver
|
106
108
|
chown root /usr/bin/chromedriver
|
107
109
|
chmod 755 /usr/bin/chromedriver
|
108
|
-
}, :timeout=>60*
|
110
|
+
}, :timeout=>60*20, :verbose => false)
|
109
111
|
|
110
112
|
#
|
111
113
|
# FIXME: Need to install golang packages 'after' the 'gcc' is
|
112
114
|
# installed. See BZ#1101508
|
113
115
|
#
|
114
|
-
sudo(env[:machine], "yum install -y golang golang-pkg-linux-amd64 golang-src", :timeout=>60*
|
116
|
+
sudo(env[:machine], "yum install -y golang golang-pkg-linux-amd64 golang-src", :timeout=>60*20, :verbose => false)
|
115
117
|
#
|
116
118
|
sudo(env[:machine], %{
|
117
119
|
set -ex
|
120
|
+
|
121
|
+
if [[ -e /etc/redhat-release && ! -e /etc/fedora-release && ! -e /etc/centos-release ]]; then
|
122
|
+
|
123
|
+
# create rhaos repo
|
124
|
+
cat <<EOF > /etc/yum.repos.d/rhaos.repo
|
125
|
+
[rhel-7-server-ose-3.1-rpms]
|
126
|
+
name=RHEL7 Red Hat Atomic OpenShift 3.1
|
127
|
+
baseurl=https://mirror.ops.rhcloud.com/enterprise/enterprise-3.1/RH7-RHAOS-3.1/x86_64/os/
|
128
|
+
https://use-mirror1.ops.rhcloud.com/enterprise/enterprise-3.1/RH7-RHAOS-3.1/x86_64/os/
|
129
|
+
https://use-mirror2.ops.rhcloud.com/enterprise/enterprise-3.1/RH7-RHAOS-3.1/x86_64/os/
|
130
|
+
https://euw-mirror1.ops.rhcloud.com/enterprise/enterprise-3.1/RH7-RHAOS-3.1/x86_64/os/
|
131
|
+
enabled=1
|
132
|
+
gpgcheck=0
|
133
|
+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted
|
134
|
+
failovermethod=priority
|
135
|
+
sslverify=0
|
136
|
+
sslclientcert=/var/lib/yum/client-cert.pem
|
137
|
+
sslclientkey=/var/lib/yum/client-key.pem
|
138
|
+
|
139
|
+
EOF
|
140
|
+
fi
|
141
|
+
|
118
142
|
if ! test -e /etc/fedora-release; then
|
119
143
|
# TODO Remove me ASAP
|
120
144
|
sed -i 's,^SELINUX=.*,SELINUX=permissive,' /etc/selinux/config
|
@@ -146,7 +170,10 @@ echo "Detected go version: $(go version)"
|
|
146
170
|
if [[ ${GO_VERSION[2]} == "go1.4"* ]]; then
|
147
171
|
GOPATH=/data go get golang.org/x/tools/cmd/cover
|
148
172
|
|
173
|
+
# https://groups.google.com/forum/#!topic/golang-nuts/nZLhcbaa3wQ
|
174
|
+
set +e
|
149
175
|
GOPATH=/data go get golang.org/x/tools/cmd/vet
|
176
|
+
set -e
|
150
177
|
|
151
178
|
# Check out a stable commit for go vet in order to version lock it to something we can work with
|
152
179
|
pushd /data/src/golang.org/x/tools >/dev/null
|
@@ -55,6 +55,11 @@ ADD vars/* /etc/yum/vars/
|
|
55
55
|
ADD repos/* /etc/yum.repos.d/
|
56
56
|
ADD certs/* /var/lib/yum/
|
57
57
|
|
58
|
+
# we're picking up 7.2 packages in our 7.1 image and these two conflict, so
|
59
|
+
# first replace the 7.1 package with the new 7.2 package so later updates/dep
|
60
|
+
# installations don't fail.
|
61
|
+
RUN yum swap -y -- remove systemd-container\* -- install systemd systemd-libs
|
62
|
+
|
58
63
|
RUN yum update -y && yum clean all
|
59
64
|
|
60
65
|
EOF
|
@@ -62,6 +67,22 @@ EOF
|
|
62
67
|
docker build --rm -t rhel7:latest $contextdir
|
63
68
|
docker tag rhel7:latest rhel7.1
|
64
69
|
|
70
|
+
# create Dockerfile
|
71
|
+
cat <<EOF > $contextdir/Dockerfile
|
72
|
+
FROM registry.access.redhat.com/rhel7.2:latest
|
73
|
+
|
74
|
+
RUN yum remove -y subscription-manager
|
75
|
+
|
76
|
+
ADD vars/* /etc/yum/vars/
|
77
|
+
ADD repos/* /etc/yum.repos.d/
|
78
|
+
ADD certs/* /var/lib/yum/
|
79
|
+
|
80
|
+
RUN yum update -y && yum clean all
|
81
|
+
|
82
|
+
EOF
|
83
|
+
|
84
|
+
docker build --rm -t rhel7.2 $contextdir
|
85
|
+
|
65
86
|
# cleaning
|
66
87
|
rm -rf $contextdir
|
67
88
|
})
|
@@ -33,51 +33,20 @@ module Vagrant
|
|
33
33
|
if ssh_id_file.kind_of?(Array)
|
34
34
|
ssh_id_file = ssh_id_file.first
|
35
35
|
end
|
36
|
-
ssh_id = env[:machine].id.gsub("-","")
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
Port #{ssh_port}
|
43
|
-
User #{ssh_user}
|
44
|
-
IdentityFile #{ssh_id_file}
|
45
|
-
StrictHostKeyChecking no
|
46
|
-
|
47
|
-
}
|
48
|
-
|
49
|
-
if ssh_config_path.exist?
|
50
|
-
if system( "grep -n 'Host verifier' #{ssh_config_path}" )
|
51
|
-
lines = File.new(ssh_config_path.to_s).readlines
|
52
|
-
lines.map!{ |line| line.rstrip }
|
53
|
-
idx = lines.index{ |l| l.match(/Host verifier/)}
|
54
|
-
|
55
|
-
lines.delete_at(idx)
|
56
|
-
while(not (lines[idx].nil? or lines[idx].match(/Host /)))
|
57
|
-
lines.delete_at(idx)
|
58
|
-
end
|
59
|
-
|
60
|
-
File.open(ssh_config_path.to_s, "w") do |file|
|
61
|
-
file.write(lines.join("\n"))
|
62
|
-
file.write(ssh_config_str)
|
63
|
-
end
|
64
|
-
else
|
65
|
-
File.open(ssh_config_path.to_s, "a") do |file|
|
66
|
-
file.write(ssh_config_str)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
else
|
70
|
-
File.open(ssh_config_path.to_s, "w") do |file|
|
71
|
-
file.write(ssh_config_str)
|
72
|
-
end
|
73
|
-
FileUtils.chmod(0600, ssh_config_path.to_s)
|
37
|
+
vagrant_openshift_ssh_override_path = Constants.git_ssh
|
38
|
+
vagrant_openshift_ssh_override_str = "/usr/bin/ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -i #{ssh_id_file} $@"
|
39
|
+
File.open(vagrant_openshift_ssh_override_path.to_s, "w") do |file|
|
40
|
+
file.write(vagrant_openshift_ssh_override_str)
|
74
41
|
end
|
42
|
+
FileUtils.chmod(0744, vagrant_openshift_ssh_override_path.to_s)
|
75
43
|
|
76
44
|
home_dir=File.join(ENV['HOME'], '.openshiftdev/home.d')
|
77
45
|
if File.exists?(home_dir)
|
78
46
|
Dir.glob(File.join(home_dir, '???*'), File::FNM_DOTMATCH).each {|file|
|
79
47
|
puts "Installing ~/#{File.basename(file)}"
|
80
|
-
|
48
|
+
puts "#{ssh_id_file} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null #{file} #{ssh_user}@#{ssh_host}:#{ssh_port}"
|
49
|
+
system "scp -P #{ssh_port} -i #{ssh_id_file} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null #{file} #{ssh_user}@#{ssh_host}:~"
|
81
50
|
}
|
82
51
|
end
|
83
52
|
|
@@ -180,7 +180,7 @@ export PATH=/data/src/github.com/openshift/source-to-image/_output/local/go/bin:
|
|
180
180
|
cmd+= check_latest_image_cmd(@options[:registry],rhel_namespace,name,repo_url)
|
181
181
|
end
|
182
182
|
|
183
|
-
do_execute(env[:machine], cmd)
|
183
|
+
do_execute(env[:machine], cmd, :timeout=>60*60*5)
|
184
184
|
|
185
185
|
@app.call(env)
|
186
186
|
end
|
@@ -37,7 +37,7 @@ pushd /data/src/github.com/openshift/origin
|
|
37
37
|
OS_PUSH_BASE_IMAGES="#{push_base ? 'true' : ''}" OS_PUSH_BASE_REGISTRY="#{registry_name}" hack/push-release.sh
|
38
38
|
popd
|
39
39
|
},
|
40
|
-
{ :timeout => 60*
|
40
|
+
{ :timeout => 60*30, :verbose => false })
|
41
41
|
@app.call(env)
|
42
42
|
end
|
43
43
|
|
@@ -74,10 +74,9 @@ popd >/dev/null
|
|
74
74
|
end
|
75
75
|
|
76
76
|
if @options[:all]
|
77
|
-
cmd_env << 'ARTIFACT_DIR=/tmp/origin/e2e/artifacts'
|
78
|
-
cmd_env << 'LOG_DIR=/tmp/origin/e2e/logs'
|
79
77
|
cmd_env << 'TEST_ASSETS=true'
|
80
78
|
cmd_env << 'TEST_ASSETS_HEADLESS=true'
|
79
|
+
cmd_env << 'TESTFLAGS=\'"" -p=4\''
|
81
80
|
build_targets << 'test'
|
82
81
|
# we want to test the output of build-release, this flag tells the makefile to skip the build dependency
|
83
82
|
# so the command comes out to <cmd_env settings> make test SKIP_BUILD=true
|
@@ -94,6 +93,10 @@ popd >/dev/null
|
|
94
93
|
cmd_env << 'OUTPUT_COVERAGE=/tmp/origin/e2e/artifacts/coverage'
|
95
94
|
end
|
96
95
|
|
96
|
+
if @options[:image_registry]
|
97
|
+
cmd_env << "OPENSHIFT_TEST_IMAGE_REGISTRY=#{@options[:image_registry]}"
|
98
|
+
end
|
99
|
+
|
97
100
|
cmd = cmd_env.join(' ') + ' ' + build_targets.join(' ')
|
98
101
|
env[:test_exit_code] = run_tests(env, [cmd], false)
|
99
102
|
|
@@ -55,14 +55,16 @@ module Vagrant
|
|
55
55
|
|
56
56
|
puts "Synchronizing [#{repo_name}@#{branch}] from #{File.basename(FileUtils.pwd)}..."
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
58
|
+
ssh_user = machine.ssh_info[:username]
|
59
|
+
ssh_host = machine.ssh_info[:host]
|
60
|
+
ssh_port = machine.ssh_info[:port]
|
61
|
+
|
62
|
+
command = "export GIT_SSH=#{Constants.git_ssh};\n"
|
63
|
+
|
62
64
|
if branch == 'origin/master'
|
63
|
-
command += "git push -q
|
65
|
+
command += "git push -q ssh://#{ssh_user}@#{ssh_host}:#{ssh_port}#{Constants.build_dir + repo_name}-bare master:master --tags --force;\n"
|
64
66
|
end
|
65
|
-
command += "git push -q
|
67
|
+
command += "git push -q ssh://#{ssh_user}@#{ssh_host}:#{ssh_port}#{Constants.build_dir + repo_name}-bare #{branch}:master --tags --force"
|
66
68
|
|
67
69
|
exit_status = 1
|
68
70
|
retries = 0
|
@@ -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 --skip-broken --exclude=kernel*", {fail_on_error: false, :timeout=>60*
|
31
|
+
sudo env[:machine], "yum -y update --skip-broken --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."
|
@@ -62,6 +62,10 @@ module Vagrant
|
|
62
62
|
o.on("-j","--parallel", String, "Run parallel make") do |f|
|
63
63
|
options[:parallel] = true
|
64
64
|
end
|
65
|
+
|
66
|
+
o.on("-r","--image-registry", String, "Image registry to configure tests with") do |f|
|
67
|
+
options[:image_registry] = f
|
68
|
+
end
|
65
69
|
end
|
66
70
|
|
67
71
|
# Parse the options
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Red Hat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|