openshifter 0.1

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 ADDED
@@ -0,0 +1,3 @@
1
+ ## 0.1
2
+
3
+ * first version
data/LICENSE ADDED
@@ -0,0 +1,175 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
data/README.md ADDED
@@ -0,0 +1,73 @@
1
+ ## OpenShifter
2
+
3
+ Simple CLI tool to siplify the deployment of Sinatra applications using JRuby to OpenShift
4
+
5
+ ## How to
6
+
7
+ ### Step 1
8
+
9
+ Install openshifter
10
+
11
+ gem install openshifter
12
+
13
+ ### Step 2
14
+
15
+ Create your application on OpenShift (JBoss) and clone your repository localy, then cd into the directory.
16
+
17
+ ### Step 3
18
+
19
+ Now you setup your environment
20
+
21
+ openshifter-setup
22
+
23
+ The tools downloads JRuby and JRuby-Rack to create runtime environment. Then Bundler is instaled locally for the application. The whole environment is vendored for you application.
24
+
25
+ ### Step 4
26
+
27
+ At the setup time and whenever you add gems to your Gemfile, just run
28
+
29
+ openshifter-bundle
30
+
31
+ to vendor your gems locally.
32
+
33
+ ### Step 5
34
+
35
+ Add, commit and push to openshift.
36
+
37
+ ## Interface
38
+
39
+ Setup the environment
40
+
41
+ openshifter-setup
42
+
43
+ Bundler wrapper
44
+
45
+ openshifter-bundle
46
+
47
+ Gem wrapper
48
+
49
+ openshifter-gem
50
+
51
+ JRuby wrapper
52
+
53
+ openshifter-ruby
54
+
55
+ Clean up your environment
56
+
57
+ openshifter-clean
58
+
59
+ ## License
60
+
61
+ Copyright 2012 Marek Jelen
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
data/ROADMAP.md ADDED
@@ -0,0 +1,4 @@
1
+ ## Expected features
2
+
3
+ * add possibilty to download JRuby on OpenShift instead of vendoring
4
+ * ensure compatibility with other frameworks (Rails)
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../lib/openshifter/init', __FILE__)
3
+
4
+ exec("java -jar .openshift/lib/jruby.jar -S bundle #{$*.join(' ')}")
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../lib/openshifter/init', __FILE__)
3
+
4
+ puts '-> Removing jRuby'
5
+ `rm -rf .openshift/lib`
6
+
7
+ puts '-> Removing RubyGems'
8
+ `rm -rf .openshift/gems`
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../lib/openshifter/init', __FILE__)
3
+
4
+ exec("java -jar .openshift/lib/jruby.jar -S gem #{$*.join(' ')}")
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../lib/openshifter/init', __FILE__)
3
+
4
+ exec("java -jar .openshift/lib/jruby.jar #{$*.join(' ')}")
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../lib/openshifter/init', __FILE__)
3
+
4
+ unless File.exists?('.openshift/openshifter')
5
+ puts '-> Removing default .openshift directory'
6
+ FileUtils.rm_rf('.openshift')
7
+
8
+ puts '-> Copying openshifter .openshift direcotry'
9
+ FileUtils.cp_r(File.expand_path('../../templates/openshift', __FILE__), '.openshift')
10
+
11
+ puts '-> Cleaning other default mess'
12
+ FileUtils.rm_rf('src')
13
+ FileUtils.rm_rf('pom.xml')
14
+ FileUtils.rm_rf('README')
15
+ end
16
+
17
+ unless File.exists?('.openshift/lib/jruby.jar')
18
+ puts "-> Downloading jRuby"
19
+ `curl -o .openshift/lib/jruby.jar "http://jruby.org.s3.amazonaws.com/downloads/1.6.6/jruby-complete-1.6.6.jar"`
20
+ end
21
+
22
+ unless File.exists?('.openshift/lib/jruby-rack.jar')
23
+ puts "-> Downloading jRuby-Rack"
24
+ `curl -o .openshift/lib/jruby-rack.jar "http://repository.codehaus.org/org/jruby/rack/jruby-rack/1.1.3/jruby-rack-1.1.3.jar"`
25
+ end
26
+
27
+ puts '-> Installing Bundler'
28
+ puts `java -jar .openshift/lib/jruby.jar -S gem install bundler --no-ri --no-rdoc`
@@ -0,0 +1,8 @@
1
+ require 'fileutils'
2
+
3
+ unless File.exists?('.openshift')
4
+ puts '--> Invalid direcotry - no .openshift directory'
5
+ exit(1)
6
+ end
7
+
8
+ ENV['GEM_PATH'] = ENV['GEM_HOME'] = File.expand_path('.openshift/gems')
@@ -0,0 +1,3 @@
1
+ module OpenShifter
2
+ VERSION = '0.1' unless const_defined?(:VERSION)
3
+ end
@@ -0,0 +1,118 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fileutils'
4
+
5
+ FileUtils.cd(ENV['OPENSHIFT_REPO_DIR'])
6
+
7
+ ROOT=File.join(ENV['OPENSHIFT_REPO_DIR'], 'deployments')
8
+ TARGET = File.join(ROOT, 'application.war')
9
+ TARGET_META = File.join(TARGET, 'META-INF')
10
+ TARGET_WEB = File.join(TARGET, 'WEB-INF')
11
+
12
+ puts '-> Cleaning target'
13
+
14
+ FileUtils.rm_rf(ROOT)
15
+
16
+ puts '-> Creating target'
17
+ FileUtils.mkdir_p(TARGET)
18
+
19
+ puts '-> Public files'
20
+ FileUtils.cp_r(Dir.glob('public/*'), TARGET)
21
+
22
+ puts '-> META-INF'
23
+ FileUtils.mkdir_p(TARGET_META)
24
+
25
+ puts '--> Manifest'
26
+ File.open(File.join(TARGET_META, 'MANIFEST.MF'), 'w') do |file|
27
+ data = <<EOF
28
+ Manifest-Version: 1.0
29
+ Created-By: OpenShifter
30
+ EOF
31
+ file.print(data)
32
+ end
33
+
34
+ puts '--> init.rb'
35
+ File.open(File.join(TARGET_META, 'init.rb'), 'w') do |file|
36
+ data = <<EOF
37
+ ENV['GEM_HOME'] ||= $servlet_context.getRealPath('/WEB-INF/gems')
38
+ ENV['BUNDLE_GEMFILE'] = 'Gemfile'
39
+ ENV['RACK_ENV'] = 'production'
40
+ require 'psych.rb' # Hack for Ruby 1.6.6
41
+ EOF
42
+ file.print(data)
43
+ end
44
+
45
+ puts '-> WEB-INF'
46
+ FileUtils.mkdir_p(TARGET_WEB)
47
+
48
+ puts '--> Application data'
49
+ app = Dir.glob('*')
50
+ app.delete('.openshift')
51
+ app.delete('public')
52
+ app.delete('deployments')
53
+ FileUtils.cp_r(app, TARGET_WEB)
54
+
55
+ puts '--> Gems'
56
+ FileUtils.cp_r('.openshift/gems', File.join(TARGET_WEB, 'gems'))
57
+
58
+ puts '--> Lib'
59
+ FileUtils.mkdir_p(File.join(TARGET_WEB, 'lib'))
60
+
61
+ puts '--> Copy runtime'
62
+ FileUtils.cp(Dir.glob('.openshift/lib/*.jar'), File.join(TARGET_WEB, 'lib'))
63
+
64
+ puts '--> jboss-web.xml'
65
+ File.open(File.join(TARGET_WEB, 'jboss-web.xml'), 'w') do |file|
66
+ data = <<EOF
67
+ <?xml version="1.0" encoding="UTF-8"?>
68
+ <jboss-web>
69
+ <context-root />
70
+ </jboss-web>
71
+ EOF
72
+ file.print(data)
73
+ end
74
+
75
+ puts '--> web.xml'
76
+ File.open(File.join(TARGET_WEB, 'web.xml'), 'w') do |file|
77
+ data = <<EOF
78
+ <!DOCTYPE web-app PUBLIC
79
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
80
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
81
+ <web-app>
82
+
83
+ <context-param>
84
+ <param-name>public.root</param-name>
85
+ <param-value>/</param-value>
86
+ </context-param>
87
+
88
+ <context-param>
89
+ <param-name>jruby.compat.version</param-name>
90
+ <param-value>1.9</param-value>
91
+ </context-param>
92
+
93
+ <context-param>
94
+ <param-name>rack.env</param-name>
95
+ <param-value>production</param-value>
96
+ </context-param>
97
+
98
+ <filter>
99
+ <filter-name>RackFilter</filter-name>
100
+ <filter-class>org.jruby.rack.RackFilter</filter-class>
101
+ </filter>
102
+
103
+ <filter-mapping>
104
+ <filter-name>RackFilter</filter-name>
105
+ <url-pattern>/*</url-pattern>
106
+ </filter-mapping>
107
+
108
+ <listener>
109
+ <listener-class>org.jruby.rack.RackServletContextListener</listener-class>
110
+ </listener>
111
+
112
+ </web-app>
113
+ EOF
114
+ file.print(data)
115
+ end
116
+
117
+ puts '-> Deployment marker'
118
+ FileUtils.touch("#{TARGET}.dodeploy")
@@ -0,0 +1 @@
1
+ #!/bin/bash
@@ -0,0 +1 @@
1
+ #!/bin/bash
@@ -0,0 +1 @@
1
+ #!/bin/bash
@@ -0,0 +1,217 @@
1
+ <!--
2
+ ~ JBoss, Home of Professional Open Source.
3
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
4
+ ~ as indicated by the @author tags. See the copyright.txt file in the
5
+ ~ distribution for a full listing of individual contributors.
6
+ ~
7
+ ~ This is free software; you can redistribute it and/or modify it
8
+ ~ under the terms of the GNU Lesser General Public License as
9
+ ~ published by the Free Software Foundation; either version 2.1 of
10
+ ~ the License, or (at your option) any later version.
11
+ ~
12
+ ~ This software is distributed in the hope that it will be useful,
13
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ ~ Lesser General Public License for more details.
16
+ ~
17
+ ~ You should have received a copy of the GNU Lesser General Public
18
+ ~ License along with this software; if not, write to the Free
19
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21
+ -->
22
+
23
+ <server xmlns="urn:jboss:domain:1.0">
24
+
25
+ <extensions>
26
+ <extension module="org.jboss.as.clustering.infinispan"/>
27
+ <extension module="org.jboss.as.connector"/>
28
+ <extension module="org.jboss.as.deployment-scanner"/>
29
+ <extension module="org.jboss.as.ee"/>
30
+ <extension module="org.jboss.as.ejb3"/>
31
+ <extension module="org.jboss.as.jaxrs"/>
32
+ <extension module="org.jboss.as.jmx"/>
33
+ <extension module="org.jboss.as.jpa"/>
34
+ <extension module="org.jboss.as.logging"/>
35
+ <extension module="org.jboss.as.naming"/>
36
+ <extension module="org.jboss.as.sar"/>
37
+ <extension module="org.jboss.as.security"/>
38
+ <extension module="org.jboss.as.threads"/>
39
+ <extension module="org.jboss.as.transactions"/>
40
+ <extension module="org.jboss.as.web" />
41
+ <extension module="org.jboss.as.weld" />
42
+ </extensions>
43
+
44
+ <profile>
45
+ <subsystem xmlns="urn:jboss:domain:logging:1.0">
46
+ <!--console-handler name="CONSOLE">
47
+ <level name="INFO"/>
48
+ <formatter>
49
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
50
+ </formatter>
51
+ </console-handler-->
52
+
53
+ <periodic-rotating-file-handler name="FILE">
54
+ <level name="INFO"/>
55
+ <formatter>
56
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
57
+ </formatter>
58
+ <file relative-to="jboss.server.log.dir" path="server.log"/>
59
+ <suffix value=".yyyy-MM-dd"/>
60
+ </periodic-rotating-file-handler>
61
+
62
+ <logger category="com.arjuna">
63
+ <level name="WARN"/>
64
+ </logger>
65
+ <logger category="org.apache.tomcat.util.modeler">
66
+ <level name="WARN"/>
67
+ </logger>
68
+ <logger category="sun.rmi">
69
+ <level name="WARN"/>
70
+ </logger>
71
+
72
+ <root-logger>
73
+ <level name="INFO"/>
74
+ <handlers>
75
+ <!--handler name="CONSOLE"/-->
76
+ <handler name="FILE"/>
77
+ </handlers>
78
+ </root-logger>
79
+ </subsystem>
80
+ <subsystem xmlns="urn:jboss:domain:datasources:1.0">
81
+ <datasources>
82
+ <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
83
+ <connection-url>jdbc:h2:${jboss.server.data.dir}/test;DB_CLOSE_DELAY=-1</connection-url>
84
+ <driver>h2</driver>
85
+ <pool></pool>
86
+ <security>
87
+ <user-name>sa</user-name>
88
+ <password>sa</password>
89
+ </security>
90
+ <validation></validation>
91
+ <timeout></timeout>
92
+ <statement></statement>
93
+ </datasource>
94
+ <datasource jndi-name="java:jboss/datasources/MysqlDS" enabled="${mysql.enabled}" use-java-context="true" pool-name="MysqlDS">
95
+ <connection-url>jdbc:mysql://${OPENSHIFT_DB_HOST}:${OPENSHIFT_DB_PORT}/${OPENSHIFT_APP_NAME}</connection-url>
96
+ <driver>mysql</driver>
97
+ <security>
98
+ <user-name>${OPENSHIFT_DB_USERNAME}</user-name>
99
+ <password>${OPENSHIFT_DB_PASSWORD}</password>
100
+ </security>
101
+ </datasource>
102
+ <datasource jndi-name="java:jboss/datasources/PostgreSQLDS" enabled="${postgresql.enabled}" use-java-context="true" pool-name="PostgreSQLDS" use-ccm="true">
103
+ <connection-url>jdbc:postgresql://${OPENSHIFT_DB_HOST}:${OPENSHIFT_DB_PORT}/${OPENSHIFT_APP_NAME}</connection-url>
104
+ <driver>postgresql</driver>
105
+ <security>
106
+ <user-name>${OPENSHIFT_DB_USERNAME}</user-name>
107
+ <password>${OPENSHIFT_DB_PASSWORD}</password>
108
+ </security>
109
+ </datasource>
110
+ <drivers>
111
+ <driver name="h2" module="com.h2database.h2">
112
+ <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
113
+ </driver>
114
+ <driver name="mysql" module="com.mysql.jdbc">
115
+ <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
116
+ </driver>
117
+ <driver name="postgresql" module="org.postgresql.jdbc">
118
+ <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
119
+ </driver>
120
+ </drivers>
121
+ </datasources>
122
+ </subsystem>
123
+ <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
124
+ <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />
125
+ </subsystem>
126
+ <subsystem xmlns="urn:jboss:domain:ee:1.0" />
127
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.0" />
128
+ <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">
129
+ <cache-container name="hibernate" default-cache="local-query">
130
+ <local-cache name="entity">
131
+ <eviction strategy="LRU" max-entries="10000"/>
132
+ <expiration max-idle="100000"/>
133
+ </local-cache>
134
+ <local-cache name="local-query">
135
+ <eviction strategy="LRU" max-entries="10000"/>
136
+ <expiration max-idle="100000"/>
137
+ </local-cache>
138
+ <local-cache name="timestamps">
139
+ <eviction strategy="NONE"/>
140
+ </local-cache>
141
+ </cache-container>
142
+ </subsystem>
143
+ <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
144
+ <subsystem xmlns="urn:jboss:domain:jca:1.0">
145
+ <archive-validation enabled="false" />
146
+ <bean-validation enabled="false" />
147
+ <default-workmanager>
148
+ <short-running-threads blocking="true">
149
+ <core-threads count="5" per-cpu="10"/>
150
+ <queue-length count="5" per-cpu="10"/>
151
+ <max-threads count="5" per-cpu="10"/>
152
+ <keepalive-time time="10" unit="seconds"/>
153
+ </short-running-threads>
154
+ <long-running-threads blocking="true">
155
+ <core-threads count="5" per-cpu="10"/>
156
+ <queue-length count="5" per-cpu="10"/>
157
+ <max-threads count="5" per-cpu="10"/>
158
+ <keepalive-time time="10" unit="seconds"/>
159
+ </long-running-threads>
160
+ </default-workmanager>
161
+ </subsystem>
162
+ <subsystem xmlns="urn:jboss:domain:jpa:1.0">
163
+ <jpa default-datasource=""/>
164
+ </subsystem>
165
+ <subsystem xmlns="urn:jboss:domain:naming:1.0" />
166
+ <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0" />
167
+ <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
168
+ <subsystem xmlns="urn:jboss:domain:security:1.0">
169
+ <security-domains>
170
+ <security-domain name="other" cache-type="default">
171
+ <authentication>
172
+ <login-module code="UsersRoles" flag="required"/>
173
+ </authentication>
174
+ </security-domain>
175
+ </security-domains>
176
+ </subsystem>
177
+ <subsystem xmlns="urn:jboss:domain:threads:1.0"/>
178
+ <subsystem xmlns="urn:jboss:domain:transactions:1.0">
179
+ <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
180
+ <core-environment>
181
+ <process-id>
182
+ <uuid />
183
+ </process-id>
184
+ </core-environment>
185
+ <coordinator-environment default-timeout="300"/>
186
+ </subsystem>
187
+ <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
188
+ <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
189
+ <virtual-server name="default-host" enable-welcome-root="false">
190
+ <alias name="localhost" />
191
+ </virtual-server>
192
+ </subsystem>
193
+ <subsystem xmlns="urn:jboss:domain:weld:1.0" />
194
+ </profile>
195
+
196
+ <interfaces>
197
+ <interface name="management">
198
+ <loopback-address value="${OPENSHIFT_INTERNAL_IP}"/>
199
+ </interface>
200
+ <interface name="public">
201
+ <loopback-address value="${OPENSHIFT_INTERNAL_IP}"/>
202
+ </interface>
203
+ </interfaces>
204
+
205
+ <socket-binding-group name="standard-sockets" default-interface="public">
206
+ <socket-binding name="http" port="8080"/>
207
+ <socket-binding name="https" port="8443"/>
208
+ <socket-binding name="jmx-connector-registry" port="1090"/>
209
+ <socket-binding name="jmx-connector-server" port="1091"/>
210
+ <socket-binding name="jndi" port="1099"/>
211
+ <socket-binding name="osgi-http" port="8090"/>
212
+ <socket-binding name="remoting" port="4447"/>
213
+ <socket-binding name="txn-recovery-environment" port="4712"/>
214
+ <socket-binding name="txn-status-manager" port="4713"/>
215
+ </socket-binding-group>
216
+
217
+ </server>
File without changes
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: openshifter
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Marek Jelen
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-17 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Simplify deployments of Sinatra applications using JRuby to OpenShift
15
+ email:
16
+ - marek@jelen.biz
17
+ executables:
18
+ - openshifter-bundle
19
+ - openshifter-clean
20
+ - openshifter-gem
21
+ - openshifter-ruby
22
+ - openshifter-setup
23
+ extensions: []
24
+ extra_rdoc_files: []
25
+ files:
26
+ - bin/openshifter-bundle
27
+ - bin/openshifter-clean
28
+ - bin/openshifter-gem
29
+ - bin/openshifter-ruby
30
+ - bin/openshifter-setup
31
+ - lib/openshifter/init.rb
32
+ - lib/openshifter/version.rb
33
+ - templates/openshift/action_hooks/build
34
+ - templates/openshift/action_hooks/deploy
35
+ - templates/openshift/action_hooks/post_deploy
36
+ - templates/openshift/action_hooks/pre_build
37
+ - templates/openshift/config/standalone.xml
38
+ - templates/openshift/gems/README
39
+ - templates/openshift/lib/README
40
+ - templates/openshift/openshifter
41
+ - LICENSE
42
+ - README.md
43
+ - ROADMAP.md
44
+ - CHANGELOG.md
45
+ homepage: http://github.com/marekjelen/openshifter
46
+ licenses: []
47
+ post_install_message:
48
+ rdoc_options: []
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project:
65
+ rubygems_version: 1.8.10
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: CLI tool to ease OpenShift deployments
69
+ test_files: []