Background
If you've been following the DevOps Toolkit project, you know how it simplifies the management of multiple DevOps tools in a containerized environment. We've continuously improved the toolkit, from its initial release to the recent addition of Configuration Reusability. Today, I'm excited to introduce our latest feature: the DevOps Toolkit CLI.
The DevOps Toolkit CLI
The DevOps Toolkit CLI is a powerful new tool designed to enhance your experience with the DevOps Toolkit. It provides a streamlined interface for managing your DevOps Toolkit containers, making it easier than ever to initialize, run, update, and clean up your DevOps environments.
Key Features of DevOps Toolkit CLI
- Multi-Container Management: Initialize and manage multiple DevOps Toolkit containers, each with its own configuration.
- Easy Initialization: Quickly set up new DevOps Toolkit containers with a single command.
- Efficient Updates: Update your containers to the latest DevOps Toolkit image with ease.
- Streamlined Execution: Run commands in your containers without having to manually attach to them.
- Simple Cleanup: Remove individual containers or clean up all DevOps Toolkit containers at once.
Getting Started with DevOps Toolkit CLI
Prerequisites
Ensure you have Docker installed on your system. If you're new to Docker, check out this Docker guide to get started.
Installation
curl -o devops-toolkit-cli https://raw.githubusercontent.com/tungbq/devops-toolkit/main/devops-toolkit-cli
chmod +x devops-toolkit-cli
sudo mv devops-toolkit-cli /usr/local/bin/
Basic Usage
Here are some example commands to get you started with the DevOps Toolkit CLI:
Navigate to your workspace folder:
# For example:
cd /home/user/working/coding/
Initialize a new container:
devops-toolkit-cli init my_toolkit_01
Run a command in a container:
devops-toolkit-cli run my_toolkit_01 python3 --version
Update a container to the latest DevOps Toolkit image:
devops-toolkit-cli update my_toolkit_01
Clean up a specific container:
devops-toolkit-cli cleanup my_toolkit_01
Clean up all DevOps Toolkit containers:
devops-toolkit-cli cleanup --all
List all initialized containers:
devops-toolkit-cli list
For more commands instruction, run devops-toolkit-cli help
:
โ devops-toolkit-cli help
Usage: /usr/local/bin/devops-toolkit-cli [command] <container_name> [options]
Commands:
init <container_name> [version]: Initialize a new container and configuration directory. If version is omitted, initializes with the latest image.
run <container_name> [command]: Start a new container and run a command
exec <container_name> [command]: Execute a command in an existing container
cleanup --all: Remove all DevOps Toolkit containers
cleanup <container_name>: Remove the specified container
update <container_name> [version]: Update the container image. If version is omitted, updates to latest.
version <container_name>: Display version information for the specified container
list-versions: List available versions of the DevOps toolkit
health <container_name>: Perform a health check on the specified running container
logs <container_name>: View the logs of the specified running container
shell <container_name>: Get a shell inside the specified running container
list: List all initialized containers
Conclusion
The DevOps Toolkit CLI is a significant step forward in our mission to simplify DevOps workflows. By providing an efficient way to manage your DevOps Toolkit containers, we're making it easier than ever to leverage the power of our pre-configured DevOps environment.
We encourage you to try out the DevOps Toolkit CLI and share your feedback. Your input is invaluable in helping us improve and expand the capabilities of this tool.
Happy coding, and may your DevOps journey be smoother than ever! ๐
Top comments (0)