commit | author | age
|
b774de
|
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
|
679f2b
|
8 |
as Gitblit Express is not a source distribution to be built with Maven on OpenShift.
|
b774de
|
9 |
|
JM |
10 |
Gitblit automatically adjusts itself to running on OpenShift. Repositories, users,
|
679f2b
|
11 |
federation proposals, setting overrides, and Groovy push scripts are stored in *OPENSHIFT_DATA_DIR*.
|
b774de
|
12 |
|
JM |
13 |
It is recommended to enable all RPC settings in the `web.xml` file to allow remote
|
|
14 |
administration and, more importantly, configuration of your Gitblit Express
|
|
15 |
installation using the Gitblit Manager.
|
|
16 |
|
679f2b
|
17 |
It is also recommended to set *web.forwardSlashCharacter* to ! because OpenShift
|
JM |
18 |
runs on JBoss/Tomcat behind a proxy, neither of which are friendly to embedded
|
|
19 |
forward-slashes.
|
|
20 |
|
b774de
|
21 |
Please do not change the following settings unless you know exactly what you are
|
JM |
22 |
doing:
|
|
23 |
|
|
24 |
- *git.repositoriesFolder*
|
679f2b
|
25 |
- *groovy.scriptsFolder*
|
b774de
|
26 |
- *federation.proposalsFolder*
|
679f2b
|
27 |
- *realm.userService* (for standard users.conf)
|
b774de
|
28 |
|
JM |
29 |
Additionally, it is recommended to force your Gitblit installation to cleanup up
|
|
30 |
older versions on your OpenShift filesystem to maximize available space for your
|
|
31 |
repositories.
|
|
32 |
|
|
33 |
Append the following command to your ./openshift/action_hooks/build file:
|
|
34 |
|
|
35 |
rm -fr $OPENSHIFT_APP_DIR/jbossas-7.0/standalone/tmp/vfs/*
|
|
36 |
|
679f2b
|
37 |
Lastly, you may want to play with the heap and permgen settings of your Gitblit
|
JM |
38 |
instance because the default heap for the JVM is 95 MB, which may be a little
|
|
39 |
tight.
|
|
40 |
|
|
41 |
To do that you will have to login to your account via ssh:
|
|
42 |
|
|
43 |
ssh hashcode@app-domain.rhcloud.com
|
|
44 |
|
|
45 |
and then you will have to manipulate the -Xmx and -XX:MaxPermSize values.
|
|
46 |
|
|
47 |
vi $OPENSHIFT_APP_DIR/jbossas-7.0/bin/standalone.conf
|
|
48 |
ctl_app restart
|
|
49 |
|
|
50 |
OpenShift currently allows 300MB of memory per application which includes ssh access, JVM, etc.
|
|
51 |
The Gitblit demo hosted on OpenShift Express operates with -Xmx160m and -XX:MaxPermSize=90m.
|
|
52 |
|
b774de
|
53 |
For more detailed instructions on how to setup and deploy an OpenShift application
|
JM |
54 |
please see this excellent turorial:
|
|
55 |
|
|
56 |
https://github.com/opensas/play-demo/wiki/Step-12.5---deploy-to-openshift
|