Upload USAGE.md with huggingface_hub
Browse files
USAGE.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π Usage Examples
|
| 2 |
+
|
| 3 |
+
## Quick Start
|
| 4 |
+
|
| 5 |
+
### 1. Pull and Run
|
| 6 |
+
```bash
|
| 7 |
+
ollama pull radoni/vmware-infrastructure-automation-ai
|
| 8 |
+
ollama run radoni/vmware-infrastructure-automation-ai
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
### 2. Automatic Menu Display
|
| 12 |
+
The AI automatically shows this menu:
|
| 13 |
+
|
| 14 |
+
```
|
| 15 |
+
ποΈ VMware Infrastructure Automation - 20-Part HANDS-ON Implementation
|
| 16 |
+
================================================================
|
| 17 |
+
|
| 18 |
+
π Foundation (Parts 1-5):
|
| 19 |
+
1. π Universal Discovery Engine β START HERE
|
| 20 |
+
2. π Protocol Translator
|
| 21 |
+
3. π€ Integration Bot
|
| 22 |
+
4. β‘ Sync Matrix
|
| 23 |
+
5. π§ Intelligence Mapper
|
| 24 |
+
|
| 25 |
+
[... complete menu ...]
|
| 26 |
+
|
| 27 |
+
Which part? (Enter 1-20)
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
## Implementation Example
|
| 31 |
+
|
| 32 |
+
### Part 1: Universal Discovery Engine
|
| 33 |
+
```
|
| 34 |
+
You: 1
|
| 35 |
+
|
| 36 |
+
AI: # Part 1: Universal Discovery Engine - HANDS-ON EXECUTION
|
| 37 |
+
|
| 38 |
+
## Prerequisites Check
|
| 39 |
+
```bash
|
| 40 |
+
which python3 && echo "β
Python3" || echo "β Install Python3"
|
| 41 |
+
ping -c 1 vcenter.yourdomain.com && echo "β
vCenter reachable"
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## EXECUTION STEPS
|
| 45 |
+
|
| 46 |
+
### Step 1: Install Dependencies
|
| 47 |
+
```bash
|
| 48 |
+
pip3 install pyvmomi requests pandas
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
### Step 2: Create Discovery Script
|
| 52 |
+
```python
|
| 53 |
+
# Save as discovery_engine.py
|
| 54 |
+
#!/usr/bin/env python3
|
| 55 |
+
import ssl
|
| 56 |
+
import json
|
| 57 |
+
from pyVim.connect import SmartConnect, Disconnect
|
| 58 |
+
from pyVmomi import vim
|
| 59 |
+
from datetime import datetime
|
| 60 |
+
|
| 61 |
+
# [Complete working script provided]
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
### Step 3: Execute
|
| 65 |
+
```bash
|
| 66 |
+
python3 discovery_engine.py
|
| 67 |
+
ls -la infrastructure_discovery.json
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
β
Part 1 Complete! What's next? (1-4)
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
## Key Features
|
| 74 |
+
|
| 75 |
+
### Real Commands Only
|
| 76 |
+
- β
Copy-paste ready scripts
|
| 77 |
+
- β
Working configurations
|
| 78 |
+
- β
Cross-platform support
|
| 79 |
+
- β Minimal theory/explanation
|
| 80 |
+
|
| 81 |
+
### Interactive Flow
|
| 82 |
+
- Always starts with 20-part menu
|
| 83 |
+
- User selects part (1-20)
|
| 84 |
+
- AI provides executable implementation
|
| 85 |
+
- AI asks what's next
|
| 86 |
+
|
| 87 |
+
### Domain Focus
|
| 88 |
+
- β
VMware infrastructure automation
|
| 89 |
+
- β
PowerCLI, pyVmomi, REST APIs
|
| 90 |
+
- β Refuses non-VMware topics
|
| 91 |
+
- β Redirects to menu for off-topic queries
|
| 92 |
+
|
| 93 |
+
## Advanced Usage
|
| 94 |
+
|
| 95 |
+
### Project Structure
|
| 96 |
+
Creates organized automation project:
|
| 97 |
+
```
|
| 98 |
+
vmware-automation/
|
| 99 |
+
βββ scripts/
|
| 100 |
+
βββ config/
|
| 101 |
+
βββ parts/01-discovery/
|
| 102 |
+
βββ parts/02-translator/
|
| 103 |
+
βββ ... (all 20 parts)
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
### Integration Between Parts
|
| 107 |
+
Each part builds on previous ones:
|
| 108 |
+
- Part 1 β Discovery data for Part 2
|
| 109 |
+
- Part 2 β API layer for Part 3
|
| 110 |
+
- Part 3 β Integration for Part 4
|
| 111 |
+
- And so on...
|
| 112 |
+
|
| 113 |
+
## Troubleshooting
|
| 114 |
+
|
| 115 |
+
### No Menu Displayed
|
| 116 |
+
```bash
|
| 117 |
+
# Restart if needed
|
| 118 |
+
ollama serve
|
| 119 |
+
ollama run radoni/vmware-infrastructure-automation-ai "hello"
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
### Wrong Response Type
|
| 123 |
+
The AI should always give executable commands. If not:
|
| 124 |
+
```bash
|
| 125 |
+
# Be specific
|
| 126 |
+
ollama run radoni/vmware-infrastructure-automation-ai "Part 1 hands-on commands"
|
| 127 |
+
```
|