vagrant-openshift 1.0.9 → 1.0.11

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: 37cbead9fef9d999bd787d5c5235398207ecf3fb
4
- data.tar.gz: d55a4db0100f1aca956fbaaff81828cb922f8110
3
+ metadata.gz: 53f42ad6eeea81faac5dc4094f66c540759b5276
4
+ data.tar.gz: c6f5b108e6fea0f10d3023204ae3bf44e78051bc
5
5
  SHA512:
6
- metadata.gz: 4a9234f05f04cba7415dd7ef94457ae166609c0b747a571875f938e4ff3a984b3eb8cb28176fbc2d1d2accaa153432e419b2fa780c7526469b7e9c1faa511679
7
- data.tar.gz: 7e514acfc0c3d39cdebfcbc0a76ac6632820ed643415bc82ce65958d1379d276e07eeb52dbf4eac606523472338245f5dba0c585945bea6976d6a56f86ad6ddc
6
+ metadata.gz: 10b73600f020405ff442a623b791af60cee555d494cead79959fac324c3ef5bb409937f46bfb80298c82a6f8a13bf35b07eab8d65f29c8d30b6dbfd82e86f245
7
+ data.tar.gz: 78059996e90d5fdc8ca322c4c3c03f9ba11844f54de8de83553c71df7a928ad786c9fb81d4dc2818cb5a53adfb0682dcf1d777da54bd618d0e7a356d1230b061
data/README.asciidoc CHANGED
@@ -37,7 +37,7 @@ $ rake vagrant:install
37
37
 
38
38
  ==== Clone the OpenShift Origin repositories
39
39
 
40
- ===== OpenShift 3
40
+ ===== Geard
41
41
 
42
42
  [source, sh]
43
43
  ----
@@ -70,7 +70,7 @@ $ vagrant origin-init <instance name>
70
70
  .Command options:
71
71
 
72
72
  * Specify which OS to build with:
73
- ** --os fedora - Launch a Fedora 20 image (used for OpenShift 3 development)
73
+ ** --os fedora - Launch a Fedora 20 image (used for Geard development)
74
74
  ** --os rhel6 - Launch a RHEL 6 image (where available)
75
75
  ** --os centos6 - Launch a CentOS 6 image (where available, used for OpenShift 2.x development)
76
76
 
@@ -104,7 +104,7 @@ Note: See Other Environments below for launching against other options.
104
104
 
105
105
  * Syncing and building code from local repository clones
106
106
 
107
- ===== OpenShift 3
107
+ ===== Geard
108
108
 
109
109
  [source, sh]
110
110
  ----
@@ -122,7 +122,7 @@ $ vagrant sync
122
122
 
123
123
  ==== Running OpenShift Origin Tests
124
124
 
125
- ===== OpenShift 3
125
+ ===== Geard
126
126
 
127
127
  [source, sh]
128
128
  ----
@@ -143,14 +143,12 @@ $ vagrant test --all
143
143
 
144
144
  If starting from --stage os, install the build and package dependencies.
145
145
 
146
- ===== OpenShift 3
146
+ ===== Geard
147
147
 
148
148
  [source, sh]
149
149
  ----
150
150
  $ vagrant build-geard-base
151
151
  $ vagrant install-geard
152
- $ vagrant build-geard-broker
153
- $ vagrant install-geard-broker
154
152
  ----
155
153
 
156
154
  ===== OpenShift 2.x
@@ -60,12 +60,6 @@ module Vagrant
60
60
  end
61
61
  end
62
62
 
63
- def self.install_geard_broker(options)
64
- Vagrant::Action::Builder.new.tap do |b|
65
- b.use InstallGeardBroker
66
- end
67
- end
68
-
69
63
  def self.build_geard(options)
70
64
  Vagrant::Action::Builder.new.tap do |b|
71
65
  b.use BuildGeard
@@ -78,30 +72,6 @@ module Vagrant
78
72
  end
79
73
  end
80
74
 
