-
Notifications
You must be signed in to change notification settings - Fork 2
Scheduler Commands
Place yourself in the microservice root directory (sealci/scheduler/)
Starting the Scheduler server
cargo run --bin serverWith 'debug' logging level
RUST_LOG=debug cargo run --bin server More logging levels (by order of increasing verbosity): 'error', 'warn', 'info', 'debug', 'trace'.
Launching integration tests
cargo testYou can also launch them individually:
cargo test --test name_of_testNote: to build the server with optimizations:
cargo build --release --bin server(also works with cargo run)
The command used to build (or run) the server for production is:
RUST_LOG=info cargo run -r --bin server Note:
--releaseis the same as-r
Place yourself in the project root directory (sealci/)
Building the image and starting the container:
docker compose up --build -dAs per the docker-compose.yml file:
- The container will automatically restart (
restart: alwayspolicy). - The container will run on
0.0.0.0:5005. That is equivalent to[::]:5005or[::0]:5005in IPv6.
You can then follow the logs:
docker compose logs -fgrpcurl is a command-line tool that lets you interact with gRPC servers.
Testing Agent registration locally:
$ grpcurl -d '{"cpu_avail": 50, "memory_avail": 1024}' -plaintext [::1]:50051 scheduler.Agent.RegisterAgent
{
"id": 1
}Testing Agent health status report locally:
$ grpcurl -d @ -plaintext [::1]:50051 scheduler.Agent.ReportHealthStatus <<EOM
{
"agent_id": 1,
"health": {
"cpu_avail": 70,
"memory_avail": 2048
}
}
{
"agent_id": 3,
"health": {
"cpu_avail": 65,
"memory_avail": 1980
}
}
EOM
{}