OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 set -e | 6 set -e |
7 | 7 |
8 http_port=8080 | 8 http_port=8080 |
9 ssh_port=29418 | 9 ssh_port=29418 |
10 | 10 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 type = DEVELOPMENT_BECOME_ANY_ACCOUNT | 150 type = DEVELOPMENT_BECOME_ANY_ACCOUNT |
151 gitBasicAuth = true | 151 gitBasicAuth = true |
152 [gerrit] | 152 [gerrit] |
153 canonicalWebUrl = http://$(hostname):${http_port}/ | 153 canonicalWebUrl = http://$(hostname):${http_port}/ |
154 [httpd] | 154 [httpd] |
155 listenUrl = http://*:${http_port}/ | 155 listenUrl = http://*:${http_port}/ |
156 [sshd] | 156 [sshd] |
157 listenAddress = *:${ssh_port} | 157 listenAddress = *:${ssh_port} |
158 [sendemail] | 158 [sendemail] |
159 enable = false | 159 enable = false |
| 160 [container] |
| 161 javaOptions = -Duser.home=${rundir}/tmp |
160 EOF | 162 EOF |
161 | 163 |
162 # Initialize the gerrit instance. | 164 # Initialize the gerrit instance. |
163 java -jar "$gerrit_exe" init --no-auto-start --batch -d "${rundir}" | 165 java -jar "$gerrit_exe" init --no-auto-start --batch -d "${rundir}" |
164 | 166 |
165 # Create SSH key pair for the first user. | 167 # Create SSH key pair for the first user. |
166 mkdir -p "${rundir}/tmp" | 168 mkdir -p "${rundir}/tmp" |
167 ssh-keygen -t rsa -q -f "${rundir}/tmp/id_rsa" -N "" | 169 ssh-keygen -t rsa -q -f "${rundir}/tmp/id_rsa" -N "" |
168 ssh_public_key="$(cat ${rundir}/tmp/id_rsa.pub)" | 170 ssh_public_key="$(cat ${rundir}/tmp/id_rsa.pub)" |
169 | 171 |
(...skipping 28 matching lines...) Expand all Loading... |
198 To use SSH API: | 200 To use SSH API: |
199 ssh ${username}@localhost -p ${ssh_port} -i ${rundir}/tmp/id_rsa gerrit | 201 ssh ${username}@localhost -p ${ssh_port} -i ${rundir}/tmp/id_rsa gerrit |
200 | 202 |
201 To enable 'git push' without a password prompt: | 203 To enable 'git push' without a password prompt: |
202 git config credential.helper 'store --file=${rundir}/tmp/.git-credentials' | 204 git config credential.helper 'store --file=${rundir}/tmp/.git-credentials' |
203 | 205 |
204 To stop the server: | 206 To stop the server: |
205 ${rundir}/bin/gerrit.sh stop | 207 ${rundir}/bin/gerrit.sh stop |
206 | 208 |
207 EOF | 209 EOF |
OLD | NEW |