gfservice reads configuration data from the file. (gfservice-agent doesn't read a configuration file.)
The configuration file itself is a Bourne-shell script. It is evaluated as a script by gfservice. Here is an example of the configuration file:
# gfmd entries.
gfmd1=db1.example.com
gfmd2=db2.example.com
Same as Bourne-shell script, lines beginning with '#' and empty lines
are ignored.
The other lines declare shell variables.
In this example, the variable gfmd1
is set to
db1.example.com
and
gfmd2
to
db12.example.com
respectively.
Whitespaces must not be inserted around '='.
The variables named gfmd1
and
gfmd2
are used as "host-id".
To specify a remote host, gfservice uses host-id
instead of hostname:
gfservice start-gfmd
gfmd2
Executing the command, gfservice starts gfmd on
gfmd2
server, metadb2.example.com.
Note that the numbers at the tails of host-ids must be beginning with 1
and must be assigned successively.
For specifying gfsd servers and client hosts, use host-ids
"gfsn
" and "clientn
"
respectively:
# gfsd entries.
gfsd1=fs1.example.com
# client entries
client1=pc1.example.com
client2=pc2.example.com
client3=pc2.example.com
In addition with host-id variables, gfservice recognizes some variables related to host-id.
# Configuration about gfmd1.
gfmd1_CONFIG_GFARM_OPTIONS="-X -A $LOGNAME"
gfmd1_SSH="ssh -i $HOME/.ssh/id_rsa_gfservice"
gfmd1_SUDO=/usr/local/bin/sudo
As shown in this example, a value containing whitespaces can be set
by quotation marks.
$VARNAME
is expanded to the value of the shell or
environment variable VARNAME
.
Variables named "gfmdn
" (gfmd1, gfmd2, ...)
define gfmd servers.
Variable names beginning with "gfmdn
_" such
as gfmd1_SSH
set configuration parameters of
the corresponding "gfmdn
" server.
gfservice currently the following variables:
gfmdn
Register a gfmd server.
Its value represents a hostname (or an IP address) of the server.
Note that gfservice uses the values for destination
hosts of SSH connections only.
To specify host names used in the Gfarm system,
use -h
option in
gfmd
variable instead:
n
_CONFIG_GFARM_OPTOINS
gfmd1=md1-ctl.example.org
gfmd1_CONFIG_GFARM_OPTIONS="-h md1.example.org"
gfmdn
_GFBINDIR
Specify a path to a directory where gfservice-agent
command is installed on the gfmd server.
If the variable is declared, gfservice executes
"$gfmd
/gfservice-agent".
Otherwise it executes "gfservice-agent".
n
_GFBINDIR
gfmdn
_CONFIG_GFARM_OPTIONS
Specify options of config-gfarm command. The default value is empty (no option). gfservice refers this variable to perform config-gfarm and many other sub-commands. Do not delete or edit the declaration even after config-gfarm has been complete.
gfmdn
_PRIVATE_MODE
Set this variable to "true" if gfmd on the remote host is configured in private mode.
gfmdn
_AUTH_TYPE
Specify authentication type ("sharedsecret", "gsi" or "gsi_auth").
If the variable is not declared, its value is chosen from
AUTH_TYPE
value output by
config-gfarm -T command executed on gfmd1.
(Note that the value AUTH_TYPE
above is affected by
the variable gfmd1_CONFIG_GFARM_OPTIONS
.)
gfmdn
_CLUSTER_NAME
Specify a cluster name of the gfmd server. The default value is "" (empty) which means the server belongs to the default cluster.
gfmdn
_SSH
Specify a path to an SSH client command and its options. The variable is used when gfservice executes an SSH client command to connect with the gfsd server. The default value is "ssh".
gfmdn
_SUDO
Specify a path to a Sudo command and options. The variable is used when gfservice executes a Sudo command on the gfsd server via SSH. The default value is "sudo".
Variables named "gfsdn
" (gfsd1, gfsd2, ...)
define gfsd servers.
Variable names beginning with "gfsdn
_" such as
gfsd1_SSH
set configuration parameters of the
corresponding "gfsdn
" server.
gfservice currently recognizes the following variables:
gfsdn
Register a gfsd server.
Its value represents a hostname (or an IP address) of the server.
Note that gfservice uses the values for destination
hosts of SSH connections only.
To specify host names used in the Gfarm system,
use -h
option in
gfsd
variable instead:
n
_CONFIG_GFSD_OPTOINS
gfsd1=fs2-ctl.example.org
gfsd1_CONFIG_GFSD_OPTIONS="-h fs2.example.org"
gfsdn
_GFBINDIR
Specify a path to a directory where gfservice-agent
command is installed on the gfsd server.
If the variable is declared, gfservice executes
"$gfsd
/gfservice-agent".
Otherwise it executes "gfservice-agent".
n
_GFBINDIR
gfsdn
_CONFIG_GFSD_OPTIONS
Specify options of config-gfsd command. The default value is empty (no option). gfservice refers this variable to perform config-gfsd and many other sub-commands. Do not delete or edit the declaration even after config-gfsd has been complete.
gfsdn
_PRIVATE_MODE
Set this variable to "true" if gfsd on the remote host is configured in private mode.
gfsdn
_AUTH_TYPE
Specify authentication type ("sharedsecret", "gsi" or "gsi_auth").
If the variable is not declared, its value is chosen from
AUTH_TYPE
value output by
config-gfarm -T command executed on gfmd1.
(Note that the value AUTH_TYPE
above is affected by
the variable gfmd1_CONFIG_GFARM_OPTIONS
.)
gfsdn
_SSH
Specify a path to an SSH client command and its options. The variable is used when gfservice executes an SSH client command to connect with the gfsd server. The default value is "ssh".
gfsdn
_SUDO
Specify a path to a Sudo command and options. The variable is used when gfservice executes a Sudo command on the gfsd server via SSH. The default value is "sudo".
Variables named "clientn
" (client1, client2, ...)
define client hosts.
Their values are hostnames (or IP addresses).
Variable names beginning with "clientn
_"
such as client1_SUDO
set configuration parameters
of the corresponding "clientn
" host.
gfservice currently recognizes the following variables:
clientn
Register a client host. Its value represents a hostname (or an IP address) of the host.
clientn
_GFBINDIR
Specify a path to a directory where gfservice-agent
command is installed on the client host.
If the variable is declared, gfservice executes
"$client
/gfservice-agent".
Otherwise it executes "gfservice-agent".
n
_GFBINDIR
clientn
_MOUNT_GFARM2FS
Specify a path to mount.gfarm2fs command and its options. The variable is used when gfservice executes mount.gfarm2fs command to mount a file system. The default value is "%%BINDIR%%/mount.gfarm2fs".
clientn
_UMOUNT_GFARM2FS
Specify a path to umount.gfarm2fs command and its options. The variable is used when gfservice executes umount.gfarm2fs command to unmount a file system. The default value is "%%BINDIR%%/umount.gfarm2fs".
clientn
_SSH
Specify a path to an SSH client command and its options. The variable is used when gfservice executes an SSH client command to connect with the client host. The default value is "ssh".
clientn
_SUDO
Specify a path to a Sudo command and options. The variable is used when gfservice executes a Sudo command on the client host via SSH. The default value is "sudo".
clientn
_GFARM_CONF
Specify a gfarm2.conf file in absolute path. If a value is not set, gfservice uses a same path as the path of gfarm2.conf in gfmd1(determined from the 'gfmd1_CONFIG_GFARM_OPTIONS' shell variable).
clientn
_PRIVATE_MODE
If this variable is set to "true", gfservice processes the sub-command config-client without root privilege.
clientn
_AUTH_TYPE
Specify authentication type ("sharedsecret", "gsi" or "gsi_auth").
If the variable is not declared, its value is chosen from
AUTH_TYPE
value output by
config-gfarm -T command executed on gfmd1.
(Note that the value AUTH_TYPE
above is affected by
the variable gfmd1_CONFIG_GFARM_OPTIONS
.)