A Comprehensive Tool for Setting Up Virtual Machines.
Project description
🚀 VM Setup Tool
Documentation • PyPI • GitHub • Contributing • License
A modern, user-friendly solution for automating and managing virtual machine (VM) setup and configuration using Ansible.
✨ Features
- Automated VM setup with Docker & Docker Compose
- Cloud VM provisioning via SSH
- Infrastructure Provisioning: Terraform integration for cloud providers (AWS, etc.)
- Kubernetes Ready: One-click K3s cluster setup
- Observability: Instant Prometheus & Grafana deployment
- CI/CD Pipelines: Auto-generate GitHub Actions workflows
- SSH key management and configuration
- Simple Python API for integration
- One-command version check:
vm_tool --version
⚡️ Installation
Install the latest version from PyPI:
pip install vm-tool
🛠️ Usage Examples
🚀 Universal Deployment (CLI)
1. Generate CI/CD Pipeline
Bootstrap your project with a complete GitHub Actions workflow:
vm_tool generate-pipeline
2. Provision Infrastructure
Provision cloud resources using Terraform (requires Terraform installed):
vm_tool provision --provider aws --action apply --vars region=us-east-1
3. Setup Kubernetes (K3s)
Deploy a lightweight Kubernetes cluster to your servers:
vm_tool setup-k8s --inventory inventory.yml
4. Setup Observability
Deploy Prometheus and Grafana for instant monitoring:
vm_tool setup-monitoring --inventory inventory.yml
🐍 Python API Usage
Automated Local VM Setup
from vm_tool.runner import SetupRunner, SetupRunnerConfig
config = SetupRunnerConfig(
github_username='your_github_username',
github_token='your_github_token',
github_project_url='your_github_project_url',
github_branch='your_branch_name',
docker_compose_file_path='path_to_your_docker_compose_file',
dockerhub_username='your_dockerhub_username',
dockerhub_password='your_dockerhub_password'
)
runner = SetupRunner(config)
runner.run_setup()
Cloud VM Setup (via SSH)
from vm_tool.runner import SetupRunner, SetupRunnerConfig, SSHConfig
config = SetupRunnerConfig(
github_username='your_github_username',
github_token='your_github_token',
github_project_url='your_github_project_url',
github_branch='your_branch_name',
docker_compose_file_path='path_to_your_docker_compose_file',
dockerhub_username='your_dockerhub_username',
dockerhub_password='your_dockerhub_password'
)
runner = SetupRunner(config)
ssh_configs = [
SSHConfig(
ssh_username='your_ssh_username',
ssh_password='your_ssh_password',
ssh_hostname='your_ssh_hostname',
ssh_identity_file='/path/to/your/ssh_key' # Optional
)
]
runner.run_cloud_setup(ssh_configs)
SSH Key Management
from vm_tool.ssh import SSHSetup
ssh_setup = SSHSetup(
hostname='your_vm_hostname',
username='your_vm_username',
password='your_vm_password',
email='your_email_for_ssh_key'
)
ssh_setup.setup()
🖥️ Command Line Version Check
Check your installed version at any time:
vm_tool --version
⚙️ Configuration Options
github_username: GitHub username (for private repos)github_token: GitHub token (for private repos)github_project_url: GitHub repository URLgithub_branch: Branch to use (default: main)docker_compose_file_path: Path to Docker Compose file (default: docker-compose.yml)dockerhub_username: Docker Hub username (if login needed)dockerhub_password: Docker Hub password (if login needed)
📚 Learn More
See the Official Documentation for complete guides. Visit the PyPI page for generic details, or the GitHub repository for code and issues.
Empower your infrastructure automation with VM Setup Tool – fast, reliable, and developer-friendly!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vm_tool-1.0.45.tar.gz.
File metadata
- Download URL: vm_tool-1.0.45.tar.gz
- Upload date:
- Size: 102.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d34b3950f3e4093c8a11bf9eacb9d7645ec1c447d0b0e09b0fb5da2baec77294
|
|
| MD5 |
497393440625c978fb3e6ca6b69a55c3
|
|
| BLAKE2b-256 |
d38dd84364421bc4b3b0ab519a874218d372cc7bf9eaabdac6084b49f0c463ee
|
Provenance
The following attestation bundles were made for vm_tool-1.0.45.tar.gz:
Publisher:
publish.yml on thesunnysinha/vm_tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vm_tool-1.0.45.tar.gz -
Subject digest:
d34b3950f3e4093c8a11bf9eacb9d7645ec1c447d0b0e09b0fb5da2baec77294 - Sigstore transparency entry: 919211616
- Sigstore integration time:
-
Permalink:
thesunnysinha/vm_tool@a80e45a45f1d08585aad29075131f6ba52c1a3a1 -
Branch / Tag:
refs/tags/v1.0.45 - Owner: https://github.com/thesunnysinha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a80e45a45f1d08585aad29075131f6ba52c1a3a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vm_tool-1.0.45-py3-none-any.whl.
File metadata
- Download URL: vm_tool-1.0.45-py3-none-any.whl
- Upload date:
- Size: 92.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19bdebad1a2a94d58c36c42d4ec98d77c66c36f37552f2ee30193f59c7f0bff4
|
|
| MD5 |
ed73b4aba3b1110bb110964d5c27f7f5
|
|
| BLAKE2b-256 |
d1256ab4c10bcd377a70025160c5b8e0621262cbbe7f2bcc9703bf8bf7e4327b
|
Provenance
The following attestation bundles were made for vm_tool-1.0.45-py3-none-any.whl:
Publisher:
publish.yml on thesunnysinha/vm_tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vm_tool-1.0.45-py3-none-any.whl -
Subject digest:
19bdebad1a2a94d58c36c42d4ec98d77c66c36f37552f2ee30193f59c7f0bff4 - Sigstore transparency entry: 919211619
- Sigstore integration time:
-
Permalink:
thesunnysinha/vm_tool@a80e45a45f1d08585aad29075131f6ba52c1a3a1 -
Branch / Tag:
refs/tags/v1.0.45 - Owner: https://github.com/thesunnysinha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a80e45a45f1d08585aad29075131f6ba52c1a3a1 -
Trigger Event:
push
-
Statement type: