There will a brief, around 15 minute, outage of git.ligo.org, chat.ligo.org, and docs.ligo.org tomorrow evening, Tuesday 15 October 2019, at 10pm CDT. This is due to some campus level network maintenance work that is being carried out.

Commit 84e9a42e authored by Patrick Godwin's avatar Patrick Godwin

add options to enable auth, https for inspiral aggregators

parent 065bb6cc
Pipeline #64378 failed with stages
in 2 minutes and 57 seconds
......@@ -201,6 +201,8 @@ def parse_command_line():
parser.add_option("--influx-hostname", help = "Specify the hostname for the influxDB database. Required if --data-backend = influx.")
parser.add_option("--influx-port", help = "Specify the port for the influxDB database. Required if --data-backend = influx.")
parser.add_option("--influx-database-name", help = "Specify the database name for the influxDB database. Required if --data-backend = influx.")
parser.add_option("--enable-auth", action = "store_true", default=False, help = "If set, enables authentication for the influx aggregator.")
parser.add_option("--enable-https", action = "store_true", default=False, help = "If set, enables HTTPS connections for the influx aggregator.")
options, filenames = parser.parse_args()
......@@ -357,7 +359,13 @@ for ifo in channel_dict:
"influx-database-name": options.influx_database_name,
"influx-hostname": options.influx_hostname,
"influx-port": options.influx_port,
"enable-auth": options.enable_auth,
"enable-https": options.enable_https,
})
if options.enable_auth:
common_opts.update({"enable-auth": ""})
if options.enable_https:
common_opts.update({"enable-https": ""})
dagparts.DAGNode(dqJob, dag, [], opts = common_opts)
......@@ -537,6 +545,10 @@ if options.agg_data_backend == 'influx':
"influx-hostname": options.influx_hostname,
"influx-port": options.influx_port,
})
if options.enable_auth:
agg_options.update({"enable-auth": ""})
if options.enable_https:
agg_options.update({"enable-https": ""})
# define routes used for aggregation jobs
snr_routes = ["%s_snr_history" % ifo for ifo in channel_dict]
......
......@@ -65,6 +65,8 @@ def parse_command_line():
parser.add_option("--influx-hostname", help = "Specify the hostname for the influxDB database. Required if --data-backend = influx.")
parser.add_option("--influx-port", help = "Specify the port for the influxDB database. Required if --data-backend = influx.")
parser.add_option("--influx-database-name", help = "Specify the database name for the influxDB database. Required if --data-backend = influx.")
parser.add_option("--enable-auth", action = "store_true", default=False, help = "If set, enables authentication for the influx aggregator.")
parser.add_option("--enable-https", action = "store_true", default=False, help = "If set, enables HTTPS connections for the influx aggregator.")
options, filenames = parser.parse_args()
......@@ -178,7 +180,7 @@ if __name__ == '__main__':
# set up aggregator sink
if options.data_backend == 'influx':
agg_sink = io.influx.Aggregator(hostname=options.influx_hostname, port=options.influx_port, db=options.influx_database_name)
agg_sink = io.influx.Aggregator(hostname=options.influx_hostname, port=options.influx_port, db=options.influx_database_name, auth=options.enable_auth, https=options.enable_https)
else: ### hdf5 data backend
agg_sink = io.hdf5.Aggregator(rootdir=options.out_path, num_processes=options.num_threads)
......
......@@ -60,6 +60,8 @@ def parse_command_line():
parser.add_argument("--influx-hostname", help = "Specify the hostname for the influxDB database. Required if --data-backend = influx.")
parser.add_argument("--influx-port", help = "Specify the port for the influxDB database. Required if --data-backend = influx.")
parser.add_argument("--influx-database-name", help = "Specify the database name for the influxDB database. Required if --data-backend = influx.")
parser.add_argument("--enable-auth", action = "store_true", help = "If set, enables authentication for the influx aggregator.")
parser.add_argument("--enable-https", action = "store_true", help = "If set, enables HTTPS connections for the influx aggregator.")
args = parser.parse_args()
......@@ -100,7 +102,7 @@ if __name__ == '__main__':
# set up aggregator sink
if options.data_backend == 'influx':
agg_sink = io.influx.Aggregator(hostname=options.influx_hostname, port=options.influx_port, db=options.influx_database_name)
agg_sink = io.influx.Aggregator(hostname=options.influx_hostname, port=options.influx_port, db=options.influx_database_name, auth=options.enable_auth, https=options.enable_https)
else: ### hdf5 data backend
agg_sink = io.hdf5.Aggregator(rootdir=options.base_dir, num_processes=options.num_threads)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment