vagrant-openshift 1.0.19 → 1.0.20
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/create_yum_repositories.rb +3 -33
- data/lib/vagrant-openshift/action/download_artifacts_openshift3.rb +1 -0
- data/lib/vagrant-openshift/action/install_openshift3.rb +3 -3
- data/lib/vagrant-openshift/action/install_openshift3_base_dependencies.rb +20 -9
- data/lib/vagrant-openshift/action/install_openshift3_rhel7.rb +1 -1
- data/lib/vagrant-openshift/action/install_openshift3_router.rb +1 -1
- data/lib/vagrant-openshift/action/push_openshift3_images.rb +15 -11
- data/lib/vagrant-openshift/action/yum_update.rb +3 -2
- data/lib/vagrant-openshift/config.rb +1 -9
- data/lib/vagrant-openshift/constants.rb +2 -0
- 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: 60035a28df487a9fc63926339b7f19161411cb70
|
|
4
|
+
data.tar.gz: 4ccdb3969ae2604e6eef000a99ddd154bde499e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73f1007e3131c3b4c32b61394282ba9cfeb704ae429ecff80f91e95dfb9f3e7d2491de49619936ffc31d9e982c5f267a9a4ef4df2e579504b5e5bd597b29c0ce
|
|
7
|
+
data.tar.gz: f1c801666864c63cee90ebbbcd2a51067f1c8ef4c57e523d47b1c2feab10f29c968b685f504d6d6d9fd80eb5be3e6a7a38dcb107a70ca08476552b3392a3c417
|
|
@@ -44,43 +44,13 @@ module Vagrant
|
|
|
44
44
|
is_centos = env[:machine].communicate.test("test -e /etc/centos-release")
|
|
45
45
|
is_rhel = env[:machine].communicate.test("test -e /etc/redhat-release") && !is_centos && !is_fedora
|
|
46
46
|
|
|
47
|
-
sudo(env[:machine], "yum
|
|
47
|
+
sudo(env[:machine], "yum -y install deltarpm", {fail_on_error: false})
|
|
48
|
+
sudo(env[:machine], "yum -y install augeas")
|
|
48
49
|
if is_centos
|
|
49
50
|
sudo(env[:machine], "yum install -y centos-release-SCL.x86_64 http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm")
|
|
50
|
-
set_yum_repo(env, "/etc/yum.repos.d/
|
|
51
|
-
set_yum_repo(env, "/etc/yum.repos.d/CentOS-Base.repo", "updates", options.os_updates_repo)
|
|
52
|
-
set_yum_repo(env, "/etc/yum.repos.d/CentOS-Base.repo", "extras", options.os_extras_repo)
|
|
53
|
-
set_yum_repo(env, "/etc/yum.repos.d/epel.repo", "epel", options.optional_repo)
|
|
54
|
-
set_yum_repo(env, "/etc/yum.repos.d/CentOS-SCL.repo", "scl", options.os_scl_repo)
|
|
51
|
+
set_yum_repo(env, "/etc/yum.repos.d/openshift-deps.repo", "openshift", "https://mirror.openshift.com/pub/openshift-v3/dependencies/centos7/x86_64/")
|
|
55
52
|
end
|
|
56
53
|
|
|
57
|
-
if is_rhel
|
|
58
|
-
set_yum_repo(env, "/etc/yum.repos.d/RHEL-Base.repo", "base", options.os_repo)
|
|
59
|
-
set_yum_repo(env, "/etc/yum.repos.d/RHEL-Base.repo", "updates", options.os_updates_repo)
|
|
60
|
-
set_yum_repo(env, "/etc/yum.repos.d/epel.repo", "epel", options.optional_repo)
|
|
61
|
-
set_yum_repo(env, "/etc/yum.repos.d/RHEL-SCL.repo", "scl", options.os_scl_repo)
|
|
62
|
-
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
if is_fedora
|
|
66
|
-
set_yum_repo(env, "/etc/yum.repos.d/fedora.repo", "fedora", options.os_repo)
|
|
67
|
-
set_yum_repo(env, "/etc/yum.repos.d/fedora.repo", "updates", options.os_updates_repo)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
#if options.repos_base == nil
|
|
71
|
-
#if is_fedora
|
|
72
|
-
#options.repos_base = "http://mirror.openshift.com/pub/openshift-origin/nightly/fedora-19/"
|
|
73
|
-
#elsif is_centos or is_rhel
|
|
74
|
-
#options.repos_base = "http://mirror.openshift.com/pub/openshift-origin/nightly/rhel-6/"
|
|
75
|
-
#end
|
|
76
|
-
|
|
77
|
-
#dependencies = "#{options.repos_base}/dependencies/x86_64"
|
|
78
|
-
#else
|
|
79
|
-
#dependencies = "#{options.repos_base}/dependencies/x86_64"
|
|
80
|
-
#end
|
|
81
|
-
|
|
82
|
-
#set_yum_repo(env, "/etc/yum.repos.d/openshift-deps.repo", "openshift-deps", dependencies)
|
|
83
|
-
|
|
84
54
|
sudo(env[:machine], "yum clean all")
|
|
85
55
|
|
|
86
56
|
unless is_fedora
|
|
@@ -41,6 +41,7 @@ module Vagrant
|
|
|
41
41
|
|
|
42
42
|
"/data/src/github.com/openshift/origin/_output/local/releases/" => artifacts_dir + "release/",
|
|
43
43
|
"/data/src/github.com/openshift/origin/assets/test/tmp/screenshots/" => artifacts_dir + "screenshots/",
|
|
44
|
+
"/data/src/github.com/openshift/origin/assets/phantomjsdriver.log" => artifacts_dir + "e2e/phantomjsdriver.log",
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
download_map.each do |source,target|
|
|
@@ -42,7 +42,7 @@ cat > /etc/profile.d/openshift.sh <<DELIM
|
|
|
42
42
|
export GOPATH=/data
|
|
43
43
|
export PATH=$ORIGIN_PATH/_output/etcd/bin:$ORIGIN_PATH/_output/local/go/bin/:$GOPATH/bin:$PATH
|
|
44
44
|
#export KUBERNETES_MASTER=http://localhost:8080
|
|
45
|
-
export
|
|
45
|
+
export OPENSHIFTCONFIG=/openshift.local.config/master/admin.kubeconfig
|
|
46
46
|
DELIM
|
|
47
47
|
|
|
48
48
|
cat > /etc/sysconfig/openshift <<DELIM
|
|
@@ -80,9 +80,9 @@ Documentation=https://github.com/openshift/origin
|
|
|
80
80
|
Type=simple
|
|
81
81
|
EnvironmentFile=-/etc/sysconfig/openshift
|
|
82
82
|
ExecStart=$ORIGIN_PATH/_output/local/go/bin/openshift start --public-master=https://\\${HOST}:8443
|
|
83
|
-
ExecStartPost=/usr/bin/timeout 60 bash -c 'while [ ! -
|
|
83
|
+
ExecStartPost=/usr/bin/timeout 60 bash -c 'while [ ! -f /openshift.local.config/master/admin.kubeconfig ] ; do sleep 1; done'
|
|
84
84
|
ExecStartPost=/bin/sleep 1
|
|
85
|
-
ExecStartPost=/bin/chmod a+r
|
|
85
|
+
ExecStartPost=/bin/chmod a+r /openshift.local.config/master/admin*
|
|
86
86
|
|
|
87
87
|
[Install]
|
|
88
88
|
WantedBy=multi-user.target
|
|
@@ -30,17 +30,17 @@ module Vagrant
|
|
|
30
30
|
# FIXME: Move 'openshift/centos-mongodb' into openshift org and then
|
|
31
31
|
# add the image into 'repositories' constants
|
|
32
32
|
#
|
|
33
|
-
sudo(env[:machine], "yum install -y git fontconfig yum-utils wget make mlocate bind augeas vim docker-io hg bzr libselinux-devel vim tig glibc-static btrfs-progs-devel device-mapper-devel sqlite-devel libnetfilter_queue-devel gcc gcc-c++ e2fsprogs tmux tmux httpie ctags hg xfsprogs rubygems openvswitch bridge-utils bzip2 ntp screen java-1.?.0-openjdk bind-utils socat")
|
|
34
|
-
sudo(env[:machine], "yum install -y facter", {fail_on_error: false})
|
|
33
|
+
sudo(env[:machine], "yum install -y git fontconfig yum-utils wget make mlocate bind augeas vim docker-io hg bzr libselinux-devel vim tig glibc-static btrfs-progs-devel device-mapper-devel sqlite-devel libnetfilter_queue-devel gcc gcc-c++ e2fsprogs tmux tmux httpie ctags hg xfsprogs rubygems openvswitch bridge-utils bzip2 ntp screen java-1.?.0-openjdk bind-utils socat", {:timeout=>60*10})
|
|
34
|
+
sudo(env[:machine], "yum install -y facter", {fail_on_error: false, :timeout=>60*5})
|
|
35
35
|
#
|
|
36
36
|
# FIXME: Need to install golang packages 'after' the 'gcc' is
|
|
37
37
|
# installed. See BZ#1101508
|
|
38
38
|
#
|
|
39
|
-
sudo(env[:machine], "yum install -y golang golang-pkg-linux-amd64 golang-src")
|
|
39
|
+
sudo(env[:machine], "yum install -y golang golang-pkg-linux-amd64 golang-src", {:timeout=>60*5})
|
|
40
40
|
#
|
|
41
41
|
sudo(env[:machine], %{
|
|
42
42
|
|
|
43
|
-
set -
|
|
43
|
+
set -ex
|
|
44
44
|
# TODO Remove me ASAP
|
|
45
45
|
sed -i 's,^SELINUX=.*,SELINUX=permissive,' /etc/selinux/config
|
|
46
46
|
setenforce 0
|
|
@@ -48,11 +48,13 @@ setenforce 0
|
|
|
48
48
|
systemctl enable ntpd
|
|
49
49
|
|
|
50
50
|
groupadd docker
|
|
51
|
-
chown root:docker /var/run/docker.sock
|
|
52
51
|
usermod -a -G docker #{ssh_user}
|
|
53
52
|
|
|
54
|
-
sed -i "s,^OPTIONS='\\(.*\\)',OPTIONS='--insecure-registry=172.30.
|
|
55
|
-
sed -i "s,^OPTIONS=-\\(.*\\),OPTIONS='--insecure-registry=172.30.
|
|
53
|
+
sed -i "s,^OPTIONS='\\(.*\\)',OPTIONS='--insecure-registry=172.30.0.0/16 \\1'," /etc/sysconfig/docker
|
|
54
|
+
sed -i "s,^OPTIONS=-\\(.*\\),OPTIONS='--insecure-registry=172.30.0.0/16 -\\1'," /etc/sysconfig/docker
|
|
55
|
+
|
|
56
|
+
sed -i "s,^ADD_REGISTRY='\\(.*\\)',#ADD_REGISTRY='--add-registry=docker.io \\1'," /etc/sysconfig/docker
|
|
57
|
+
|
|
56
58
|
cat /etc/sysconfig/docker
|
|
57
59
|
|
|
58
60
|
# Force socket reuse
|
|
@@ -61,7 +63,16 @@ echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
|
|
|
61
63
|
mkdir -p /data/src
|
|
62
64
|
mkdir -p /data/pkg
|
|
63
65
|
mkdir -p /data/bin
|
|
64
|
-
|
|
66
|
+
|
|
67
|
+
GO_VERSION=($(go version))
|
|
68
|
+
echo "Detected go version: $(go version)"
|
|
69
|
+
|
|
70
|
+
if [[ ${GO_VERSION[2]} == "go1.4"* ]]; then
|
|
71
|
+
GOPATH=/data go get golang.org/x/tools/cmd/cover
|
|
72
|
+
else
|
|
73
|
+
GOPATH=/data go get code.google.com/p/go.tools/cmd/cover
|
|
74
|
+
fi
|
|
75
|
+
|
|
65
76
|
chown -R #{ssh_user}:#{ssh_user} /data
|
|
66
77
|
|
|
67
78
|
systemctl daemon-reload
|
|
@@ -71,7 +82,7 @@ systemctl start docker
|
|
|
71
82
|
docker pull openshift/docker-registry
|
|
72
83
|
docker pull openshift/origin-sti-builder
|
|
73
84
|
docker pull openshift/origin-deployer
|
|
74
|
-
}, {:timeout=>60*
|
|
85
|
+
}, {:timeout=>60*30})
|
|
75
86
|
@app.call(env)
|
|
76
87
|
end
|
|
77
88
|
end
|
|
@@ -30,7 +30,7 @@ module Vagrant
|
|
|
30
30
|
sudo(env[:machine], '
|
|
31
31
|
ROUTER_EXISTS=$(openshift ex router 2>&1 | grep "does not exist")
|
|
32
32
|
OS_RUNNING=$(systemctl status openshift | grep "(running)")
|
|
33
|
-
CMD="openshift ex router --create --credentials=${
|
|
33
|
+
CMD="openshift ex router --create --credentials=${OPENSHIFTCONFIG}"
|
|
34
34
|
|
|
35
35
|
if [[ $OS_RUNNING ]]; then
|
|
36
36
|
if [[ -n $ROUTER_EXISTS ]]; then
|
|
@@ -39,6 +39,7 @@ systemctl restart docker
|
|
|
39
39
|
|
|
40
40
|
def build_image(image_name, git_ref, repo_url, registry)
|
|
41
41
|
%{
|
|
42
|
+
set -e
|
|
42
43
|
dest_dir="/data/src/github/openshift/#{image_name}"
|
|
43
44
|
rm -rf ${dest_dir}; mkdir -p ${dest_dir}
|
|
44
45
|
if git clone #{repo_url} ${dest_dir}; then
|
|
@@ -48,23 +49,25 @@ if git clone #{repo_url} ${dest_dir}; then
|
|
|
48
49
|
echo "Building #{image_name}:$git_ref"
|
|
49
50
|
|
|
50
51
|
if make build TARGET=centos7; then
|
|
51
|
-
docker tag #{image_name}-centos7 #{registry}#{image_name}-centos7:$git_ref
|
|
52
|
-
docker tag #{image_name}-centos7 #{registry}#{image_name}-centos7:latest
|
|
53
|
-
docker tag #{image_name}-centos7 #{image_name}-centos7:latest
|
|
54
|
-
docker push #{registry}#{image_name}-centos7:$git_ref
|
|
55
|
-
docker push #{registry}#{image_name}-centos7:latest
|
|
56
|
-
docker push #{image_name}-centos7:latest
|
|
52
|
+
docker tag -f #{image_name}-centos7 #{registry}#{image_name}-centos7:$git_ref
|
|
53
|
+
docker tag -f #{image_name}-centos7 #{registry}#{image_name}-centos7:latest
|
|
54
|
+
docker tag -f #{image_name}-centos7 #{image_name}-centos7:latest
|
|
55
|
+
docker push -f #{registry}#{image_name}-centos7:$git_ref
|
|
56
|
+
docker push -f #{registry}#{image_name}-centos7:latest
|
|
57
|
+
docker push -f #{image_name}-centos7:latest
|
|
57
58
|
else
|
|
58
59
|
echo "ERROR: Failed to build #{image_name}-centos7"
|
|
60
|
+
exit 1
|
|
59
61
|
fi
|
|
60
62
|
|
|
61
63
|
if make build TARGET=rhel7; then
|
|
62
|
-
docker tag #{image_name}-rhel7 #{registry}#{image_name}-rhel7:$git_ref
|
|
63
|
-
docker tag #{image_name}-rhel7 #{registry}#{image_name}-rhel7:latest
|
|
64
|
-
docker push #{registry}#{image_name}-rhel7:$git_ref
|
|
65
|
-
docker push #{registry}#{image_name}-rhel7:latest
|
|
64
|
+
docker tag -f #{image_name}-rhel7 #{registry}#{image_name}-rhel7:$git_ref
|
|
65
|
+
docker tag -f #{image_name}-rhel7 #{registry}#{image_name}-rhel7:latest
|
|
66
|
+
docker push -f #{registry}#{image_name}-rhel7:$git_ref
|
|
67
|
+
docker push -f #{registry}#{image_name}-rhel7:latest
|
|
66
68
|
else
|
|
67
69
|
echo "ERROR: Failed to build #{image_name}-rhel7"
|
|
70
|
+
exit 1
|
|
68
71
|
fi
|
|
69
72
|
popd
|
|
70
73
|
fi
|
|
@@ -77,6 +80,7 @@ rm -rf ~/latest_images ; touch ~/latest_images
|
|
|
77
80
|
}
|
|
78
81
|
Vagrant::Openshift::Constants.openshift3_images.each do |name, git_url|
|
|
79
82
|
cmd += %{
|
|
83
|
+
set +e
|
|
80
84
|
git_ref=$(git ls-remote #{git_url} -h refs/heads/master | cut -c1-7)
|
|
81
85
|
curl -s http://#{registry}v1/repositories/#{name}-rhel7/tags/${git_ref} | grep -q "error"
|
|
82
86
|
if [[ "$?" != "0" ]]; then
|
|
@@ -114,7 +118,7 @@ docker pull #{@options[:registry]}openshift/base-rhel7
|
|
|
114
118
|
name, git_ref = image.split(':')
|
|
115
119
|
repo_url = Vagrant::Openshift::Constants.openshift3_images[name]
|
|
116
120
|
if repo_url == nil
|
|
117
|
-
puts "
|
|
121
|
+
puts "Unregistered image: #{name}, skipping"
|
|
118
122
|
next
|
|
119
123
|
end
|
|
120
124
|
cmd += build_image(name, git_ref, repo_url, @options[:registry])
|
|
@@ -27,8 +27,9 @@ module Vagrant
|
|
|
27
27
|
|
|
28
28
|
def call(env)
|
|
29
29
|
sudo env[:machine], "rm -rf /etc/yum.repos.d/openshift-origin.repo"
|
|
30
|
-
sudo env[:machine], "yum clean all
|
|
30
|
+
sudo env[:machine], "yum clean all"
|
|
31
31
|
sudo env[:machine], "yum -y update --skip-broken --exclude=kernel*", {fail_on_error: false, :timeout=>60*10}
|
|
32
|
+
sudo env[:machine], "yum list installed"
|
|
32
33
|
|
|
33
34
|
env[:machine].ui.warn "Increasing YUM cache timeout to 9999999. You will need manually clear cache to get additional updates."
|
|
34
35
|
remote_write(env[:machine], "/etc/yum.conf") {
|
|
@@ -64,4 +65,4 @@ metadata_expire=9999999
|
|
|
64
65
|
end
|
|
65
66
|
end
|
|
66
67
|
end
|
|
67
|
-
end
|
|
68
|
+
end
|
|
@@ -17,26 +17,18 @@
|
|
|
17
17
|
module Vagrant
|
|
18
18
|
module Openshift
|
|
19
19
|
class Config < Vagrant.plugin(2, :config)
|
|
20
|
-
attr_accessor :cloud_domain
|
|
21
|
-
:optional_repo, :os_extras_repo, :os_scl_repo
|
|
20
|
+
attr_accessor :cloud_domain
|
|
22
21
|
|
|
23
22
|
def initialize
|
|
24
23
|
super
|
|
25
24
|
|
|
26
25
|
@cloud_domain = UNSET_VALUE
|
|
27
|
-
@repos_base = UNSET_VALUE
|
|
28
|
-
@os_repo = nil
|
|
29
|
-
@os_updates_repo = nil
|
|
30
|
-
@os_extras_repo = nil
|
|
31
|
-
@optional_repo = nil
|
|
32
|
-
@os_scl_repo = nil
|
|
33
26
|
end
|
|
34
27
|
|
|
35
28
|
def finalize!
|
|
36
29
|
super
|
|
37
30
|
|
|
38
31
|
@cloud_domain = "example.com" if @cloud_domain == UNSET_VALUE
|
|
39
|
-
@repos_base = nil if @repos_base == UNSET_VALUE
|
|
40
32
|
end
|
|
41
33
|
end
|
|
42
34
|
end
|
|
@@ -35,6 +35,8 @@ module Vagrant
|
|
|
35
35
|
'openshift/base' => 'https://github.com/openshift/sti-base.git',
|
|
36
36
|
'openshift/ruby-20' => 'https://github.com/openshift/sti-ruby.git',
|
|
37
37
|
'openshift/nodejs-010' => 'https://github.com/openshift/sti-nodejs.git',
|
|
38
|
+
'openshift/python-33' => 'https://github.com/openshift/sti-python.git',
|
|
39
|
+
'openshift/perl-516' => 'https://github.com/openshift/sti-perl.git',
|
|
38
40
|
'openshift/mysql-55' => 'https://github.com/openshift/mysql.git',
|
|
39
41
|
'openshift/mongodb-24' => 'https://github.com/openshift/mongodb.git',
|
|
40
42
|
'openshift/postgresql-92' => 'https://github.com/openshift/postgresql.git'
|
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: 1.0.
|
|
4
|
+
version: 1.0.20
|
|
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-
|
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|