DOB Host CLI - User Guide
The DOB Host CLI is a powerful command-line interface that allows users to execute and manage tasks on the DevOps-Bot host server. This guide provides an overview of the CLI, its commands, and how to navigate its features effectively.
Overview of DOB Host CLI
The DOB Host CLI is a feature-rich tool designed for remote task execution and infrastructure management. It supports a variety of cloud providers, orchestration tools, and automation frameworks. Follow the guide below to get started.
Pre-requisites
Ensure DevOps-Bot is Installed:
Before using the CLI, ensure that the DevOps-Bot (DOB) is installed on your system. For detailed installation instructions, refer to the DevOps-Bot Installation Guide.
Basic Commands
After installing DevOps-Bot, you can check the version, available commands, and their options using the following commands:
- Check the version of DevOps-Bot:
dob --version
Example output:
devops-bot, version 0.1
Python Version: 3.9.21
Operating System: Linux 5.14.0-229.el9.x86_64
dob --help
Example output:
Usage: dob [OPTIONS] COMMAND [ARGS]...
Options:
--v, --version Show version of the devops-bot tool.
--debug Enable debug mode to show full error tracebacks.
--help Show this message and exit.
Commands:
activation Activate context for Kubernetes or Docker...
aws Commands to manage AWS resources.
azure Commands to manage Azure resources.
gcp Commands to manage GCP resources.
generate-token Generate a token for a user.
run-ui Run the UI for the screenplay.
...
Common Use Case: Managing AWS Resources
For managing AWS resources, use the following commands:
- View available AWS commands:
dob aws --help
Example output:
Usage: dob aws [OPTIONS] COMMAND [ARGS]...
Commands:
add-user-to-group Add a user to an IAM group.
create-ec2-instance Create an EC2 instance.
create-s3-bucket Create an S3 bucket.
describe-ec2-instances Describe EC2 instances.
upload-s3-file Upload a file to an S3 bucket.
...
dob aws create-s3-bucket --name my-s3-bucket --region us-east-1
dob aws describe-ec2-instances
Outputs and Variables
You can view or export output variables from tasks using the `outputs` command:
- View output variables:
dob aws outputs
dob aws outputs --export-file /path/to/output.json
dob aws outputs --import-file /path/to/output.json
Debugging and Help
Enable debug mode to view detailed error messages:
dob --debug
Get help for specific commands:
dob --help
Notes
- Ensure you have the appropriate permissions and credentials for the tasks you want to execute.
- Refer to the detailed documentation for each command using the `--help` option.
- Debug mode can be useful for troubleshooting issues during execution.