mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
Merge pull request #4633 from chenglch/gcons_cfg
Modify the default configuration for gocons
This commit is contained in:
commit
ca1ea1d702
@ -218,23 +218,40 @@ sub is_conserver_running {
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
sub build_conf {
|
||||
# TODO(chenglch): add -f options to support import the configuration file customized by the user,
|
||||
# it would be friendly to the version control system.
|
||||
my $config= "#generated by xcat ".xCAT::Utils->Version()."\n".
|
||||
"global:\n".
|
||||
" host: 0.0.0.0\n".
|
||||
" ssl_key_file: /etc/xcat/cert/server-cred.pem\n".
|
||||
" ssl_cert_file: /etc/xcat/cert/server-cred.pem\n".
|
||||
" ssl_ca_cert_file: /etc/xcat/cert/ca.pem\n".
|
||||
" logfile: /var/log/goconserver/server.log # the log for goconserver\n".
|
||||
"api:\n".
|
||||
" port: $go_api_port # the port for rest api\n".
|
||||
"console:\n".
|
||||
" datadir: /var/lib/goconserver/ # the data file to save the hosts\n".
|
||||
" port: $go_cons_port # the port for console\n".
|
||||
" logdir: ".CONSOLE_LOG_DIR." # log files for session nodes\n".
|
||||
" log_timestamp: true # log the timestamp at the beginning of line\n".
|
||||
" reconnect_interval: 10 # retry interval in second if console could not be connected\n";
|
||||
my $config = "#generated by xcat ".xCAT::Utils->Version()."\n".
|
||||
"global:\n".
|
||||
" host: 0.0.0.0\n".
|
||||
" ssl_key_file: /etc/xcat/cert/server-cred.pem\n".
|
||||
" ssl_cert_file: /etc/xcat/cert/server-cred.pem\n".
|
||||
" ssl_ca_cert_file: /etc/xcat/cert/ca.pem\n".
|
||||
" logfile: /var/log/goconserver/server.log # the log for goconserver\n".
|
||||
"api:\n".
|
||||
" port: $go_api_port # the port for rest api\n".
|
||||
"console:\n".
|
||||
" datadir: /var/lib/goconserver/ # the data file to save the hosts\n".
|
||||
" port: $go_cons_port # the port for console\n".
|
||||
" log_timestamp: true # log the timestamp at the beginning of line\n".
|
||||
" reconnect_interval: 10 # retry interval in second if console could not be connected\n".
|
||||
" logger: # multiple logger targets could be specified\n".
|
||||
" file: # file logger, valid fields: name,logdir. Accept array in yaml format\n".
|
||||
" - name: default # the identity name customized by user\n".
|
||||
" logdir: ".CONSOLE_LOG_DIR." # default log directory of xcat\n".
|
||||
" # - name: goconserver \n".
|
||||
" # logdir: /var/log/goconserver/nodes \n".
|
||||
" # tcp: # valied fields: name, host, port, timeout, ssl_key_file, ssl_cert_file, ssl_ca_cert_file, ssl_insecure\n".
|
||||
" # - name: logstash \n".
|
||||
" # host: 127.0.0.1 \n".
|
||||
" # port: 9653 \n".
|
||||
" # timeout: 3 # default 3 second\n".
|
||||
" # - name: filebeat \n".
|
||||
" # host: <hostname or ip> \n".
|
||||
" # port: <port> \n".
|
||||
" # udp: # valid fiedls: name, host, port, timeout\n".
|
||||
" # - name: rsyslog \n".
|
||||
" # host: \n".
|
||||
" # port: \n".
|
||||
" # timeout: # default 3 second\n";
|
||||
|
||||
my $file;
|
||||
my $ret = open ($file, '>', '/etc/goconserver/server.conf');
|
||||
if ($ret == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user