commit | author | age
|
044549
|
1 |
## Gitblit on RedHat's OpenShift Cloud Service
|
JM |
2 |
|
|
3 |
The Gitblit Express distribution can be copied to the root of your RedHat OpenShift
|
|
4 |
application repository. Gitblit Express is an exploded WAR file with all appropriate
|
|
5 |
dependencies bundled.
|
|
6 |
|
|
7 |
You should delete the `pom.xml` file and the `src` folder from your application repository
|
|
8 |
as Gitblit Express is not a source distribution to be built with Maven on OpenShift.
|
|
9 |
|
|
10 |
Gitblit automatically adjusts itself to running on OpenShift. Repositories, users,
|
|
11 |
federation proposals, setting overrides, and Groovy push scripts are stored in *OPENSHIFT_DATA_DIR*.
|
|
12 |
|
935986
|
13 |
### Recommended Settings
|
JM |
14 |
|
|
15 |
You should disable the git daemon by setting *git.daemonPort=0*.
|
|
16 |
|
044549
|
17 |
It is recommended to enable all RPC settings in the `web.xml` file to allow remote
|
JM |
18 |
administration and, more importantly, configuration of your Gitblit Express
|
|
19 |
installation using the Gitblit Manager.
|
|
20 |
|
|
21 |
It is also recommended to set *web.forwardSlashCharacter* to ! because OpenShift
|
|
22 |
runs on JBoss/Tomcat behind a proxy, neither of which are friendly to embedded
|
|
23 |
forward-slashes.
|
|
24 |
|
|
25 |
Please do not change the following settings unless you know exactly what you are
|
|
26 |
doing:
|
|
27 |
|
|
28 |
- *git.repositoriesFolder*
|
|
29 |
- *groovy.scriptsFolder*
|
|
30 |
- *federation.proposalsFolder*
|
|
31 |
- *realm.userService* (for standard users.conf)
|
|
32 |
|
935986
|
33 |
### Native Git Failures
|
044549
|
34 |
|
935986
|
35 |
Unfortunately, sometime in early 2013 RedHat changed their SSL certificate such that cloning from/pushing to Gitblit Express over https fails due to an SNI (server name indication) TLS alert. There is no known workaround for native git and https.
|
044549
|
36 |
|
935986
|
37 |
However, if your git client is JGit-based, like Eclipse/EGit, then you can workaround this problem and happily push/clone using https and OpenShift.
|
JM |
38 |
|
|
39 |
Luckily, Java 6-based clients ignore SNI alerts but when using Java 7-based clients, SNI checking is enabled by default. You can disable SNI alerts by specifying the JVM system parameter `-Djsse.enableSNIExtension=false` when your Java-based client launches.
|
|
40 |
|
|
41 |
For Eclipse, you can append `-Djsse.enableSNIExtension=false` to your *eclipse.ini* file.
|
|
42 |
|
|
43 |
### Heap and PermGen
|
|
44 |
|
|
45 |
You may want to play with the heap and permgen settings of your Gitblit
|
044549
|
46 |
instance because the default heap for the JVM is 95 MB, which may be a little
|
JM |
47 |
tight.
|
|
48 |
|
|
49 |
To do that you will have to login to your account via ssh:
|
|
50 |
|
|
51 |
ssh hashcode@app-domain.rhcloud.com
|
|
52 |
|
|
53 |
and then you will have to manipulate the -Xmx and -XX:MaxPermSize values.
|
|
54 |
|
|
55 |
vi $OPENSHIFT_APP_DIR/jbossas-7.0/bin/standalone.conf
|
|
56 |
ctl_app restart
|
|
57 |
|
|
58 |
OpenShift currently allows 300MB of memory per application which includes ssh access, JVM, etc.
|
|
59 |
The Gitblit demo hosted on OpenShift Express operates with -Xmx160m and -XX:MaxPermSize=90m.
|
|
60 |
|
|
61 |
For more detailed instructions on how to setup and deploy an OpenShift application
|
|
62 |
please see this excellent turorial:
|
|
63 |
|
|
64 |
[Deploying to OpenShift](https://github.com/opensas/play-demo/wiki/Step-12.5---deploy-to-openshift)
|