vagrant-openshift 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -3
- data/README.asciidoc +160 -97
- data/lib/vagrant-openshift/action.rb +1 -2
- data/lib/vagrant-openshift/action/create_yum_repositories.rb +12 -14
- data/lib/vagrant-openshift/action/generate_template.rb +24 -18
- data/lib/vagrant-openshift/action/install_openshift3_base_dependencies.rb +5 -2
- data/lib/vagrant-openshift/action/yum_update.rb +1 -1
- data/lib/vagrant-openshift/command/repo_sync_openshift3.rb +10 -6
- data/lib/vagrant-openshift/templates/command/init-openshift/box_info.yaml +70 -59
- 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: 4863ea5fa2533091ea88ff8c594c145177acf841
|
4
|
+
data.tar.gz: b695616624ee67a2787520e8eddfe0ce0babd5a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8a8eee284d4516b34687914d0a42a3377fa8ce784fff1fe5a5a334fc51d3b824d19044d6efb0deedc212254ad0245572bde50a5072a2fb62abd84ce1a9cb908
|
7
|
+
data.tar.gz: 8e283dd6c6cfd007b19fa28c55c67947b085b7b8e0a91acf20c15175f4bc10e03b40394ed5b9cb15129d2b84d449c650317d36d7503ad1cd71956722c47d1a2b
|
data/.gitignore
CHANGED
data/README.asciidoc
CHANGED
@@ -1,19 +1,33 @@
|
|
1
1
|
== OpenShift Origin Build Tools
|
2
2
|
|
3
|
-
This is a link:http://www.vagrantup.com[Vagrant] 1.2+ plugin that adds
|
3
|
+
This is a link:http://www.vagrantup.com[Vagrant] 1.2+ plugin that adds vagrant commands and provisioners to
|
4
4
|
build and test link:http://openshift.github.io[OpenShift Origin].
|
5
5
|
|
6
|
-
NOTE: This plugin requires Vagrant 1.2+
|
6
|
+
NOTE: This plugin requires link:https://www.vagrantup.com/downloads.html[Vagrant 1.2+]
|
7
|
+
|
8
|
+
NOTE: Instructions below generally assume a Linux-like command line and may require modifications for other environments.
|
7
9
|
|
8
10
|
=== Features
|
9
11
|
|
10
|
-
* Compatible with VMs run via link:https://www.virtualbox.org[VirtualBox], link:https://github.com/mitchellh/vagrant-aws[AWS]
|
12
|
+
* Compatible with VMs run via link:https://www.virtualbox.org[VirtualBox], link:https://github.com/mitchellh/vagrant-aws[AWS],
|
13
|
+
link:https://github.com/pradels/vagrant-libvirt[libvirt], link:https://github.com/cloudbau/vagrant-openstack-plugin[OpenStack],
|
11
14
|
or link:https://github.com/tknerr/vagrant-managed-servers[managed] providers.
|
12
15
|
* Provides commands to install build dependencies, sync repositories, and run tests
|
13
16
|
|
17
|
+
===== Using with Openshift v2
|
18
|
+
|
19
|
+
v2 (aka M4) is no longer supported on the master branch or in the
|
20
|
+
published rubygems.org version of this plugin. You must checkout the
|
21
|
+
link:https://github.com/openshift/vagrant-openshift/tree/v2[v2 branch of this repository]
|
22
|
+
in order to use the plugin with v2 and follow the documentation there.
|
23
|
+
|
14
24
|
=== Installing
|
15
25
|
|
16
|
-
|
26
|
+
Like other plugins, this gem will be installed in your `~/.vagrant.d/gems/` directory.
|
27
|
+
|
28
|
+
===== From source
|
29
|
+
|
30
|
+
To work on the *vagrant-openshift* plugin, clone this repository and use
|
17
31
|
link:http://gembundler.com[Bundler] to get the dependencies:
|
18
32
|
|
19
33
|
[source, sh]
|
@@ -21,65 +35,92 @@ link:http://gembundler.com[Bundler] to get the dependencies:
|
|
21
35
|
$ bundle
|
22
36
|
----
|
23
37
|
|
24
|
-
|
38
|
+
Compile and install using Rake:
|
39
|
+
|
40
|
+
[source, sh]
|
25
41
|
----
|
26
|
-
$ vagrant
|
42
|
+
$ rake vagrant:install
|
27
43
|
----
|
28
44
|
|
29
|
-
|
45
|
+
===== From rubygems.org
|
46
|
+
|
47
|
+
Install the published version of this plugin:
|
30
48
|
|
31
49
|
[source, sh]
|
32
50
|
----
|
33
|
-
$
|
51
|
+
$ vagrant plugin install vagrant-openshift
|
34
52
|
----
|
35
53
|
|
36
54
|
=== Getting started with Openshift v3
|
37
55
|
|
56
|
+
This plugin works in concert with the
|
57
|
+
link:https://github.com/openshift/origin/blob/master/Vagrantfile[OpenShift Origin Vagrantfile]
|
58
|
+
to build and update OpenShift v3 development environments.
|
59
|
+
|
38
60
|
==== Clone the OpenShift Origin repositories
|
39
61
|
|
62
|
+
The upstream OpenShift Origin projects will be git-cloned locally
|
63
|
+
under your GOPATH (you don't need to have golang or other build
|
64
|
+
requirements installed locally). These will be set as the git "upstream"
|
65
|
+
remote. Projects you have forked into your github account will also have
|
66
|
+
that account as the git "origin" remote.
|
67
|
+
|
68
|
+
Add your GOPATH if you don't already have one for golang:
|
40
69
|
[source, sh]
|
41
70
|
----
|
42
71
|
$ echo "export GOPATH=~/code" >> ~/.bash_profile # ~/code can be any dir
|
43
72
|
$ source ~/.bash_profile
|
73
|
+
$ mkdir -p $GOPATH
|
74
|
+
----
|
75
|
+
|
76
|
+
Then clone the repositories into your GOPATH.
|
77
|
+
[source, sh]
|
78
|
+
----
|
44
79
|
$ cd $GOPATH
|
45
80
|
$ vagrant openshift3-local-checkout -u <github username>
|
46
81
|
$ cd src/github.com/openshift/origin
|
47
82
|
----
|
48
83
|
|
84
|
+
==== Initialize local vagrant conf
|
49
85
|
|
50
|
-
|
51
|
-
|
52
|
-
Generate a .vagrant-openshift.json it to match your requirements:
|
86
|
+
Generate a `.vagrant-openshift.json` in your OpenShift Origin repo that
|
87
|
+
you may modify later to match your vagrant requirements:
|
53
88
|
|
54
89
|
[source, sh]
|
55
90
|
----
|
56
91
|
$ vagrant origin-init --stage inst --os fedora <instance name>
|
57
92
|
----
|
58
93
|
|
59
|
-
|
60
94
|
==== Start the machine
|
61
95
|
|
62
96
|
===== VirtualBox
|
63
97
|
|
64
|
-
Running with the default VirtualBox provider
|
98
|
+
Running with the default VirtualBox provider:
|
65
99
|
|
66
100
|
[source, sh]
|
67
101
|
----
|
68
102
|
vagrant up
|
69
103
|
----
|
70
104
|
|
71
|
-
|
105
|
+
NOTE: See link:#other-providers[Other Providers] below for launching VMs from other providers.
|
72
106
|
|
73
107
|
|
74
108
|
==== Making Subsequent Changes
|
75
109
|
|
76
|
-
*
|
110
|
+
* Building updated code from edits in your local repository clones:
|
77
111
|
|
78
112
|
[source, sh]
|
79
113
|
----
|
80
114
|
$ vagrant sync-openshift3
|
81
115
|
----
|
82
116
|
|
117
|
+
For some providers, your local repositories are automatically synchronized
|
118
|
+
to the remote VM. If not, the `--source` option can be used to do so
|
119
|
+
before building.
|
120
|
+
|
121
|
+
In addition to the OpenShift binary itself, by default a number of
|
122
|
+
component Docker images are built as well, which can take a long time. To
|
123
|
+
rebuild only the OpenShift binary, use the `--no-images` option.
|
83
124
|
|
84
125
|
==== Running Tests
|
85
126
|
|
@@ -89,104 +130,110 @@ $ vagrant test-openshift3 --all
|
|
89
130
|
----
|
90
131
|
|
91
132
|
|
92
|
-
===
|
133
|
+
=== Developer environment
|
93
134
|
|
94
|
-
|
135
|
+
To enable easy customization of the build environment, any files placed under '\~/.openshiftdev/home.d' will be copied to
|
136
|
+
the vagrant user home directory. For example: '~/.openshiftdev/home.d/.bash_profile' will be copied to '.bash_profile'
|
137
|
+
on the vagrant VM.
|
95
138
|
|
96
|
-
==== Clone the OpenShift Origin repositories
|
97
139
|
|
98
|
-
|
99
|
-
----
|
100
|
-
$ vagrant openshift2-local-checkout -u <github username>
|
101
|
-
----
|
140
|
+
=== Other Providers
|
102
141
|
|
103
|
-
|
142
|
+
Your origin repo Vagrantfile can use other providers than the default
|
143
|
+
VirtualBox provider for creating VMs. Provider configuration consults
|
144
|
+
outside configuration files so that the repository Vagrantfile does not
|
145
|
+
have to be modified in most cases. See the relevant provider section in
|
146
|
+
the Vagrantfile to learn what parameters are available.
|
104
147
|
|
105
|
-
|
148
|
+
If you are starting with a plain operating system host image (which is
|
149
|
+
likely to be the case) then you have a bit of setup to do to prepare
|
150
|
+
your host for building and running after creation. Consult the
|
151
|
+
link:#initial-setup[Initial Setup] section for details.
|
106
152
|
|
107
|
-
====
|
153
|
+
==== AWS/EC2
|
108
154
|
|
109
|
-
|
155
|
+
* Install the latest vagrant-aws plugin.
|
110
156
|
|
111
|
-
|
157
|
+
Install plugin from rubygems:
|
112
158
|
----
|
113
|
-
$ vagrant
|
159
|
+
$ vagrant plugin install vagrant-aws
|
114
160
|
----
|
115
161
|
|
116
|
-
|
162
|
+
Or follow the link:https://github.com/mitchellh/vagrant-aws/blob/master/README.md#development[build steps] to build from source.
|
117
163
|
|
118
|
-
|
164
|
+
You now need some AWS-specific configuration to specify which AMI to use.
|
119
165
|
|
120
|
-
|
166
|
+
* Ensure your AWS credentials file is present at `~/.awscred`; it should have the following entries filled in:
|
121
167
|
|
122
|
-
|
168
|
+
.'~/.awscred'
|
123
169
|
----
|
124
|
-
|
170
|
+
AWSAccessKeyId=<AWS API Key>
|
171
|
+
AWSSecretKey=<AWS API Secret>
|
172
|
+
AWSKeyPairName=<Keypair name>
|
173
|
+
AWSPrivateKeyPath=<SSH Private key>
|
125
174
|
----
|
126
175
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
==== Making Subsequent Changes
|
131
|
-
|
132
|
-
* Syncing and building code from local repository clones
|
176
|
+
* Re-create your `.vagrant-openshift.json` file with updated AWS settings:
|
133
177
|
|
134
178
|
[source, sh]
|
135
179
|
----
|
136
|
-
$ vagrant
|
180
|
+
$ vagrant origin-init --stage inst --os fedora <instance name>
|
137
181
|
----
|
138
182
|
|
183
|
+
The instance name will be applied as a tag and should generally be
|
184
|
+
specific to you and OpenShift so that you can identify the VM among any
|
185
|
+
others in your account. It will be stored in the config file.
|
139
186
|
|
140
|
-
|
187
|
+
The Red Hat OpenShift team shares an account that provides pre-built
|
188
|
+
AMIs for the quickest startup possible, so this command will search for
|
189
|
+
the latest version of that AMI. If your account doesn't have this AMI, you'll need to supply
|
190
|
+
a base AMI in your repository's `.vagrant-openshift.json` file under the
|
191
|
+
`aws.ami` key.
|
192
|
+
|
193
|
+
* Start the AWS machine
|
141
194
|
|
142
195
|
[source, sh]
|
143
196
|
----
|
144
|
-
|
197
|
+
vagrant up --provider=aws
|
145
198
|
----
|
146
199
|
|
200
|
+
NOTE: Requires latest link:https://github.com/mitchellh/vagrant-aws[AWS] provider.
|
147
201
|
|
148
|
-
|
149
|
-
|
150
|
-
==== Other Environments
|
202
|
+
NOTE: You can use the link:https://github.com/mikery/vagrant-ami[Vagrant-AMI] plugin to create an AMI from a running AWS machine.
|
151
203
|
|
152
|
-
===== AWS/EC2
|
153
204
|
|
154
|
-
|
205
|
+
==== OpenStack
|
155
206
|
|
156
|
-
*
|
207
|
+
* Install the latest vagrant-openstack-plugin. See: https://github.com/cloudbau/vagrant-openstack-plugin.
|
157
208
|
|
209
|
+
Install plugin from rubygems:
|
158
210
|
----
|
159
|
-
|
160
|
-
aws.secret_access_key = "<API SECRET>"
|
161
|
-
aws.keypair_name = "<SSH KEY NAME>"
|
162
|
-
override.ssh.private_key_path = "<PRIVATE KEY FILE>"
|
211
|
+
$ vagrant plugin install vagrant-openstack-plugin
|
163
212
|
----
|
164
213
|
|
165
|
-
*
|
214
|
+
* Edit `~/.openstackcred` and update your OpenStack credentials, endpoint and tenant name.
|
166
215
|
|
167
|
-
|
216
|
+
.'~/.openstackcred'
|
168
217
|
----
|
169
|
-
|
218
|
+
OSEndpoint=<OpenStack Endpoint URL>
|
219
|
+
OSUsername=<OpenStack Username>
|
220
|
+
OSAPIKey=<OpenStack Password>
|
221
|
+
OSKeyPairName=<Keypair name>
|
222
|
+
OSPrivateKeyPath=<SSH Private key path>
|
223
|
+
OSTenant=<OpenStack Tenant Name>
|
170
224
|
----
|
171
225
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
===== OpenStack
|
178
|
-
|
179
|
-
* Install the latest vagrant-openstack-plugin. See: https://github.com/cloudbau/vagrant-openstack-plugin.
|
180
|
-
|
181
|
-
* Edit the Vagrantfile and update your OpenStack credentials, endpoint and tenant (They can be read automatically from ~/.openstackcred).
|
226
|
+
* Edit `.vagrant-openshift.json` and update the openstack provider
|
227
|
+
section. You'll need to indicate at least the base image and host flavor
|
228
|
+
you'd like to start, as well as the user to access with.
|
182
229
|
|
230
|
+
.'.vagrant-openshift.json'
|
183
231
|
----
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
override.ssh.private_key_path = "<PRIVATE KEY FILE>"
|
232
|
+
"openstack": {
|
233
|
+
"image": "Fedora-Cloud-Base-20141203-21.x86_64",
|
234
|
+
"flavor": "m1.small",
|
235
|
+
"ssh_user": "fedora"
|
236
|
+
}
|
190
237
|
----
|
191
238
|
|
192
239
|
* Start the OpenStack machine
|
@@ -199,7 +246,7 @@ vagrant up --provider=openstack
|
|
199
246
|
NOTE: Requires latest link:https://github.com/cloudbau/vagrant-openstack-plugin[OpenStack] provider.
|
200
247
|
|
201
248
|
|
202
|
-
|
249
|
+
==== LibVirt
|
203
250
|
|
204
251
|
* Install the vagrant-libvirt plugin dependencies
|
205
252
|
|
@@ -215,6 +262,14 @@ yum install libxslt-devel libxml2-devel libvirt-devel
|
|
215
262
|
vagrant plugin install vagrant-libvirt
|
216
263
|
----
|
217
264
|
|
265
|
+
NOTE: This may require modifying the system linker as described in
|
266
|
+
link:https://github.com/mitchellh/vagrant/issues/5118[this issue]:
|
267
|
+
|
268
|
+
----
|
269
|
+
# alternatives --set ld /usr/bin/ld.gold
|
270
|
+
----
|
271
|
+
|
272
|
+
|
218
273
|
* Configure LibVirt to allow remote TLS connections
|
219
274
|
** Create TLS certificates and key pairs. Follow the guide at http://libvirt.org/remote.html#Remote_certificates
|
220
275
|
Example commands for creating a self signed certificate are provided below.
|
@@ -320,46 +375,54 @@ vagrant up --provider=managed
|
|
320
375
|
|
321
376
|
NOTE: Requires latest link:https://github.com/tknerr/vagrant-managed-servers[Managed] provider
|
322
377
|
|
323
|
-
===
|
378
|
+
=== Initial Setup
|
324
379
|
|
325
|
-
|
326
|
-
|
327
|
-
|
380
|
+
Ideally you would be able to use an image with the operating system,
|
381
|
+
dependencies, and OpenShift already installed so you can just start
|
382
|
+
hacking. But at this time that is not available for all providers.
|
328
383
|
|
329
|
-
|
384
|
+
Images may be thought of as being at one of three stages:
|
330
385
|
|
331
|
-
|
332
|
-
|
386
|
+
1. "os" - The base OS image (use a "minimal" one).
|
387
|
+
2. "deps" - OpenShift runtime dependencies and build requirements are installed.
|
388
|
+
3. "inst" - OpenShift code, images, and binaries are built and installed
|
333
389
|
|
334
|
-
|
390
|
+
You may want to create images that snapshot the output at each of
|
391
|
+
these stages, as the rate of change and amount of time to create each
|
392
|
+
is different.
|
393
|
+
|
394
|
+
After using `vagrant up --provider=<provider>` to start a host with only
|
395
|
+
a basic operating system on it (Fedora 20+ or CentOS 7 should suffice),
|
396
|
+
you will need to install the build tools and other dependencies for
|
397
|
+
building and running OpenShift. The following vagrant commands should
|
398
|
+
help with this:
|
335
399
|
|
336
|
-
.'~/.awscred'
|
337
400
|
----
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
AWSPrivateKeyPath=<SSH Private key>
|
401
|
+
$ vagrant build-openshift3-base
|
402
|
+
$ vagrant build-openshift3-base-images
|
403
|
+
$ vagrant install-openshift3-assets-base
|
342
404
|
----
|
343
405
|
|
406
|
+
Given this base foundation, you may want to `vagrant package` the result before proceeding to install OpenShift code.
|
344
407
|
|
345
|
-
|
408
|
+
----
|
409
|
+
$ vagrant install-openshift3
|
410
|
+
$ vagrant build-openshift3-base-images # pick up updates if older "deps" base reused
|
411
|
+
$ vagrant build-openshift3 --images
|
412
|
+
$ vagrant build-sti --binary-only
|
413
|
+
----
|
346
414
|
|
347
|
-
|
348
|
-
specify your credentials in the '~/.openstackcred' file and it will be automatically added to the Vagrantfile.
|
415
|
+
You may again wish to package this in order to reuse.
|
349
416
|
|
350
|
-
|
417
|
+
If your provider is not set up to automatically sync changes from a local,
|
418
|
+
you may do the following to get the host prepared for a git-based sync
|
419
|
+
and then use that:
|
351
420
|
|
352
|
-
.'~/.openstackcred'
|
353
421
|
----
|
354
|
-
|
355
|
-
|
356
|
-
OSAPIKey=<OpenStack Password>
|
357
|
-
OSKeyPairName=<Keypair name >
|
358
|
-
OSPrivateKeyPath=<SSH Private key path>
|
359
|
-
OSTenant=<OpenStack Tenant Name>
|
422
|
+
$ vagrant clone-upstream-repos # and then to git sync and build:
|
423
|
+
$ vagrant sync-openshift3 -s
|
360
424
|
----
|
361
425
|
|
362
|
-
|
363
426
|
== Notice of Export Control Law
|
364
427
|
|
365
428
|
This software distribution includes cryptographic software that is subject to the U.S. Export Administration Regulations (the "*EAR*") and other U.S. and foreign laws and may not be exported, re-exported or transferred (a) to any country listed in Country Group E:1 in Supplement No. 1 to part 740 of the EAR (currently, Cuba, Iran, North Korea, Sudan & Syria); (b) to any prohibited destination or to any end user who has been prohibited from participating in U.S. export transactions by any federal agency of the U.S. government; or (c) for use in connection with the design, development or production of nuclear, chemical or biological weapons, or rocket systems, space launch vehicles, or sounding rockets, or unmanned air vehicle systems.You may not download this software or technical information if you are located in one of these countries or otherwise subject to these restrictions. You may not provide this software or technical information to individuals or entities located in one of these countries or otherwise subject to these restrictions. You are also responsible for compliance with foreign law requirements applicable to the import, export and use of this software and technical information.
|
@@ -32,7 +32,6 @@ module Vagrant
|
|
32
32
|
|
33
33
|
def self.install_openshift3(options)
|
34
34
|
Vagrant::Action::Builder.new.tap do |b|
|
35
|
-
b.use CreateYumRepositories
|
36
35
|
b.use YumUpdate
|
37
36
|
b.use SetHostName
|
38
37
|
b.use InstallOpenshift3
|
@@ -82,7 +81,7 @@ module Vagrant
|
|
82
81
|
b.use CheckoutRepositories
|
83
82
|
b.use InstallOpenshift3AssetDependencies
|
84
83
|
end
|
85
|
-
|
84
|
+
if options[:build]
|
86
85
|
b.use(BuildOpenshift3BaseImages, options) if options[:images]
|
87
86
|
b.use(BuildOpenshift3, options)
|
88
87
|
b.use(TryRestartOpenshift3)
|
@@ -46,7 +46,7 @@ module Vagrant
|
|
46
46
|
|
47
47
|
sudo(env[:machine], "yum install -y augeas")
|
48
48
|
if is_centos
|
49
|
-
sudo(env[:machine], "yum install -y centos-release-SCL.x86_64 http://dl.fedoraproject.org/pub/epel/
|
49
|
+
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
50
|
set_yum_repo(env, "/etc/yum.repos.d/CentOS-Base.repo", "base", options.os_repo)
|
51
51
|
set_yum_repo(env, "/etc/yum.repos.d/CentOS-Base.repo", "updates", options.os_updates_repo)
|
52
52
|
set_yum_repo(env, "/etc/yum.repos.d/CentOS-Base.repo", "extras", options.os_extras_repo)
|
@@ -67,21 +67,19 @@ module Vagrant
|
|
67
67
|
set_yum_repo(env, "/etc/yum.repos.d/fedora.repo", "updates", options.os_updates_repo)
|
68
68
|
end
|
69
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
|
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
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
dependencies = "#{options.repos_base}/dependencies/x86_64"
|
82
|
-
end
|
77
|
+
#dependencies = "#{options.repos_base}/dependencies/x86_64"
|
78
|
+
#else
|
79
|
+
#dependencies = "#{options.repos_base}/dependencies/x86_64"
|
80
|
+
#end
|
83
81
|
|
84
|
-
set_yum_repo(env, "/etc/yum.repos.d/openshift-deps.repo", "openshift-deps", dependencies)
|
82
|
+
#set_yum_repo(env, "/etc/yum.repos.d/openshift-deps.repo", "openshift-deps", dependencies)
|
85
83
|
|
86
84
|
sudo(env[:machine], "yum clean all")
|
87
85
|
|
@@ -62,30 +62,36 @@ module Vagrant
|
|
62
62
|
'instance_name' => box_info[:instance_name],
|
63
63
|
'os' => os,
|
64
64
|
'dev_cluster' => false,
|
65
|
+
'insert_key' => (stage == :inst),
|
65
66
|
'num_minions' => 2,
|
66
67
|
'cpus' => 2,
|
67
68
|
'memory' => 1024,
|
68
69
|
'rebuild_yum_cache' => false,
|
69
70
|
'sync_to' => '/data/src',
|
70
|
-
'sync_from' => "#{gopath}/src"
|
71
|
-
'virtualbox' => {
|
72
|
-
'box_name' => box_info[:virtualbox][:box_name],
|
73
|
-
'box_url' => box_info[:virtualbox][:box_url]
|
74
|
-
},
|
75
|
-
'vmware' => {
|
76
|
-
'box_name' => box_info[:vmware][:box_name],
|
77
|
-
'box_url' => box_info[:vmware][:box_url]
|
78
|
-
},
|
79
|
-
'libvirt' => {
|
80
|
-
'box_name' => box_info[:libvirt][:box_name],
|
81
|
-
'box_url' => box_info[:libvirt][:box_url]
|
82
|
-
},
|
83
|
-
'aws' => {
|
84
|
-
'ami' => box_info[:aws][:ami],
|
85
|
-
'ami_region' => box_info[:aws][:ami_region],
|
86
|
-
'ssh_user' => box_info[:aws][:ssh_user]
|
87
|
-
}
|
71
|
+
'sync_from' => "#{gopath}/src"
|
88
72
|
}
|
73
|
+
vagrant_openshift_config['virtualbox'] = {
|
74
|
+
'box_name' => box_info[:virtualbox][:box_name],
|
75
|
+
'box_url' => box_info[:virtualbox][:box_url]
|
76
|
+
} if box_info[:virtualbox]
|
77
|
+
vagrant_openshift_config['vmware'] = {
|
78
|
+
'box_name' => box_info[:vmware][:box_name],
|
79
|
+
'box_url' => box_info[:vmware][:box_url]
|
80
|
+
} if box_info[:vmware]
|
81
|
+
vagrant_openshift_config['libvirt'] = {
|
82
|
+
'box_name' => box_info[:libvirt][:box_name],
|
83
|
+
'box_url' => box_info[:libvirt][:box_url]
|
84
|
+
} if box_info[:libvirt]
|
85
|
+
vagrant_openshift_config['aws'] = {
|
86
|
+
'ami' => box_info[:aws][:ami],
|
87
|
+
'ami_region' => box_info[:aws][:ami_region],
|
88
|
+
'ssh_user' => box_info[:aws][:ssh_user]
|
89
|
+
} if box_info[:aws]
|
90
|
+
vagrant_openshift_config['openstack'] = {
|
91
|
+
'image' => box_info[:openstack][:image],
|
92
|
+
'flavor' => box_info[:openstack][:flavor],
|
93
|
+
'ssh_user' => box_info[:openstack][:ssh_user]
|
94
|
+
} if box_info[:openstack]
|
89
95
|
|
90
96
|
File.open(".vagrant-openshift.json","w") do |f|
|
91
97
|
f.write(JSON.pretty_generate(vagrant_openshift_config))
|
@@ -30,7 +30,7 @@ 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
|
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")
|
34
34
|
#
|
35
35
|
# FIXME: Need to install golang packages 'after' the 'gcc' is
|
36
36
|
# installed. See BZ#1101508
|
@@ -47,12 +47,15 @@ setenforce 0
|
|
47
47
|
usermod -a -G docker #{ssh_user}
|
48
48
|
|
49
49
|
sed -i "s,^OPTIONS='\\(.*\\)',OPTIONS='--insecure-registry=172.30.17.0/24 \\1'," /etc/sysconfig/docker
|
50
|
+
sed -i "s,^OPTIONS=-\\(.*\\),OPTIONS='--insecure-registry=172.30.17.0/24 -\\1'," /etc/sysconfig/docker
|
50
51
|
cat /etc/sysconfig/docker
|
51
52
|
|
52
53
|
# Force socket reuse
|
53
54
|
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
|
54
55
|
|
55
|
-
mkdir /data
|
56
|
+
mkdir -p /data/src
|
57
|
+
mkdir -p /data/pkg
|
58
|
+
mkdir -p /data/bin
|
56
59
|
GOPATH=/data go get code.google.com/p/go.tools/cmd/cover
|
57
60
|
chown -R #{ssh_user}:#{ssh_user} /data
|
58
61
|
|
@@ -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 --exclude=kernel*", {
|
31
|
+
sudo env[:machine], "yum -y update --skip-broken --exclude=kernel*", {fail_on_error: false, :timeout=>60*10}
|
32
32
|
|
33
33
|
env[:machine].ui.warn "Increasing YUM cache timeout to 9999999. You will need manually clear cache to get additional updates."
|
34
34
|
remote_write(env[:machine], "/etc/yum.conf") {
|
@@ -28,7 +28,7 @@ module Vagrant
|
|
28
28
|
def execute
|
29
29
|
options = {}
|
30
30
|
options[:images] = true
|
31
|
-
options[:
|
31
|
+
options[:build] = true
|
32
32
|
options[:clean] = false
|
33
33
|
options[:source] = false
|
34
34
|
|
@@ -36,16 +36,20 @@ module Vagrant
|
|
36
36
|
o.banner = "Usage: vagrant sync-openshift3 [vm-name]"
|
37
37
|
o.separator ""
|
38
38
|
|
39
|
-
o.on("-c", "--clean", "Delete existing repo before syncing") do |f|
|
40
|
-
options[:clean] = f
|
41
|
-
end
|
42
|
-
|
43
39
|
o.on("-s", "--source", "Sync the source (not required if using synced folders)") do |f|
|
44
40
|
options[:source] = f
|
45
41
|
end
|
46
42
|
|
43
|
+
o.on("-c", "--clean", "Delete existing repo before syncing source") do |f|
|
44
|
+
options[:clean] = f
|
45
|
+
end
|
46
|
+
|
47
47
|
o.on("--dont-install", "Don't build and install updated source") do |f|
|
48
|
-
options[:
|
48
|
+
options[:build] = false
|
49
|
+
end
|
50
|
+
|
51
|
+
o.on("--no-images", "Don't build updated component Docker images") do |f|
|
52
|
+
options[:images] = false
|
49
53
|
end
|
50
54
|
|
51
55
|
end
|
@@ -2,40 +2,47 @@
|
|
2
2
|
:centos7:
|
3
3
|
:os:
|
4
4
|
:virtualbox:
|
5
|
-
:box_name:
|
6
|
-
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/
|
7
|
-
:
|
8
|
-
:box_name:
|
9
|
-
:box_url:
|
5
|
+
:box_name: centos7_base
|
6
|
+
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/openshift3/centos7_virtualbox_os.box
|
7
|
+
:libvirt:
|
8
|
+
:box_name: centos7_base
|
9
|
+
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/openshift3/centos7_libvirt_os.box
|
10
10
|
:aws:
|
11
11
|
:ami: <AMI_ID>
|
12
12
|
:ami_region: us-east-1
|
13
13
|
:ssh_user: centos
|
14
|
-
:machine_name:
|
14
|
+
:machine_name: openshift-centos7
|
15
15
|
:ebs_volume_size: 25
|
16
16
|
:ami_tag_prefix: openshift-centos7_
|
17
|
+
:openstack:
|
18
|
+
:image: <CentOS 7>
|
19
|
+
:flavor: m1.small
|
20
|
+
:ssh_user: centos
|
17
21
|
:deps:
|
18
22
|
:virtualbox:
|
19
|
-
:box_name:
|
20
|
-
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/
|
21
|
-
:
|
22
|
-
:box_name:
|
23
|
-
:box_url:
|
23
|
+
:box_name: centos7_deps
|
24
|
+
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/openshift3/centos7_virtualbox_deps.box
|
25
|
+
:libvirt:
|
26
|
+
:box_name: centos7_base
|
27
|
+
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/openshift3/centos7_libvirt_deps.box
|
24
28
|
:aws:
|
25
29
|
:ami: <AMI_ID>
|
26
|
-
:ami_tag_prefix: origin-centos-7-deps_
|
27
30
|
:ami_region: us-east-1
|
28
31
|
:ssh_user: centos
|
29
|
-
:machine_name:
|
32
|
+
:machine_name: devenv-centos7-base
|
30
33
|
:ebs_volume_size: 25
|
31
34
|
:ami_tag_prefix: devenv-centos7-base_
|
35
|
+
:openstack:
|
36
|
+
:image: <CentOS 7>
|
37
|
+
:flavor: m1.small
|
38
|
+
:ssh_user: centos
|
32
39
|
:inst:
|
33
40
|
:virtualbox:
|
34
|
-
:box_name:
|
35
|
-
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/
|
36
|
-
:
|
37
|
-
:box_name:
|
38
|
-
:box_url:
|
41
|
+
:box_name: centos7_inst
|
42
|
+
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/openshift3/centos7_virtualbox_inst.box
|
43
|
+
:libvirt:
|
44
|
+
:box_name: centos7_base
|
45
|
+
:box_url: http://mirror.openshift.com/pub/vagrant/boxes/openshift3/centos7_libvirt_inst.box
|
39
46
|
:aws:
|
40
47
|
:ami: <AMI_ID>
|
41
48
|
:ami_region: us-east-1
|
@@ -43,17 +50,15 @@
|
|
43
50
|
:machine_name: <AMI_NAME>
|
44
51
|
:ebs_volume_size: 25
|
45
52
|
:ami_tag_prefix: devenv-centos7_
|
53
|
+
:openstack:
|
54
|
+
:image: <CentOS 7>
|
55
|
+
:flavor: m1.small
|
56
|
+
:ssh_user: centos
|
46
57
|
:fedora:
|
47
58
|
:os:
|
48
59
|
:virtualbox:
|
49
60
|
:box_name: fedora_base
|
50
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/
|
51
|
-
:vmware:
|
52
|
-
:box_name: fedora_base
|
53
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_20_vmware_os.box
|
54
|
-
:libvirt:
|
55
|
-
:box_name: fedora_base
|
56
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_20_libvirt_os.box
|
61
|
+
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_virtualbox_os.box
|
57
62
|
:aws:
|
58
63
|
:ami: <AMI_ID>
|
59
64
|
:ami_region: us-east-1
|
@@ -61,16 +66,17 @@
|
|
61
66
|
:machine_name: openshift-fedora
|
62
67
|
:ebs_volume_size: 25
|
63
68
|
:ami_tag_prefix: openshift-fedora_
|
69
|
+
:openstack:
|
70
|
+
:image: <Fedora>
|
71
|
+
:flavor: m1.small
|
72
|
+
:ssh_user: fedora
|
73
|
+
:libvirt:
|
74
|
+
:box_name: fedora_base
|
75
|
+
:box_url: https://download.gluster.org/pub/gluster/purpleidea/vagrant/fedora-20/fedora-20.box
|
64
76
|
:deps:
|
65
77
|
:virtualbox:
|
66
78
|
:box_name: fedora_deps
|
67
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/
|
68
|
-
:vmware:
|
69
|
-
:box_name: fedora_deps
|
70
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_20_vmware_deps.box
|
71
|
-
:libvirt:
|
72
|
-
:box_name: fedora_deps
|
73
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_20_libvirt_deps.box
|
79
|
+
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_virtualbox_deps.box
|
74
80
|
:aws:
|
75
81
|
:ami: <AMI_ID>
|
76
82
|
:ami_region: us-east-1
|
@@ -78,16 +84,17 @@
|
|
78
84
|
:machine_name: devenv-fedora-base
|
79
85
|
:ebs_volume_size: 25
|
80
86
|
:ami_tag_prefix: devenv-fedora-base_
|
87
|
+
:openstack:
|
88
|
+
:image: <Fedora>
|
89
|
+
:flavor: m1.small
|
90
|
+
:ssh_user: fedora
|
91
|
+
:libvirt:
|
92
|
+
:box_name: fedora_deps
|
93
|
+
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_libvirt_deps.box
|
81
94
|
:inst:
|
82
95
|
:virtualbox:
|
83
96
|
:box_name: fedora_inst
|
84
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/
|
85
|
-
:vmware:
|
86
|
-
:box_name: fedora_inst
|
87
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_20_vmware_inst.box
|
88
|
-
:libvirt:
|
89
|
-
:box_name: fedora_inst
|
90
|
-
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_20_libvirt_inst.box
|
97
|
+
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_virtualbox_inst.box
|
91
98
|
:aws:
|
92
99
|
:ami: <AMI_ID>
|
93
100
|
:ami_region: us-east-1
|
@@ -95,43 +102,47 @@
|
|
95
102
|
:machine_name: <AMI_NAME>
|
96
103
|
:ebs_volume_size: 25
|
97
104
|
:ami_tag_prefix: devenv-fedora_
|
105
|
+
:openstack:
|
106
|
+
:image: <Fedora>
|
107
|
+
:flavor: m1.small
|
108
|
+
:ssh_user: fedora
|
109
|
+
:libvirt:
|
110
|
+
:box_name: fedora_inst
|
111
|
+
:box_url: https://mirror.openshift.com/pub/vagrant/boxes/openshift3/fedora_libvirt_inst.box
|
98
112
|
:rhel7:
|
99
113
|
:os:
|
100
|
-
:virtualbox:
|
101
|
-
:box_name: n/a
|
102
|
-
:box_url: n/a
|
103
|
-
:vmware:
|
104
|
-
:box_name: n/a
|
105
|
-
:box_url: n/a
|
106
114
|
:aws:
|
107
115
|
:ami: <AMI_ID>
|
108
116
|
:ami_region: us-east-1
|
109
117
|
:ssh_user: root
|
110
|
-
:machine_name:
|
118
|
+
:machine_name: openshift-rhel7
|
111
119
|
:ebs_volume_size: 25
|
120
|
+
:ami_tag_prefix: openshift-rhel7_
|
121
|
+
:openstack:
|
122
|
+
:image: <RHEL 7>
|
123
|
+
:flavor: m1.small
|
124
|
+
:ssh_user: root
|
112
125
|
:deps:
|
113
|
-
:virtualbox:
|
114
|
-
:box_name: n/a
|
115
|
-
:box_url: n/a
|
116
|
-
:vmware:
|
117
|
-
:box_name: n/a
|
118
|
-
:box_url: n/a
|
119
126
|
:aws:
|
120
127
|
:ami: <AMI_ID>
|
121
128
|
:ami_region: us-east-1
|
122
129
|
:ssh_user: root
|
123
|
-
:machine_name:
|
130
|
+
:machine_name: devenv-rhel7-base
|
124
131
|
:ebs_volume_size: 25
|
132
|
+
:ami_tag_prefix: devenv-rhel7-base_
|
133
|
+
:openstack:
|
134
|
+
:image: <RHEL 7>
|
135
|
+
:flavor: m1.small
|
136
|
+
:ssh_user: root
|
125
137
|
:inst:
|
126
|
-
:virtualbox:
|
127
|
-
:box_name: n/a
|
128
|
-
:box_url: n/a
|
129
|
-
:vmware:
|
130
|
-
:box_name: n/a
|
131
|
-
:box_url: n/a
|
132
138
|
:aws:
|
133
139
|
:ami: <AMI_ID>
|
134
140
|
:ami_region: us-east-1
|
135
141
|
:ssh_user: root
|
136
142
|
:machine_name: <AMI_NAME>
|
137
143
|
:ebs_volume_size: 25
|
144
|
+
:ami_tag_prefix: devenv-rhel7_
|
145
|
+
:openstack:
|
146
|
+
:image: <RHEL 7>
|
147
|
+
:flavor: m1.small
|
148
|
+
:ssh_user: root
|
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.14
|
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-01-
|
11
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|