81
- def self.restart_geard_broker(options)
82
- Vagrant::Action::Builder.new.tap do |b|
83
- b.use RestartGeardBroker
84
- end
85
- end
86
-
87
- def self.build_geard_broker(options)
88
- Vagrant::Action::Builder.new.tap do |b|
89
- b.use BuildGeardBroker, options
90
- end
91
- end
92
-
93
- def self.restart_geard_console(options)
94
- Vagrant::Action::Builder.new.tap do |b|
95
- b.use RestartGeardConsole
96
- end
97
- end
98
-
99
- def self.build_geard_console(options)
100
- Vagrant::Action::Builder.new.tap do |b|
101
- b.use BuildGeardConsole, options
102
- end
103
- end
104
-
105
75
  def self.build_geard_images(options)
106
76
  Vagrant::Action::Builder.new.tap do |b|
107
77
  b.use BuildGeardImages, options
@@ -152,10 +122,6 @@ module Vagrant
152
122
  b.use BuildGeard if options[:include].include? Vagrant::Openshift::Constants::FILTER_GEARD
153
123
  b.use RestartGeard if options[:include].include? Vagrant::Openshift::Constants::FILTER_GEARD
154
124
  b.use BuildGeardImages, options if options[:include].include? Vagrant::Openshift::Constants::FILTER_IMAGES
155
- b.use BuildGeardBroker if options[:include].include? Vagrant::Openshift::Constants::FILTER_BROKER
156
- b.use RestartGeardBroker if options[:include].include? Vagrant::Openshift::Constants::FILTER_BROKER
157
- b.use BuildGeardConsole if options[:include].include? Vagrant::Openshift::Constants::FILTER_CONSOLE
158
- b.use RestartGeardConsole if options[:include].include? Vagrant::Openshift::Constants::FILTER_CONSOLE
159
125
  b.use InstallRhc if options[:include].include? Vagrant::Openshift::Constants::FILTER_RHC
160
126
  end
161
127
  end
@@ -247,12 +213,6 @@ module Vagrant
247
213
  def self.install_rhc(options)
248
214
  Vagrant::Action::Builder.new.tap do |b|
249
215
  b.use InstallRhc
250
- end
251
- end
252
-
253
- def self.setup_geard_broker(options)
254
- Vagrant::Action::Builder.new.tap do |b|
255
- b.use SetupGeardBroker
256
216
  end
257
217
  end
258
218
 
@@ -269,17 +229,12 @@ module Vagrant
269
229
  autoload :YumUpdate, action_root.join("yum_update")
270
230
  autoload :SetupBuilderFiles, action_root.join("setup_builder_files")
271
231
  autoload :InstallBuildDependencies, action_root.join("install_build_dependencies")
272
- autoload :BuildGeardBroker, action_root.join("build_geard_broker")
273
- autoload :BuildGeardConsole, action_root.join("build_geard_console")
274
232
  autoload :BuildGeardImages, action_root.join("build_geard_images")
275
233
  autoload :InstallGeardBaseDependencies, action_root.join("install_geard_base_dependencies")
276
234
  autoload :InstallGeardImages, action_root.join("install_geard_images")
277
235
  autoload :InstallGeard, action_root.join("install_geard")
278
- autoload :InstallGeardBroker, action_root.join("install_geard_broker")
279
236
  autoload :BuildGeard, action_root.join("build_geard")
280
237
  autoload :RestartGeard, action_root.join("restart_geard")
281
- autoload :RestartGeardBroker, action_root.join("restart_geard_broker")
282
- autoload :RestartGeardConsole, action_root.join("restart_geard_console")
283
238
  autoload :PrepareSshConfig, action_root.join("prepare_ssh_config")
284
239
  autoload :SyncLocalRepository, action_root.join("sync_local_repository")
285
240
  autoload :SyncUpstreamRepository, action_root.join("sync_upstream_repository")
@@ -301,7 +256,6 @@ module Vagrant
301
256
  autoload :TestExitCode, action_root.join("test_exit_code")
302
257
  autoload :CleanNetworkSetup, action_root.join("clean_network_setup")
303
258
  autoload :InstallRhc, action_root.join("install_rhc")
304
- autoload :SetupGeardBroker, action_root.join("setup_geard_broker")
305
259
  autoload :SetupBindHost, action_root.join("setup_bind_host")
306
260
  end
307
261
  end
@@ -31,12 +31,12 @@ module Vagrant
31
31
  opts = OptionParser.new do |o|
32
32
  o.banner = "Usage: vagrant checkout-repos"
33
33
  o.separator ""
