vagrant-openshift 1.0.14 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 220b9c14ff732b5818c03c93531e3f2fe0768f3e
|
4
|
+
data.tar.gz: c7dc50c408ce41605578178e0388921586f9e148
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42a5eb304cbf47c317205d0042c1712b4eaceaa948ccf6afe21ef46888909381442151aadbb4e2f98d32cc83a1e72000a10b0de2143daa50674f3797f8af3781
|
7
|
+
data.tar.gz: 9724c0c61c468573e061571bda546eee8284db2269283a1d4407a9dc9e26be3fb46e5eac30bd4f2b378d582e71aa1ed85d60966326ac83ed9f2e0dadaf2c8575
|
data/README.asciidoc
CHANGED
@@ -88,7 +88,7 @@ you may modify later to match your vagrant requirements:
|
|
88
88
|
|
89
89
|
[source, sh]
|
90
90
|
----
|
91
|
-
$ vagrant origin-init --stage inst --os fedora <instance name>
|
91
|
+
$ vagrant origin-init --stage inst --os (fedora|centos7|rhel7) <instance name>
|
92
92
|
----
|
93
93
|
|
94
94
|
==== Start the machine
|
@@ -97,9 +97,11 @@ $ vagrant origin-init --stage inst --os fedora <instance name>
|
|
97
97
|
|
98
98
|
Running with the default VirtualBox provider:
|
99
99
|
|
100
|
+
NOTE: If you are trying to refresh an existing image, you'll want to remove the current image with `vagrant box list` and `vagrant box remove <box_name>`
|
101
|
+
|
100
102
|
[source, sh]
|
101
103
|
----
|
102
|
-
vagrant up
|
104
|
+
$ vagrant up
|
103
105
|
----
|
104
106
|
|
105
107
|
NOTE: See link:#other-providers[Other Providers] below for launching VMs from other providers.
|
@@ -177,7 +179,7 @@ AWSPrivateKeyPath=<SSH Private key>
|
|
177
179
|
|
178
180
|
[source, sh]
|
179
181
|
----
|
180
|
-
$ vagrant origin-init --stage inst --os fedora <instance name>
|
182
|
+
$ vagrant origin-init --stage inst --os (fedora|centos7|rhel7) <instance name>
|
181
183
|
----
|
182
184
|
|
183
185
|
The instance name will be applied as a tag and should generally be
|
@@ -29,6 +29,14 @@ module Vagrant
|
|
29
29
|
sudo(env[:machine], %{
|
30
30
|
set -x
|
31
31
|
|
32
|
+
#systemctl enable firewalld
|
33
|
+
#systemctl start firewalld
|
34
|
+
#firewall-cmd --permanent --zone=public --add-port=8443/tcp
|
35
|
+
#firewall-cmd --permanent --zone=public --add-port=8444/tcp
|
36
|
+
#firewall-cmd --reload
|
37
|
+
#firewall-cmd --list-all
|
38
|
+
|
39
|
+
|
32
40
|
ORIGIN_PATH=/data/src/github.com/openshift/origin
|
33
41
|
cat > /etc/profile.d/openshift.sh <<DELIM
|
34
42
|
export GOPATH=/data
|
@@ -42,6 +50,20 @@ pushd $ORIGIN_PATH
|
|
42
50
|
hack/install-etcd.sh
|
43
51
|
popd
|
44
52
|
|
53
|
+
HOST=`facter ec2_public_hostname 2>/dev/null | xargs echo -n`
|
54
|
+
if [ -z "$HOST" ]
|
55
|
+
then
|
56
|
+
HOST=`ip -f inet addr show | grep -Po 'inet \K[\d.]+' | grep 10.245 | head -1`
|
57
|
+
if [ -z "$HOST" ]
|
58
|
+
then
|
59
|
+
HOST=`ip -f inet addr show | grep -Po 'inet \K[\d.]+' | grep 10. | head -1`
|
60
|
+
if [ -z "$HOST" ]
|
61
|
+
then
|
62
|
+
HOST=localhost
|
63
|
+
fi
|
64
|
+
fi
|
65
|
+
fi
|
66
|
+
|
45
67
|
cat > /usr/lib/systemd/system/openshift.service <<DELIM
|
46
68
|
[Unit]
|
47
69
|
Description=OpenShift
|
@@ -52,7 +74,7 @@ Documentation=https://github.com/openshift/origin
|
|
52
74
|
[Service]
|
53
75
|
Type=simple
|
54
76
|
EnvironmentFile=-/etc/profile.d/openshift.sh
|
55
|
-
ExecStart=$ORIGIN_PATH/_output/local/go/bin/openshift start --
|
77
|
+
ExecStart=$ORIGIN_PATH/_output/local/go/bin/openshift start --public-master=https://${HOST}:8443
|
56
78
|
|
57
79
|
[Install]
|
58
80
|
WantedBy=multi-user.target
|
@@ -0,0 +1,72 @@
|
|
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
|
+
|
17
|
+
module Vagrant
|
18
|
+
module Openshift
|
19
|
+
module Action
|
20
|
+
class InstallOpenshift3Rhel7
|
21
|
+
include CommandHelper
|
22
|
+
def initialize(app, env)
|
23
|
+
@app = app
|
24
|
+
@env = env
|
25
|
+
end
|
26
|
+
|
27
|
+
def call(env)
|
28
|
+
is_fedora = env[:machine].communicate.test("test -e /etc/fedora-release")
|
29
|
+
is_centos = env[:machine].communicate.test("test -e /etc/centos-release")
|
30
|
+
is_rhel = env[:machine].communicate.test("test -e /etc/redhat-release") && !is_centos && !is_fedora
|
31
|
+
if is_rhel
|
32
|
+
ssh_user = env[:machine].ssh_info[:username]
|
33
|
+
sudo(env[:machine], %{
|
34
|
+
set -x
|
35
|
+
|
36
|
+
# inside temporary directory create docker build context for the new base image
|
37
|
+
contextdir=$(mktemp -d)
|
38
|
+
|
39
|
+
# copy the necessary files
|
40
|
+
mkdir $contextdir/{certs,repos,vars}
|
41
|
+
cp /var/lib/yum/*.pem $contextdir/certs
|
42
|
+
cp /etc/yum/vars/* $contextdir/vars
|
43
|
+
cp /etc/yum.repos.d/* $contextdir/repos
|
44
|
+
|
45
|
+
# create Dockerfile
|
46
|
+
cat <<EOF > $contextdir/Dockerfile
|
47
|
+
FROM rhel7:latest
|
48
|
+
|
49
|
+
RUN yum remove -y subscription-manager
|
50
|
+
|
51
|
+
ADD vars/* /etc/yum/vars/
|
52
|
+
ADD repos/* /etc/yum.repos.d/
|
53
|
+
ADD certs/* /var/lib/yum/
|
54
|
+
|
55
|
+
RUN yum update -y && yum clean all
|
56
|
+
|
57
|
+
EOF
|
58
|
+
|
59
|
+
# make old official image backup and build the new "official"
|
60
|
+
docker tag rhel7:latest rhel7:latest_official
|
61
|
+
docker build --rm -t rhel7:latest $contextdir
|
62
|
+
|
63
|
+
# cleaning
|
64
|
+
rm -rf $contextdir
|
65
|
+
})
|
66
|
+
end
|
67
|
+
@app.call(env)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -35,6 +35,7 @@ module Vagrant
|
|
35
35
|
b.use YumUpdate
|
36
36
|
b.use SetHostName
|
37
37
|
b.use InstallOpenshift3
|
38
|
+
b.use InstallOpenshift3Rhel7
|
38
39
|
b.use InstallOpenshift3AssetDependencies
|
39
40
|
end
|
40
41
|
end
|
@@ -202,6 +203,7 @@ module Vagrant
|
|
202
203
|
autoload :BuildOpenshift3BaseImages, action_root.join("build_openshift3_base_images")
|
203
204
|
autoload :PushOpenshift3Release, action_root.join("push_openshift3_release")
|
204
205
|
autoload :InstallOpenshift3, action_root.join("install_openshift3")
|
206
|
+
autoload :InstallOpenshift3Rhel7, action_root.join("install_openshift3_rhel7")
|
205
207
|
autoload :BuildOpenshift3, action_root.join("build_openshift3")
|
206
208
|
autoload :BuildSti, action_root.join("build_sti")
|
207
209
|
autoload :TryRestartOpenshift3, action_root.join("try_restart_openshift3")
|
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.15
|
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-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/vagrant-openshift/action/install_openshift3_asset_dependencies.rb
|
140
140
|
- lib/vagrant-openshift/action/install_openshift3_base_dependencies.rb
|
141
141
|
- lib/vagrant-openshift/action/install_openshift3_images.rb
|
142
|
+
- lib/vagrant-openshift/action/install_openshift3_rhel7.rb
|
142
143
|
- lib/vagrant-openshift/action/local_openshift3_checkout.rb
|
143
144
|
- lib/vagrant-openshift/action/modify_ami.rb
|
144
145
|
- lib/vagrant-openshift/action/modify_instance.rb
|