RBC CLI Utility
A Bash utility script to manage Risk by Context™ solution containers.
Prerequisites
Before using the RBC CLI utility, ensure the following dependencies are installed and properly configured on your system:
Docker: Required to manage and run containerized applications.
Docker Compose: Needed for defining and running multi-container Docker applications.
Make sure both Docker and Docker Compose are accessible from your command line before proceeding. You can verify using the following commands.
docker version
docker compose version
Usage
./rbc [OPTIONS] COMMAND [ARGS]
Options
-hShow this help message and exit.-vShow version.-dEnable debug mode.
Commands
The RBC CLI provides a set of commands to manage and operate RBC containers efficiently.
Warning
Ensure that the docker-compose.yml file exists in the directory where you run the ps, up, down, restart and upgrade commands.
Warning
The ./rbc load command depends on the presence of the required .tar files. If these files are missing, the command will fail to load the Docker images.
load <name>
Load Docker images by name.
Supported values:
(empty) : Load all images
portal: Load the Portal imagedevice: Load the Device service imagemongo: Load the MongoDB image
ps
Show status of all RBC containers.
up <name>
Create and start Docker containers.
Supported values:
(empty) : Start all containers
portal: Start the Portal containerdevice: Start the Device service containermongo: Start the MongoDB container
down <name>
Stop and remove Docker containers.
Supported values:
(empty) : Stop all containers
portal: Stop the Portal containerdevice: Stop the Device service containermongo: Stop the MongoDB container
restart <name>
Remove and create Docker containers.
Supported values:
(empty) : Remove and create all containers
portal: Remove and create the Portal containerdevice: Remove and create the Device service containermongo: Remove and create the MongoDB container
upgrade <name>
Load docker image and remove & create Docker containers.
Supported values:
(empty) : Upgrade all containers
portal: Upgrade the Portal containerdevice: Upgrade the Device service containermongo: Upgrade the MongoDB container
Examples
./rbc load portal
./rbc up device
./rbc restart
./rbc upgrade
Common Errors
Tip
If this section doesn not resolve your issue, feel free to create a new issue in the asvin RBC repository or contact us at info@asvin.io.
Below are common errors you might encounter while using the RBC CLI utility.
Error
./rbc: No such file or directory
This error occurs when the rbc file does not exist in the current directory.
Solution:
Error
bash: ./rbc: Permission denied
This error occurs when the file lacks execute permissions. You can fix
Solution:
Provide execute permission by running chmod +x rbc in Terminal.
Error
./rbc: unrecognized option: –foo
This error means you passed an invalid option.
Solution:
Run ./rbc -h to see all supported options.
Error
./rbc: unrecognized command: –foo
This error means you passed an invalid command.
Solution:
Run ./rbc -h to see all supported commands.
Error
./rbc docker-compose.yml not found.
This error occurs when the docker-compose.yml file is missing from the current directory.
Solution:
Download the file from here