openshifter 0.5 → 0.6
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.
data/CHANGELOG.md
CHANGED
data/lib/openshifter/init.rb
CHANGED
@@ -3,17 +3,17 @@ require 'yaml'
|
|
3
3
|
|
4
4
|
$: << File.expand_path('../..', __FILE__)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
if File.exists?('.openshift')
|
7
|
+
data = File.exists?('.openshift/openshifter') ? YAML.load_file('.openshift/openshifter') : nil
|
8
|
+
data = {} unless data
|
9
|
+
CONFIG = data
|
9
10
|
else
|
10
|
-
|
11
|
-
|
12
|
-
CONFIG = data
|
11
|
+
puts '--> Invalid direcotry - no .openshift directory'
|
12
|
+
exit(1)
|
13
13
|
end
|
14
14
|
|
15
|
-
CONFIG['jruby'] ||= '1.6.
|
16
|
-
CONFIG['jrack'] ||= '1.1.
|
15
|
+
CONFIG['jruby'] ||= '1.6.7'
|
16
|
+
CONFIG['jrack'] ||= '1.1.4'
|
17
17
|
CONFIG['install'] ||= 'vendor'
|
18
18
|
|
19
19
|
ENV['GEM_PATH'] = ENV['GEM_HOME'] = File.expand_path('.openshift/gems')
|
data/lib/openshifter/version.rb
CHANGED
@@ -21,10 +21,10 @@ data = YAML.load_file('.openshift/openshifter')
|
|
21
21
|
data = {} unless data
|
22
22
|
CONFIG = data
|
23
23
|
|
24
|
-
CONFIG['jruby'] ||= '1.6.
|
24
|
+
CONFIG['jruby'] ||= '1.6.7'
|
25
25
|
CONFIG['install'] ||= 'vendor'
|
26
|
-
CONFIG['jrack'] ||= '1.1.
|
27
|
-
CONFIG['torquebox'] ||=
|
26
|
+
CONFIG['jrack'] ||= '1.1.4'
|
27
|
+
CONFIG['torquebox'] ||= '2.0.0.cr1'
|
28
28
|
|
29
29
|
SYS = {}
|
30
30
|
|
@@ -48,7 +48,7 @@ def setup_vendor
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def setup_torquebox
|
51
|
-
SYS[:torquebox] = File.join(ENV['OPENSHIFT_DATA_DIR'], 'jruby', 'torquebox', "
|
51
|
+
SYS[:torquebox] = File.join(ENV['OPENSHIFT_DATA_DIR'], 'jruby', 'torquebox', "torquebox-#{CONFIG['torquebox']}")
|
52
52
|
SYS[:torquebox_jruby] = File.join(ENV['OPENSHIFT_DATA_DIR'], 'jruby', 'torquebox', "jruby-#{CONFIG['jruby']}")
|
53
53
|
SYS[:gems] = File.join(SYS[:torquebox_jruby], 'lib', 'ruby', 'gems', '1.8')
|
54
54
|
SYS[:gemfile_hash] = File.join(ENV['OPENSHIFT_DATA_DIR'], 'jruby', 'torquebox', 'Gemfile.hash')
|
@@ -150,7 +150,7 @@ def create_remote
|
|
150
150
|
start_cmd("java -jar #{SYS[:jruby]} -S gem install bundler --no-ri --no-rdoc")
|
151
151
|
|
152
152
|
puts "---> Bundling gems"
|
153
|
-
start_cmd("java -Xmx512m -Xss2048k -
|
153
|
+
start_cmd("java -Xmx512m -Xss2048k -jar #{SYS[:jruby]} -S bundle install")
|
154
154
|
|
155
155
|
File.open(SYS[:gemfile_hash], 'w') { |file| file.print(gemfile) }
|
156
156
|
end
|
@@ -184,7 +184,7 @@ def create_torquebox
|
|
184
184
|
end
|
185
185
|
|
186
186
|
puts '--> Gems'
|
187
|
-
|
187
|
+
|
188
188
|
gemfile = Digest::SHA256.file('Gemfile').hexdigest
|
189
189
|
oldhash = File.exists?(SYS[:gemfile_hash]) ? File.read(SYS[:gemfile_hash]) : ''
|
190
190
|
|
@@ -193,6 +193,9 @@ def create_torquebox
|
|
193
193
|
puts '---> Cleaning gems'
|
194
194
|
FileUtils.rm_rf(SYS[:gems])
|
195
195
|
|
196
|
+
puts '---> Installing Torquebox gems'
|
197
|
+
start_cmd("#{SYS[:torquebox_jruby]}/bin/jruby -S gem install torquebox-core torquebox-web -v #{CONFIG['torquebox']} --no-ri --no-rdoc")
|
198
|
+
|
196
199
|
puts '---> Installing Bundler'
|
197
200
|
start_cmd("#{SYS[:torquebox_jruby]}/bin/jruby -S gem install bundler --no-ri --no-rdoc")
|
198
201
|
|
@@ -204,14 +207,16 @@ def create_torquebox
|
|
204
207
|
|
205
208
|
puts '--> Install Torquebox'
|
206
209
|
unless File.exists?(SYS[:torquebox])
|
207
|
-
Dir.glob(File.join(ENV['OPENSHIFT_DATA_DIR'], 'jruby', 'torquebox', "
|
208
|
-
FileUtils.mkdir_p(SYS[:torquebox])
|
209
|
-
puts `curl -o #{SYS[:torquebox]}/torquebox-dist-modules.zip "http://repository-torquebox.forge.cloudbees.com/incremental/torquebox/#{CONFIG['torquebox']}/torquebox-dist-modules.zip"`
|
210
|
-
puts `unzip -d #{SYS[:torquebox]} #{SYS[:torquebox]}/torquebox-dist-modules.zip`
|
211
|
-
FileUtils.rm("#{SYS[:torquebox]}/torquebox-dist-modules.zip")
|
210
|
+
Dir.glob(File.join(ENV['OPENSHIFT_DATA_DIR'], 'jruby', 'torquebox', "torquebox-*")) { |file| FileUtils.rm_rf(file) }
|
211
|
+
FileUtils.mkdir_p(File.join(SYS[:torquebox], 'polyglot'))
|
212
212
|
|
213
|
-
puts
|
214
|
-
|
213
|
+
puts `curl -Lo #{SYS[:torquebox]}/torquebox.zip "http://torquebox.org/release/org/torquebox/torquebox-dist/#{CONFIG['torquebox']}/torquebox-dist-#{CONFIG['torquebox']}-modules.zip"`
|
214
|
+
puts `curl -Lo #{SYS[:torquebox]}/polyglot.zip "http://torquebox.org/release/org/projectodd/polyglot-hasingleton/1.5.0/polyglot-hasingleton-1.5.0-module.zip"`
|
215
|
+
|
216
|
+
puts `unzip -d #{SYS[:torquebox]} #{SYS[:torquebox]}/torquebox.zip`
|
217
|
+
puts `unzip -d #{SYS[:torquebox]}/polyglot #{SYS[:torquebox]}/polyglot.zip`
|
218
|
+
FileUtils.rm("#{SYS[:torquebox]}/torquebox.zip")
|
219
|
+
FileUtils.rm("#{SYS[:torquebox]}/polyglot.zip")
|
215
220
|
end
|
216
221
|
|
217
222
|
script_path = "#{ENV['OPENSHIFT_APP_DIR']}#{ENV['OPENSHIFT_APP_TYPE']}/bin/standalone.conf"
|
@@ -227,15 +232,16 @@ def create_torquebox
|
|
227
232
|
File.open(script_path, 'w') { |file| file.print(script) }
|
228
233
|
|
229
234
|
puts "--> Setup Torquebox modules"
|
230
|
-
FileUtils.mkdir_p(".openshift/config/modules/org")
|
231
|
-
|
232
|
-
FileUtils.ln_s(File.join(SYS[:torquebox], '
|
235
|
+
FileUtils.mkdir_p(".openshift/config/modules/org/projectodd/polyglot/hasingleton")
|
236
|
+
FileUtils.ln_s(File.join(SYS[:torquebox], 'modules', 'org', 'torquebox'), ".openshift/config/modules/org/torquebox")
|
237
|
+
FileUtils.ln_s(File.join(SYS[:torquebox], 'polyglot'), ".openshift/config/modules/org/projectodd/polyglot/hasingleton/main")
|
233
238
|
FileUtils.cp(File.expand_path('../templates/standalone.xml', __FILE__), '.openshift/config/standalone.xml')
|
234
239
|
|
235
240
|
knob = ERB.new(File.read(File.expand_path('../templates/app-knob.yml', __FILE__))).result(binding)
|
236
241
|
File.open(File.join(SYS[:root], 'app-knob.yml'), 'w') { |file| file.print(knob) }
|
237
242
|
|
238
243
|
FileUtils.touch(File.join(SYS[:root], 'app-knob.yml.dodeploy'))
|
244
|
+
|
239
245
|
end
|
240
246
|
|
241
247
|
# Run the tasks
|
@@ -32,6 +32,7 @@
|
|
32
32
|
<extension module="org.jboss.as.jmx"/>
|
33
33
|
<extension module="org.jboss.as.jpa"/>
|
34
34
|
<extension module="org.jboss.as.logging"/>
|
35
|
+
<extension module="org.jboss.as.messaging"/>
|
35
36
|
<extension module="org.jboss.as.naming"/>
|
36
37
|
<extension module="org.jboss.as.sar"/>
|
37
38
|
<extension module="org.jboss.as.security"/>
|
@@ -39,14 +40,17 @@
|
|
39
40
|
<extension module="org.jboss.as.transactions"/>
|
40
41
|
<extension module="org.jboss.as.web" />
|
41
42
|
<extension module="org.jboss.as.weld" />
|
42
|
-
<extension module='org.torquebox.bootstrap'
|
43
|
-
<extension module='org.torquebox.core'
|
44
|
-
<extension module='org.torquebox.
|
45
|
-
<extension module='org.torquebox.
|
46
|
-
<extension module='org.torquebox.
|
47
|
-
<extension module='org.torquebox.
|
48
|
-
<extension module='org.torquebox.
|
49
|
-
|
43
|
+
<extension module='org.torquebox.bootstrap'/>
|
44
|
+
<extension module='org.torquebox.core'/>
|
45
|
+
<extension module='org.torquebox.cache'/>
|
46
|
+
<extension module='org.torquebox.cdi'/>
|
47
|
+
<extension module='org.torquebox.jobs'/>
|
48
|
+
<extension module='org.torquebox.messaging'/>
|
49
|
+
<extension module='org.torquebox.security'/>
|
50
|
+
<extension module='org.torquebox.services'/>
|
51
|
+
<!--<extension module='org.torquebox.stomp'/>-->
|
52
|
+
<extension module='org.torquebox.web'/>
|
53
|
+
<extension module='org.projectodd.polyglot.hasingleton'/>
|
50
54
|
</extensions>
|
51
55
|
|
52
56
|
<profile>
|
@@ -90,14 +94,14 @@
|
|
90
94
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
|
91
95
|
<connection-url>jdbc:h2:${jboss.server.data.dir}/test;DB_CLOSE_DELAY=-1</connection-url>
|
92
96
|
<driver>h2</driver>
|
93
|
-
<pool
|
97
|
+
<pool/>
|
94
98
|
<security>
|
95
99
|
<user-name>sa</user-name>
|
96
100
|
<password>sa</password>
|
97
101
|
</security>
|
98
|
-
<validation
|
99
|
-
<timeout
|
100
|
-
<statement
|
102
|
+
<validation/>
|
103
|
+
<timeout/>
|
104
|
+
<statement/>
|
101
105
|
</datasource>
|
102
106
|
<datasource jndi-name="java:jboss/datasources/MysqlDS" enabled="${mysql.enabled}" use-java-context="true" pool-name="MysqlDS">
|
103
107
|
<connection-url>jdbc:mysql://${OPENSHIFT_DB_HOST}:${OPENSHIFT_DB_PORT}/${OPENSHIFT_APP_NAME}</connection-url>
|
@@ -129,7 +133,7 @@
|
|
129
133
|
</datasources>
|
130
134
|
</subsystem>
|
131
135
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
|
132
|
-
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />
|
136
|
+
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" deployment-timeout="1200" />
|
133
137
|
</subsystem>
|
134
138
|
<subsystem xmlns="urn:jboss:domain:ee:1.0" />
|
135
139
|
<subsystem xmlns="urn:jboss:domain:ejb3:1.0" />
|
@@ -147,6 +151,12 @@
|
|
147
151
|
<eviction strategy="NONE"/>
|
148
152
|
</local-cache>
|
149
153
|
</cache-container>
|
154
|
+
<cache-container name="torquebox" default-cache="sessions">
|
155
|
+
<local-cache name="sessions">
|
156
|
+
<eviction strategy="LRU" max-entries="10000"/>
|
157
|
+
<expiration max-idle="10000"/>
|
158
|
+
</local-cache>
|
159
|
+
</cache-container>
|
150
160
|
</subsystem>
|
151
161
|
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
|
152
162
|
<subsystem xmlns="urn:jboss:domain:jca:1.0">
|
@@ -199,13 +209,70 @@
|
|
199
209
|
</virtual-server>
|
200
210
|
</subsystem>
|
201
211
|
<subsystem xmlns="urn:jboss:domain:weld:1.0" />
|
202
|
-
<subsystem xmlns='urn:jboss:domain:
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
212
|
+
<subsystem xmlns='urn:jboss:domain:messaging:1.1'>
|
213
|
+
<hornetq-server>
|
214
|
+
<persistence-enabled>true</persistence-enabled>
|
215
|
+
<journal-file-size>102400</journal-file-size>
|
216
|
+
<journal-min-files>2</journal-min-files>
|
217
|
+
<connectors>
|
218
|
+
<in-vm-connector name='in-vm' server-id='0'/>
|
219
|
+
</connectors>
|
220
|
+
<acceptors>
|
221
|
+
<in-vm-acceptor name='in-vm' server-id='0'/>
|
222
|
+
</acceptors>
|
223
|
+
<security-enabled>false</security-enabled>
|
224
|
+
<address-settings>
|
225
|
+
<address-setting match='#'>
|
226
|
+
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
|
227
|
+
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
|
228
|
+
<redelivery-delay>0</redelivery-delay>
|
229
|
+
<max-size-bytes>20971520</max-size-bytes>
|
230
|
+
<message-counter-history-day-limit>10</message-counter-history-day-limit>
|
231
|
+
<address-full-policy>PAGE</address-full-policy>
|
232
|
+
</address-setting>
|
233
|
+
</address-settings>
|
234
|
+
<jms-connection-factories>
|
235
|
+
<connection-factory name='InVmConnectionFactory'>
|
236
|
+
<connectors>
|
237
|
+
<connector-ref connector-name='in-vm'/>
|
238
|
+
</connectors>
|
239
|
+
<entries>
|
240
|
+
<entry name='java:/ConnectionFactory'/>
|
241
|
+
</entries>
|
242
|
+
</connection-factory>
|
243
|
+
<connection-factory name='RemoteConnectionFactory'>
|
244
|
+
<connectors>
|
245
|
+
<connector-ref connector-name='in-vm'/>
|
246
|
+
</connectors>
|
247
|
+
<entries>
|
248
|
+
<entry name='RemoteConnectionFactory'/>
|
249
|
+
</entries>
|
250
|
+
</connection-factory>
|
251
|
+
<pooled-connection-factory name='hornetq-ra'>
|
252
|
+
<transaction mode='xa'/>
|
253
|
+
<connectors>
|
254
|
+
<connector-ref connector-name='in-vm'/>
|
255
|
+
</connectors>
|
256
|
+
<entries>
|
257
|
+
<entry name='java:/JmsXA'/>
|
258
|
+
</entries>
|
259
|
+
</pooled-connection-factory>
|
260
|
+
</jms-connection-factories>
|
261
|
+
<jms-destinations/>
|
262
|
+
<jmx-management-enabled>false</jmx-management-enabled>
|
263
|
+
</hornetq-server>
|
264
|
+
</subsystem>
|
265
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-bootstrap:1.0'/>
|
266
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-core:1.0'/>
|
267
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-cache:1.0'/>
|
268
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-cdi:1.0'/>
|
269
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-jobs:1.0'/>
|
270
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-messaging:1.0'/>
|
271
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-security:1.0'/>
|
272
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-services:1.0'/>
|
273
|
+
<!--<subsystem xmlns='urn:jboss:domain:torquebox-stomp:1.0' socket-binding='stomp'/>-->
|
274
|
+
<subsystem xmlns='urn:jboss:domain:torquebox-web:1.0'/>
|
275
|
+
<subsystem xmlns='urn:jboss:domain:polyglot-hasingleton:1.0'/>
|
209
276
|
</profile>
|
210
277
|
|
211
278
|
<interfaces>
|
@@ -227,6 +294,9 @@
|
|
227
294
|
<socket-binding name="remoting" port="4447"/>
|
228
295
|
<socket-binding name="txn-recovery-environment" port="4712"/>
|
229
296
|
<socket-binding name="txn-status-manager" port="4713"/>
|
297
|
+
<!--<socket-binding name='messaging' port='5445' interface="public"/>-->
|
298
|
+
<!--<socket-binding name='messaging-throughput' port='5455'/>-->
|
299
|
+
<!--<socket-binding name='stomp' port='8675'/>-->
|
230
300
|
</socket-binding-group>
|
231
301
|
|
232
302
|
</server>
|
@@ -32,6 +32,7 @@
|
|
32
32
|
<extension module="org.jboss.as.jmx"/>
|
33
33
|
<extension module="org.jboss.as.jpa"/>
|
34
34
|
<extension module="org.jboss.as.logging"/>
|
35
|
+
<extension module="org.jboss.as.messaging"/>
|
35
36
|
<extension module="org.jboss.as.naming"/>
|
36
37
|
<extension module="org.jboss.as.sar"/>
|
37
38
|
<extension module="org.jboss.as.security"/>
|
@@ -39,18 +40,10 @@
|
|
39
40
|
<extension module="org.jboss.as.transactions"/>
|
40
41
|
<extension module="org.jboss.as.web" />
|
41
42
|
<extension module="org.jboss.as.weld" />
|
42
|
-
<!--Torquebox-extensions-->
|
43
43
|
</extensions>
|
44
44
|
|
45
45
|
<profile>
|
46
46
|
<subsystem xmlns="urn:jboss:domain:logging:1.0">
|
47
|
-
<!--console-handler name="CONSOLE">
|
48
|
-
<level name="INFO"/>
|
49
|
-
<formatter>
|
50
|
-
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
|
51
|
-
</formatter>
|
52
|
-
</console-handler-->
|
53
|
-
|
54
47
|
<periodic-rotating-file-handler name="FILE">
|
55
48
|
<level name="INFO"/>
|
56
49
|
<formatter>
|
@@ -83,14 +76,14 @@
|
|
83
76
|
<datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
|
84
77
|
<connection-url>jdbc:h2:${jboss.server.data.dir}/test;DB_CLOSE_DELAY=-1</connection-url>
|
85
78
|
<driver>h2</driver>
|
86
|
-
<pool
|
79
|
+
<pool/>
|
87
80
|
<security>
|
88
81
|
<user-name>sa</user-name>
|
89
82
|
<password>sa</password>
|
90
83
|
</security>
|
91
|
-
<validation
|
92
|
-
<timeout
|
93
|
-
<statement
|
84
|
+
<validation/>
|
85
|
+
<timeout/>
|
86
|
+
<statement/>
|
94
87
|
</datasource>
|
95
88
|
<datasource jndi-name="java:jboss/datasources/MysqlDS" enabled="${mysql.enabled}" use-java-context="true" pool-name="MysqlDS">
|
96
89
|
<connection-url>jdbc:mysql://${OPENSHIFT_DB_HOST}:${OPENSHIFT_DB_PORT}/${OPENSHIFT_APP_NAME}</connection-url>
|
@@ -122,7 +115,7 @@
|
|
122
115
|
</datasources>
|
123
116
|
</subsystem>
|
124
117
|
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
|
125
|
-
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />
|
118
|
+
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" deployment-timeout="1200" />
|
126
119
|
</subsystem>
|
127
120
|
<subsystem xmlns="urn:jboss:domain:ee:1.0" />
|
128
121
|
<subsystem xmlns="urn:jboss:domain:ejb3:1.0" />
|
@@ -192,7 +185,6 @@
|
|
192
185
|
</virtual-server>
|
193
186
|
</subsystem>
|
194
187
|
<subsystem xmlns="urn:jboss:domain:weld:1.0" />
|
195
|
-
<!--Torquebox-subsystems-->
|
196
188
|
</profile>
|
197
189
|
|
198
190
|
<interfaces>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openshifter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Simplify deployments of JRuby applications to OpenShift
|
15
15
|
email:
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.8.
|
73
|
+
rubygems_version: 1.8.11
|
74
74
|
signing_key:
|
75
75
|
specification_version: 3
|
76
76
|
summary: CLI tool to ease OpenShift deployments
|