xbus-fullenv is a command line tool that can setup xbusd, xbusctl and xbus-client(s) in a single operation, based on single configuration file.
It is aimed at setting up development and tests environments without going through all the steps manually, making it easy to reproduce a given setup.
xbus-fullenv <command> [ --target dir ] [ --dsn dsn ] configurationfile
- --dsn dsn
Set the database dsn. Will override the dsn present in the configuration file.
- --target dir
Target directory path. If omitted, a directory is created in the TEMPDIR.
Enable debug mode
Enable trace mode
In interactive mode, disable the ‘>’ prompt. Useful for controling the fullenv from another program.
Setup the server and clients in the target directory.
Setup the server and clients in the target directory, then opens an interactive mini-shell.
The available commands are:
- client-config <name>
returns the configuration path of a client
returns the environment work directory
start the clients
shutdown the clients
shutdown everything and quit
The configuration file is a yaml file composed of a few top-level keys:
A xbusd configuration file content, that can be empty.
If the database settings are not given, they are copied from either the
command line flag
--dsn, or the environment variable
xbusd: database: dsn: dbname=xbus user=xbus password=xbus sslmode=disable
A list of xbus-client configurations. These clients will be automatically registered along with their actors.
Extra attributes can be added to each client settings:
If set to false, the client will not be started by the ‘startup’ command.
If set, the program will be used instead of ‘xbus-client serve’ to start the client.
clients: - account-name: test-emitter autostart: false actors: "0": name: test-emitter kind: emitter status: enabled roles: [tester] - account-name: test-consumer autostart: true actors: "0": name: test-consumer kind: consumer status: enabled roles: [tester] service: type: demo.print-to-console
Same as ‘clients’, but for user account definitions.
ctl: - account-name: admin password: PASSWORD
Same as ‘clients’, but for http gateway(s).
http: - account-name: gw autostart: true
A dictionary of pipeline definitions.
The key format is the following:
<status> can be
pipelines: defaultpipeline-v1#active: nodes: - id: source type: emitter roles: [tester] rolebroadcast: true sourcematch: eventtypes: - demo.msg outputs: - default - id: sink type: consumer roles: - tester rolebroadcast: true inputs: - default edges: - source -> sink