34
-
34
+
35
35
  o.on("-b [branch_name]", "--branch [branch_name]", String, "Check out the specified branch. Default is 'master'.") do |f|
36
36
  options[:branch] = {"origin-server" => f}
37
37
  end
38
-
39
- #@options[:branch][repo_name]
38
+
39
+ #@options[:branch][repo_name]
40
40
  end
41
41
 
42
42
  # Parse the options
@@ -43,7 +43,7 @@ module Vagrant
43
43
  options[:node] = true
44
44
  end
45
45
 
46
- o.on("-t", "--cart", String, "Run cartridge tests") do |f|
46
+ o.on("-t", "--cart", "--cartridge", String, "Run cartridge tests") do |f|
47
47
  options[:cart] = true
48
48
  end
49
49
 
@@ -38,7 +38,7 @@ module Vagrant
38
38
  options[:all] = true
39
39
  end
40
40
 
41
- o.on("-d","--artifacts", String, "Download logs and rpms") do |f|
41
+ o.on("-d","--artifacts", String, "Download logs") do |f|
42
42
  options[:download] = true
43
43
  end
44
44
  end
@@ -135,11 +135,11 @@ exit $status
135
135
  # Vagrant throws an exception if any execute invocation returns non-zero,
136
136
  # so catch it so we can return a proper output.
137
137
  rescue => e
138
- @env.ui.info "Exception: #{e}"
138
+ @env.ui.info "Exception: #{e}"
139
139
  end
140
140
  @env.ui.info "RC=#{rc}"
141
141
  return rc
142
- end
142
+ end
143
143
  end
144
144
  end
145
145
  end
@@ -62,36 +62,11 @@ module Vagrant
62
62
  Commands::InstallGeard
63
63
  end
64
64
 
65
- command "install-geard-broker" do
66
- require_relative "command/install_geard_broker"
67
- Commands::InstallGeardBroker
68
- end
69
-
70
65
  command "restart-geard" do
71
66
  require_relative "command/restart_geard"
72
67
  Commands::RestartGeard
73
68
  end
74
69
 
75
- command "restart-geard-broker" do
76
- require_relative "command/restart_geard_broker"
77
- Commands::RestartGeardBroker
78
- end
79
-
80
- command "build-geard-broker" do
81
- require_relative "command/build_geard_broker"
82
- Commands::BuildGeardBroker
83
- end
84
-
85
- command "restart-geard-console" do
86
- require_relative "command/restart_geard_console"
87
- Commands::RestartGeardConsole
88
- end
89
-
90
- command "build-geard-console" do
91
- require_relative "command/build_geard_console"
92
- Commands::BuildGeardConsole
93
- end
94
-
95
70
  command "build-geard-images" do
96
71
  require_relative "command/build_geard_images"
97
72
  Commands::BuildGeardImages
@@ -152,11 +127,6 @@ module Vagrant
152
127
  Commands::InstallRhc
153
128
  end
154
129
 
155
- command "setup-geard-broker" do
156
- require_relative "command/setup_geard_broker"
157
- Commands::SetupGeardBroker
158
- end
159
-
160
130
  command "test-geard-image" do
161
131
  require_relative "command/test_geard_image"
162
132
  Commands::TestGeardImage
@@ -53,7 +53,7 @@ class Test
53
53
  (1..4).each do |i|
54
54
  test_queues[i-1] << build_cucumber_command("Extended Gear Group #{i}", ["@gear_extended#{i}"])
55
55
  end
56
- (1..4).each do |i|
56
+ (1..3).each do |i|
57
57
  test_queues[i-1] << build_rake_command("OpenShift Gear Functionals Ext #{i}", "cd /data/src/github.com/openshift/openshift-test/node; rake ext_gear_func_test#{i}")
58
58
  end
59
59
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Vagrant
18
18
  module Openshift
19
- VERSION = "1.0.9"
19
+ VERSION = "1.0.11"
20
20
  end
21
21
  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: 1.0.9
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Red Hat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-08 00:00:00.000000000 Z
11
+ date: 2014-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -123,8 +123,6 @@ files:
123
123
  - lib/vagrant-openshift.rb
124
124
  - lib/vagrant-openshift/action.rb
125
125
  - lib/vagrant-openshift/action/build_geard.rb
126
- - lib/vagrant-openshift/action/build_geard_broker.rb
127
- - lib/vagrant-openshift/action/build_geard_console.rb
128
126
  - lib/vagrant-openshift/action/build_geard_images.rb
129
127
  - lib/vagrant-openshift/action/build_sources.rb
130
128
  - lib/vagrant-openshift/action/checkout_repositories.rb
@@ -143,7 +141,6 @@ files:
143
141
  - lib/vagrant-openshift/action/install_build_dependencies.rb
144
142
  - lib/vagrant-openshift/action/install_geard.rb
145
143
  - lib/vagrant-openshift/action/install_geard_base_dependencies.rb
146
- - lib/vagrant-openshift/action/install_geard_broker.rb
147
144
  - lib/vagrant-openshift/action/install_geard_images.rb
148
145
  - lib/vagrant-openshift/action/install_open_shift_dependencies.rb
149
146
  - lib/vagrant-openshift/action/install_rhc.rb
@@ -154,15 +151,12 @@ files:
154
151
  - lib/vagrant-openshift/action/prepare_ssh_config.rb
155
152
  - lib/vagrant-openshift/action/preserve_mcollective_logs.rb
156
153
  - lib/vagrant-openshift/action/restart_geard.rb
157
- - lib/vagrant-openshift/action/restart_geard_broker.rb
158
- - lib/vagrant-openshift/action/restart_geard_console.rb
159
154
  - lib/vagrant-openshift/action/run_geard_tests.rb
160
155
  - lib/vagrant-openshift/action/run_tests.rb
161
156
  - lib/vagrant-openshift/action/set_host_name.rb
162
157
  - lib/vagrant-openshift/action/setup_bind_dns_key.rb
163
158
  - lib/vagrant-openshift/action/setup_bind_host.rb
164
159
  - lib/vagrant-openshift/action/setup_builder_files.rb
165
- - lib/vagrant-openshift/action/setup_geard_broker.rb
166
160
  - lib/vagrant-openshift/action/sync_local_repository.rb
167
161
  - lib/vagrant-openshift/action/sync_upstream_repository.rb
168
162
  - lib/vagrant-openshift/action/test_exit_code.rb
@@ -170,15 +164,12 @@ files:
170
164
  - lib/vagrant-openshift/action/yum_update.rb
171
165
  - lib/vagrant-openshift/command/build_geard.rb
172
166
  - lib/vagrant-openshift/command/build_geard_base.rb
173
- - lib/vagrant-openshift/command/build_geard_broker.rb
174
- - lib/vagrant-openshift/command/build_geard_console.rb
175
167
  - lib/vagrant-openshift/command/build_geard_images.rb
176
168
  - lib/vagrant-openshift/command/build_origin_base.rb
177
169
  - lib/vagrant-openshift/command/checkout_repositories.rb
178
170
  - lib/vagrant-openshift/command/clone_upstream_repositories.rb
179
171
  - lib/vagrant-openshift/command/create_ami.rb
180
172
  - lib/vagrant-openshift/command/install_geard.rb
181
- - lib/vagrant-openshift/command/install_geard_broker.rb
182
173
  - lib/vagrant-openshift/command/install_rhc.rb
183
174
  - lib/vagrant-openshift/command/local_geard_setup.rb
184
175
  - lib/vagrant-openshift/command/local_repo_setup.rb
@@ -188,9 +179,6 @@ files:
188
179
  - lib/vagrant-openshift/command/repo_sync.rb
189
180
  - lib/vagrant-openshift/command/repo_sync_geard.rb
190
181
  - lib/vagrant-openshift/command/restart_geard.rb
191
- - lib/vagrant-openshift/command/restart_geard_broker.rb
192
- - lib/vagrant-openshift/command/restart_geard_console.rb
193
- - lib/vagrant-openshift/command/setup_geard_broker.rb
194
182
  - lib/vagrant-openshift/command/test.rb
195
183
  - lib/vagrant-openshift/command/test_geard.rb
196
184
  - lib/vagrant-openshift/command/test_geard_image.rb
