bluesky / bluesky-queueserver

Server for queueing plans
https://blueskyproject.io/bluesky-queueserver/
BSD 3-Clause "New" or "Revised" License
11 stars 20 forks source link

Passing parameters using config file (YML) #263

Closed dmgav closed 1 year ago

dmgav commented 1 year ago

Implemented functionality that allows passing parameters to RE Manager as a configuration file. The path may be passed using --config CLI parameter or QSERVER_CONFIG environment variable. See RE Manager Configuration section in the documentation for more details.

RE Manager is not attempting to load configuration unless the path is passed as EV or --config parameter and CLI parameters override parameters passed in configuration file, so the changes are not expect to affect existing deployments.

The config files have similar format as config files used for Databroker/Tiled and Bluesky HTTP Server. Example config file (e.g. config.yml):

network:
  zmq_control_addr: tcp://*:60615
  zmq_private_key: ${CUSTOM_EV_FOR_PRIVATE_KEY}
  zmq_info_addr: tcp://*:60625
  zmq_publish_console: true
  redis_addr: localhost:6379
startup:
  keep_re: true
  startup_dir: ~/.ipython/profile_collection/startup
  existing_plans_and_devices_path: ~/.ipython/profile_collection/startup
  user_group_permissions_path: ~/.ipython/profile_collection/startup
operation:
  print_console_output: true
  console_logging_level: NORMAL
  update_existing_plans_and_devices: ENVIRONMENT_OPEN
  user_group_permissions_reload: ON_REQUEST
  emergency_lock_key: custom_lock_key
run_engine:
  use_persistent_metadata: true
  kafka_server: 127.0.0.1:9092
  kafka_topic: custom_topic_name
  zmq_data_proxy_addr: localhost:5567
  databroker_config: TST

Motivation and Context

Managing parameters using configuration files may be more convenient in production deployments.

Summary of Changes for Release Notes

Fixed

Added

Changed

Removed

How Has This Been Tested?