https://github.com/smithlabs/homelab
Homelab provisioned using ProxmoxAPI
https://github.com/smithlabs/homelab
Last synced: 2 months ago
JSON representation
Homelab provisioned using ProxmoxAPI
- Host: GitHub
- URL: https://github.com/smithlabs/homelab
- Owner: smithlabs
- Created: 2023-08-13T17:11:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-14T08:04:40.000Z (almost 2 years ago)
- Last Synced: 2024-11-17T05:20:49.179Z (6 months ago)
- Language: Python
- Size: 351 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Proxmox CLI Tool
A Python CLI tool to interact with Proxmox using the Proxmoxer library.
## Table of Contents
- [Introduction](#introduction)
- [Setup](#setup)
- [Settings](#settings)
- [Virtual Environment](#virtual-environment)
- [Usage](#usage)
- [Flags](#flags)
- [Examples](#examples)
- [Author](#author)## Introduction
This command-line tool allows you to interact with Proxmox using various commands.## Setup
1. Clone this repository:
```bash
git clone https://github.com/smithlabs/proxmox-cli.git
cd proxmox-cli
```## Settings
2. Create a `settings.yaml` file in the root directory with your Proxmox credentials and settings:
Example on a fresh out-of-the-box Proxmox install
```yaml
proxmox_host: "proxmox.smithlabs.net"
user: "root@pam"
password: "MySecurePassword123!"
verify_ssl: False
target_node: "pve" # Specify your target node name here
```
Make sure to protect the `settings.yaml` file to keep your credentials secure:
```bash
chmod 600 settings.yaml
```
## Virtual Environment
3. It's recommended to use a virtual environment for better isolation:
```bash
# Create a virtual environment
python -m venv venv# Activate the virtual environment
source venv/bin/activate # On Windows: .\venv\Scripts\activate# Install required packages
pip install -r requirements.txt
```## Usage
Run the `main.py` script with the desired flags to interact with Proxmox.## Flags
- `--users`: Retrieve and display Proxmox users' information.
- `--nodes`: List all available nodes and display their information.
- `--network-info`: Retrieve and display network information for the specified target node.## Examples
- Display Proxmox users:
```bash
python main.py --users
```
- List available nodes and display their information:
```bash
python main.py --nodes
```
- Retrieve and display network information for the specified target node:
```bash
python main.py --network-info
```
## Author
Sean Smith