@@ -1,59 +0,0 @@
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 BuildGeardBroker
21
- include CommandHelper
22
-
23
- def initialize(app, env, options = {})
24
- @app = app
25
- @env = env
26
- @options = options
27
- end
28
-
29
- def call(env)
30
- docker_file_path = "broker/docker/origin-broker-builder"
31
- build_builder_cmd = %{
32
- echo "Performing origin-broker-builder build..."
33
- set -e
34
- pushd #{Constants.build_dir}origin-server/#{docker_file_path}
35
- docker build --rm #{@options[:force] ? "--no-cache" : ""} -t origin-broker-builder .
36
- popd
37
- }
38
- build_broker_cmd = %{
39
- echo "Copy generated plugin configuration to broker source for use in build"
40
- PLUGINS_CONF="#{Vagrant::Openshift::Constants.plugins_conf_dir}"
41
- cp -f --parents $(find $PLUGINS_CONF \\( -name "*.conf" \\)) /data/src/github.com/openshift/origin-server
42
- echo "Performing broker build..."
43
- set -e
44
- gear build #{Constants.build_dir}origin-server/ origin-broker-builder origin-broker --verbose
45
- }
46
-
47
- if @options[:force]
48
- sudo(env[:machine], build_builder_cmd + build_broker_cmd, {:timeout => 60*40})
49
- else
50
- sudo(env[:machine], sync_bash_command_on_dockerfile('origin-server', docker_file_path, build_builder_cmd), {:timeout => 60*20})
51
-
52
- sudo(env[:machine], sync_bash_command('origin-server', build_broker_cmd), {:timeout => 60*20})
53
- @app.call(env)
54
- end
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,55 +0,0 @@
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 BuildGeardConsole
21
- include CommandHelper
22
-
23
- def initialize(app, env, options = {})
24
- @app = app
25
- @env = env
26
- @options = options
27
- end
28
-
29
- def call(env)
30
- docker_file_path = "console/docker/origin-console-builder"
31
- build_builder_cmd = %{
32
- echo "Performing origin-console-builder build..."
33
- set -e
34
- pushd #{Constants.build_dir}origin-server/#{docker_file_path}
35
- docker build --rm #{@options[:force] ? "--no-cache" : ""} -t origin-console-builder .
36
- popd
37
- }
38
- build_console_cmd = %{
39
- echo "Performing console build..."
40
- set -e
41
- gear build #{Constants.build_dir}origin-server/ origin-console-builder origin-console --verbose
42
- }
43
- if @options[:force]
44
- sudo(env[:machine], build_builder_cmd + build_console_cmd, {:timeout => 60*40})
45
- else
46
- sudo(env[:machine], sync_bash_command_on_dockerfile('origin-server', docker_file_path, build_builder_cmd), {:timeout => 60*20})
47
-
48
- sudo(env[:machine], sync_bash_command('origin-server', build_console_cmd), {:timeout => 60*20})
49
- @app.call(env)
50
- end
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,39 +0,0 @@
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 InstallGeardBroker
21
- include CommandHelper
22
-
23
- def initialize(app, env)
24
- @app = app
25
- @env = env
26
- end
27
-
28
- def call(env)
29
- sudo(env[:machine], %{
30
- set -e
31
- pushd /data/src/github.com/openshift/origin-server/broker/docker
32
- gear deploy origin_deploy.json
33
- popd
34
- })
35
- end
36
- end
37
- end
38
- end
39
- end
@@ -1,43 +0,0 @@
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 RestartGeardBroker
21
- include CommandHelper
22
-
23
- def initialize(app, env)
24
- @app = app
25
- @env = env
26
- end
27
-
28
- def call(env)
29
- #TODO the second line is a temporary hack due to the selinux policies being outdated in the repo
30
- #TODO post geard fixes, remove sleep 2, and gear init from sudo below
31
- sudo(env[:machine], %{
32
- set -e
33
- gear restart origin-broker-1
34
- sleep 2
35
- gear init --post "origin-broker-1" "origin-broker"
36
- })
37
- @app.call(env)
38
- end
39
-
40
- end
41
- end
42
- end
43
- end
@@ -1,43 +0,0 @@
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 RestartGeardConsole
21
- include CommandHelper
22
-
23
- def initialize(app, env)
24
- @app = app
25
- @env = env
26
- end
27
-
28
- def call(env)
29
- #TODO the second line is a temporary hack due to the selinux policies being outdated in the repo
30
- #TODO post geard fixes, remove sleep 2, and gear init from sudo below
31
- sudo(env[:machine], %{
32
- set -e
33
- gear restart origin-console-1
34
- sleep 2
35
- gear init --post "origin-console-1" "origin-console"
36
- })
37
- @app.call(env)
38
- end
39
-
40
- end
41
- end
42
- end
43
- end
@@ -1,71 +0,0 @@
1
- #--
2
- # Copyright 2014 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 SetupGeardBroker
21
- include CommandHelper
22
-
23
- def initialize(app, env)
24
- @app = app
25
- @env = env
26
- end
27
-
28
- def call(env)
29
- sudo(env[:machine], %{
30
- #{bash_systemd_polling_functions}
31
- #
32
- gear list-units
33
-
34
- echo "Waiting for origin-db and origin-broker to become available..."
35
-
36
- if ! wait_for_activate origin-db; then
37
- echo "WARNING: The 'origin-db' container is not ACTIVE. Trying restart..."
38
- gear restart origin-db-1
39
- if ! wait_for_activate origin-db; then
40
- echo "ERROR: Unable to activate the origin-db container."
41
- gear status origin-db-1
42
- exit 1
43
- fi
44
- fi
45
-
46
- if ! wait_for_activate origin-broker; then
47
- echo "WARNING: The 'origin-broker' container is not ACTIVE. Trying restart..."
48
- gear restart origin-broker-1
49
- if ! wait_for_activate origin-broker; then
50
- echo "ERROR: Unable to activate the origin-broker container."
51
- gear status origin-broker-1
52
- exit 1
53
- fi
54
- fi
55
-
56
- echo "Install cartridges into broker"
57
-
58
- retries=1
59
- until [ $retries -ge 5 ]; do
60
- switchns --container="origin-broker-1" -- /bin/bash --login -c '$HOME/src/docker/openshift_init'
61
- [ $? == 0 ] && break
62
- echo "Installing cartridges failed ($?). Retry \#$retries" && sleep 1
63
- retries=$[$retries+1]
64
- done
65
- })
66
- @app.call(env)
67
- end
68
- end
69
- end
70
- end
71
- end
@@ -1,59 +0,0 @@
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
- require_relative "../action"
17
-
18
- module Vagrant
19
- module Openshift
20
- module Commands
21
- class BuildGeardBroker < Vagrant.plugin(2, :command)
22
- include CommandHelper
23
-
24
- def self.synopsis
25
- "builds and installs the broker for geard"
26
- end
27
-
28
- def execute
29
- options = {}
30
- options[:clean] = false
31
- options[:local_source] = false
32
-
33
- opts = OptionParser.new do |o|
34
- o.banner = "Usage: vagrant build-geard-broker [vm-name]"
35
- o.separator ""
36
-
37
- o.on("-b [branch_name]", "--branch [branch_name]", String, "Check out the specified branch. Default is 'master'.") do |f|
38
- options[:branch] = {"origin-server" => f}
39
- end
40
-
41
- o.on("-f", "--force", "Force a rebuild of the broker even if there has not been a change to the source.") do |c|
42
- options[:force] = true
43
- end
44
- end
45
-
46
- # Parse the options
47
- argv = parse_options(opts)
48
- return if !argv
49
-
50
- with_target_vms(argv, :reverse => true) do |machine|
51
- actions = Vagrant::Openshift::Action.build_geard_broker(options)
52
- @env.action_runner.run actions, {:machine => machine}
53
- 0
54
- end
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,59 +0,0 @@
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
- require_relative "../action"
17
-
18
- module Vagrant
19
- module Openshift
20
- module Commands
21
- class BuildGeardConsole < Vagrant.plugin(2, :command)
22
- include CommandHelper
23
-
24
- def self.synopsis
25
- "builds and installs the console for geard"
26
- end
27
-
28
- def execute
29
- options = {}
30
- options[:clean] = false
31
- options[:local_source] = false
32
-
33
- opts = OptionParser.new do |o|
34
- o.banner = "Usage: vagrant build-geard-console [vm-name]"
35
- o.separator ""
36
-
37
- o.on("-b [branch_name]", "--branch [branch_name]", String, "Check out the specified branch. Default is 'master'.") do |f|
38
- options[:branch] = {"origin-server" => f}
39
- end
40
-
41
- o.on("-f", "--force", "Force a rebuild of the console even if there has not been a change to the source.") do |c|
42
- options[:force] = true
43
- end
44
- end
45
-
46
- # Parse the options
47
- argv = parse_options(opts)
48
- return if !argv
49
-
50
- with_target_vms(argv, :reverse => true) do |machine|
51
- actions = Vagrant::Openshift::Action.build_geard_console(options)
52
- @env.action_runner.run actions, {:machine => machine}
53
- 0
54
- end
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,51 +0,0 @@
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
- require_relative "../action"
17
-
18
- module Vagrant
19
- module Openshift
20
- module Commands
21
- class InstallGeardBroker < Vagrant.plugin(2, :command)
22
- include CommandHelper
23
-
24
- def self.synopsis
25
- "installs geard-based broker"
26
- end
27
-
28
- def execute
29
- options = {}
30
- options[:clean] = false
31
- options[:local_source] = false
32
-
33
- opts = OptionParser.new do |o|
34
- o.banner = "Usage: vagrant install-geard-broker [vm-name]"
35
- o.separator ""
36
- end
37
-
38
- # Parse the options
39
- argv = parse_options(opts)
40
- return if !argv
41
-
42
- with_target_vms(argv, :reverse => true) do |machine|
43
- actions = Vagrant::Openshift::Action.install_geard_broker(options)
44
- @env.action_runner.run actions, {:machine => machine}
45
- 0
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,51 +0,0 @@
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
- require_relative "../action"
17
-
18
- module Vagrant
19
- module Openshift
20
- module Commands
21
- class RestartGeardBroker < Vagrant.plugin(2, :command)
22
- include CommandHelper
23
-
24
- def self.synopsis
25
- "restarts geard-based broker"
26
- end
27
-
28
- def execute
29
- options = {}
30
- options[:clean] = false
31
- options[:local_source] = false
32
-
33
- opts = OptionParser.new do |o|
34
- o.banner = "Usage: vagrant restart-geard-broker [vm-name]"
35
- o.separator ""
36
- end
37
-
38
- # Parse the options
39
- argv = parse_options(opts)
40
- return if !argv
41
-
42
- with_target_vms(argv, :reverse => true) do |machine|
43
- actions = Vagrant::Openshift::Action.restart_geard_broker(options)
44
- @env.action_runner.run actions, {:machine => machine}
45
- 0
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,51 +0,0 @@
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
- require_relative "../action"
17
-
18
- module Vagrant
19
- module Openshift
20
- module Commands
21
- class RestartGeardConsole < Vagrant.plugin(2, :command)
22
- include CommandHelper
23
-
24
- def self.synopsis
25
- "restarts geard-based console"
26
- end
27
-
28
- def execute
29
- options = {}
30
- options[:clean] = false
31
- options[:local_source] = false
32
-
33
- opts = OptionParser.new do |o|
34
- o.banner = "Usage: vagrant restart-geard-console [vm-name]"
35
- o.separator ""
36
- end
37
-
38
- # Parse the options
39
- argv = parse_options(opts)
40
- return if !argv
41
-
42
- with_target_vms(argv, :reverse => true) do |machine|
43
- actions = Vagrant::Openshift::Action.restart_geard_console(options)
44
- @env.action_runner.run actions, {:machine => machine}
45
- 0
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,49 +0,0 @@
1
- #--
2
- # Copyright 2014 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
- require_relative "../action"
17
-
18
- module Vagrant
19
- module Openshift
20
- module Commands
21
- class SetupGeardBroker < Vagrant.plugin(2, :command)
22
- include CommandHelper
23
-
24
- def self.synopsis
25
- "Populate running broker with required data to interact with geard"
26
- end
27
-
28
- def execute
29
- options = {}
30
-
31
- opts = OptionParser.new do |o|
32
- o.banner = "Usage: vagrant setup-geard-broker"
33
- o.separator ""
34
- end
35
-
36
- # Parse the options
37
- argv = parse_options(opts)
38
- return if !argv
39
-
40
- with_target_vms(argv, :reverse => true) do |machine|
41
- actions = Vagrant::Openshift::Action.setup_geard_broker(options)
42
- @env.action_runner.run actions, {:machine => machine}
43
- 0
44
- end
45
- end
46
- end
47
- end
48
- end
49
- end