start#
Start the openYuanrong cluster, supporting master and agent modes.
Usage#
yr start [OPTIONS]
Parameters#
--master: Start in master mode (defaults to agent mode without this parameter).-s, --set KEY=VALUE: Override configuration from the command line; can be specified multiple times.VALUEmust be a valid TOML literal.--master_address http(s)://host:port: Only available in agent mode. Before startup, pulls service discovery information from the specifiedfunction_masterand automatically converts it to-soverrides.
Note
Common -s/--set examples:
String:
-s 'values.fs.log.level="DEBUG"'Number:
-s 'values.ds_master.port=12123'Array of tables:
-s 'values.etcd.address=[{ip="10.88.0.9",peer_port="32380",port="32379"}]'
--master_address usage restrictions:
Only supported by
yr start(agent mode).Using it together with
--masterwill result in an error and exit.If service discovery fails, it will exit directly.
The parameter value must include a protocol prefix, i.e.,
http://orhttps://.When using
https://, you need to providevalues.fs.tls.ca_file,values.fs.tls.cert_file,values.fs.tls.key_filevia--configor-s(can be used together withvalues.fs.tls.base_path).
Configuration Merge Rules#
When yr start starts, the final configuration is merged according to the following priority (high to low):
Command-line overrides:
-s/--setUser configuration file: defaults to
/etc/yuanrong/config.toml(can be specified via-c)Built-in defaults:
api/python/yr/cli/values.toml+api/python/yr/cli/config.toml.jinja
Startup Behavior#
After executing yr start, the CLI will:
Create a deployment directory
/tmp/yr_sessions/<timestamp>/Update the symbolic link
/tmp/yr_sessions/latest -> /tmp/yr_sessions/<timestamp>/Start the components corresponding to the mode and perform health checks
Write the session file
/tmp/yr_sessions/latest/session.json
Where:
masterstarts by default:etcd,ds_master,ds_worker,function_master,function_proxy,function_agentagentstarts by default:ds_worker,function_proxy,function_agent
Examples#
Start the master node:
yr start --master
After successful startup, the terminal will print the recommended command for worker nodes to join the cluster (including -s 'values.*=...' overrides).
On worker nodes, you can directly execute this command to join the cluster, for example:
yr start -s 'values.etcd.address=[{ip="10.88.0.4",peer_port="32380",port="32379"}]' \
-s 'values.ds_master.ip="10.88.0.4"' \
-s 'values.ds_master.port="12123"' \
-s 'values.function_master.ip="10.88.0.4"' \
-s 'values.function_master.global_scheduler_port="22770"'
Or use the auto-discovery mode (agent):
yr start --master_address http://10.88.0.4:22770