|
| 1 | +# HCP Plugin |
| 2 | + |
| 3 | +The HCP plugin generates intelligent `hypershift create cluster` commands from natural language descriptions across multiple cloud providers and platforms. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +This plugin translates natural language descriptions into precise, ready-to-execute `hypershift create cluster` commands, applying provider-specific best practices and handling complex parameter validation automatically. The plugin **generates commands for you to run** - it does not provision clusters directly. |
| 8 | + |
| 9 | +## Commands |
| 10 | + |
| 11 | +### `/hcp:generate` |
| 12 | + |
| 13 | +Generate ready-to-execute hypershift cluster creation commands from natural language descriptions. |
| 14 | + |
| 15 | +**Usage:** |
| 16 | +``` |
| 17 | +/hcp:generate <provider> <cluster-description> |
| 18 | +``` |
| 19 | + |
| 20 | +**Supported Providers:** |
| 21 | +- `aws` - Amazon Web Services |
| 22 | +- `azure` - Microsoft Azure (self-managed control plane) |
| 23 | +- `kubevirt` - KubeVirt on existing Kubernetes clusters |
| 24 | +- `openstack` - OpenStack clouds |
| 25 | +- `powervs` - IBM Cloud PowerVS |
| 26 | +- `agent` - Bare metal and edge deployments |
| 27 | + |
| 28 | +**Examples:** |
| 29 | +```bash |
| 30 | +# AWS development cluster |
| 31 | +/hcp:generate aws "development cluster for testing new features" |
| 32 | + |
| 33 | +# High-availability KubeVirt cluster |
| 34 | +/hcp:generate kubevirt "production cluster with high availability" |
| 35 | + |
| 36 | +# Cost-optimized Azure cluster |
| 37 | +/hcp:generate azure "small cluster for dev work, minimize costs" |
| 38 | + |
| 39 | +# Disconnected bare metal cluster |
| 40 | +/hcp:generate agent "airgapped cluster for secure environment" |
| 41 | +``` |
| 42 | + |
| 43 | +## Key Features |
| 44 | + |
| 45 | +- **Multi-Provider Support**: Works with AWS, Azure, KubeVirt, OpenStack, PowerVS, and Agent providers |
| 46 | +- **Smart Analysis**: Extracts requirements from natural language descriptions |
| 47 | +- **Interactive Prompts**: Guides users through provider-specific configurations |
| 48 | +- **Best Practices**: Applies provider-specific defaults and optimizations |
| 49 | +- **Security Validation**: Ensures safe parameter handling and credential management |
| 50 | +- **Network Conflict Prevention**: Especially critical for KubeVirt deployments |
| 51 | + |
| 52 | +## Provider-Specific Skills |
| 53 | + |
| 54 | +The plugin uses specialized skills for each provider: |
| 55 | + |
| 56 | +- **`hcp-create-aws`**: AWS-specific guidance including STS credentials, IAM roles, and VPC configuration |
| 57 | +- **`hcp-create-azure`**: Azure identity configuration, resource groups, and region management |
| 58 | +- **`hcp-create-kubevirt`**: Network conflict prevention, VM sizing, and storage class management |
| 59 | +- **`hcp-create-openstack`**: OpenStack credentials, external networks, and flavor selection |
| 60 | +- **`hcp-create-powervs`**: IBM Cloud integration, processor types, and resource group management |
| 61 | +- **`hcp-create-agent`**: Bare metal deployment, agent management, and disconnected environments |
| 62 | + |
| 63 | +## Installation |
| 64 | + |
| 65 | +### From AI Helpers Marketplace |
| 66 | + |
| 67 | +```bash |
| 68 | +# Add the marketplace |
| 69 | +/plugin marketplace add openshift-eng/ai-helpers |
| 70 | + |
| 71 | +# Install the HCP plugin |
| 72 | +/plugin install hcp@ai-helpers |
| 73 | + |
| 74 | +# Use the command |
| 75 | +/hcp:generate aws "development cluster for API testing" |
| 76 | +``` |
| 77 | + |
| 78 | +### Manual Installation (Cursor) |
| 79 | + |
| 80 | +```bash |
| 81 | +# Clone the repository |
| 82 | +mkdir -p ~/.cursor/commands |
| 83 | +git clone [email protected]:openshift-eng/ai-helpers.git |
| 84 | +ln -s ai-helpers ~/.cursor/commands/ai-helpers |
| 85 | +``` |
| 86 | + |
| 87 | +## Common Use Cases |
| 88 | + |
| 89 | +### Development Environments |
| 90 | +- Quick cluster setup for testing |
| 91 | +- Cost-optimized configurations |
| 92 | +- Single replica control planes |
| 93 | + |
| 94 | +### Production Deployments |
| 95 | +- High-availability configurations |
| 96 | +- Multi-zone deployments |
| 97 | +- Auto-repair and monitoring enabled |
| 98 | + |
| 99 | +### Edge Computing |
| 100 | +- Minimal resource footprints |
| 101 | +- Disconnected/airgapped environments |
| 102 | +- Agent-based deployments |
| 103 | + |
| 104 | +### Special Requirements |
| 105 | +- FIPS compliance configurations |
| 106 | +- IPv6 and dual-stack networking |
| 107 | +- Custom storage and compute requirements |
| 108 | + |
| 109 | +## Architecture |
| 110 | + |
| 111 | +The plugin follows a modular architecture with: |
| 112 | + |
| 113 | +1. **Main Command**: `/hcp:generate` acts as an orchestrator |
| 114 | +2. **Provider Skills**: Specialized implementation guidance for each provider |
| 115 | +3. **Interactive Workflows**: Guided parameter collection and validation |
| 116 | +4. **Smart Defaults**: Environment-specific best practices |
| 117 | + |
| 118 | +This design ensures: |
| 119 | +- **Single Source of Truth**: Each provider's knowledge lives in one place |
| 120 | +- **Extensibility**: Easy to add new providers or update existing ones |
| 121 | +- **Maintainability**: Clear separation of concerns between providers |
| 122 | + |
| 123 | +## Contributing |
| 124 | + |
| 125 | +To add support for a new provider: |
| 126 | + |
| 127 | +1. Create a new skill directory: `plugins/hcp/skills/hcp-create-<provider>/` |
| 128 | +2. Implement the `SKILL.md` file following the established pattern |
| 129 | +3. Update the main command to invoke the new skill |
| 130 | +4. Test the implementation and add examples |
| 131 | + |
| 132 | +See existing skills as reference implementations. |
| 133 | + |
| 134 | +## Support |
| 135 | + |
| 136 | +- **Issues**: [GitHub Issues](https://github.com/openshift-eng/ai-helpers/issues) |
| 137 | +- **Documentation**: [HyperShift Documentation](https://hypershift.openshift.io/) |
| 138 | +- **Skills**: View individual skill files in `plugins/hcp/skills/` |
| 139 | + |
| 140 | +## License |
| 141 | + |
| 142 | +This plugin is part of the AI Helpers project and follows the same licensing terms. |
0 commit comments