Mecha Agent is the service running on device to manage the connection with Mecha Services includes features for provisioning, messaging and telemetry. Check the docs for more information.
Rust: 1.70 or above
- Clone this repository
$ git clone https://github.com/mecha-org/mecha-agent
- Create your settings.yml using the
settings.yml.example
provided, update the defaults as necessary
$ cd mecha-agent
$ cp settings.yml.example settings.yml
- Run the
mecha-agent
using cargo run
$ cargo run -- -s ./settings.yml
- To generate the release build
$ cargo build --release
$ ./target/release/mecha_agent_server -s ./settings.yml
-
Ensure you have
settings.yml
in the repository root directory generated with the required settings for your docker. -
Build the docker image using the
Dockerfile
provided in the root directory
$ docker build -t mecha-org/mecha-agent .
- Run the docker image, with the port exposed in your settings.yml for the grpc server
$ docker run -p 3001:3001 mecha-org/mecha-agent
Starts the agent, but only if it is provisioned.
$ mecha-agent start -s ./settings.yml
-s ./settings.yml: Specifies the path to the settings file.
--server: Enables GRPC server mode.
GRPC: By default, GRPC does not start unless --server is used.
Server Mode: If the --server flag is added, GRPC will be enabled.
Runs a provisioning flow via CLI.
$ mecha-agent setup
$ mecha-agent whoami
$ mecha-agent reset