summaryrefslogtreecommitdiffstats
path: root/Documentation/pgm-daemon.txt
blob: 0b1a3e5b11dace57858449a1e927c3ee8798bf22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
= daemon

== NAME
daemon - Gerrit network server

== SYNOPSIS
[verse]
--
_java_ -jar gerrit.war _daemon_
  -d <SITE_PATH>
  [--enable-httpd | --disable-httpd]
  [--enable-sshd | --disable-sshd]
  [--console-log]
  [--slave]
  [--headless]
  [--init]
  [-s]
--

== DESCRIPTION
Runs the Gerrit network daemon on the local system, configured as
per the local copy of link:config-gerrit.html[gerrit.config].

The path to gerrit.config is read from the metadata database,
which requires that all slaves (and master) reading from the same
database must place gerrit.config at the same location on the local
filesystem.  However, any option within gerrit.config, including
link:config-gerrit.html#gerrit.basePath[gerrit.basePath] may be set
to different values.

== OPTIONS

-d::
--site-path::
	Location of the gerrit.config file, and all other per-site
	configuration data, supporting libraries and log files.

--enable-httpd::
--disable-httpd::
	Enable (or disable) the internal HTTP daemon, answering
	web requests. Enabled by default when --slave is not used.

--enable-sshd::
--disable-sshd::
	Enable (or disable) the internal SSH daemon, answering SSH
	clients and remotely executed commands.  Enabled by default.

--slave::
	Run in slave mode, permitting only read operations
    by clients.  Commands which modify state such as
    link:cmd-receive-pack.html[receive-pack] (creates new changes
    or updates existing ones) or link:cmd-review.html[review]
    (sets approve marks) are disabled.
+
This option automatically implies '--enable-sshd'.

--console-log::
	Send log messages to the console, instead of to the standard
	log file '$site_path/logs/error_log'.

--headless::
	Don't start the default Gerrit UI. May be useful when Gerrit is
	run with an alternative UI.

--init::
	Run init before starting the daemon. This will create a new site or
	upgrade an existing site.

--s::
	Start link:dev-inspector.html[Gerrit Inspector] on the console, a
	built-in interactive inspection environment to assist debugging and
	troubleshooting of Gerrit code.
+
This options requires 'jython.jar' from the http://www.jython.org[Jython distribution]
to be present in '$site_path/lib' directory.

== CONTEXT
This command can only be run on a server which has direct
connectivity to the metadata database, and local access to the
managed Git repositories.

== LOGGING
Error and warning messages from the server are automatically written
to the log file under '$site_path/logs/error_log'.  This log file
is automatically rotated at 12:00 AM GMT each day, allowing an
external log cleaning service to clean up the prior logs.

== KNOWN ISSUES
Slave daemon caches can quickly become out of date when modifications
are made on the master.  The following configuration is suggested in
a slave to reduce the maxAge for each cache entry, so that changes
are recognized in a reasonable period of time:

----
[cache "accounts"]
  maxAge = 5 min
[cache "diff"]
  maxAge = 5 min
[cache "groups"]
  maxAge = 5 min
[cache "projects"]
  maxAge = 5 min
[cache "sshkeys"]
  maxAge = 5 min
----

and if LDAP support was enabled, also include:
----
[cache "ldap_groups"]
  maxAge = 5 min
[cache "ldap_usernames"]
  maxAge = 5 min
----

Automatic cache coherency between master and slave systems is
planned to be implemented in a future version.

GERRIT
------
Part of link:index.html[Gerrit Code Review]

SEARCHBOX
---------