|
| 1 | +# Container Publishing Setup |
| 2 | + |
| 3 | +This guide helps you set up container publishing for your fork of kubernetes-mcp-server. |
| 4 | + |
| 5 | +## 🐳 Container Registry Configuration |
| 6 | + |
| 7 | +### Current Configuration |
| 8 | +- **Registry**: `quay.io/macayaven/kubernetes_mcp_server_openshift_ai` |
| 9 | +- **Workflow**: `.github/workflows/release-image.yml` |
| 10 | +- **Trigger**: Push to main branch or manual workflow dispatch |
| 11 | + |
| 12 | +### Required GitHub Secrets |
| 13 | + |
| 14 | +You need to set up these secrets in your GitHub repository: |
| 15 | + |
| 16 | +#### 1. QUAY_USERNAME |
| 17 | +Your Quay.io username. |
| 18 | + |
| 19 | +```bash |
| 20 | +# Set the secret |
| 21 | +gh secret set QUAY_USERNAME -R macayaven/openshift-mcp-server --body "your-quay-username" |
| 22 | +``` |
| 23 | + |
| 24 | +#### 2. QUAY_PASSWORD |
| 25 | +Your Quay.io password or access token. |
| 26 | + |
| 27 | +```bash |
| 28 | +# Set the secret |
| 29 | +gh secret set QUAY_PASSWORD -R macayaven/openshift-mcp-server --body "your-quay-password-or-token" |
| 30 | +``` |
| 31 | + |
| 32 | +### Quay.io Setup |
| 33 | + |
| 34 | +If you don't have a Quay.io account: |
| 35 | + |
| 36 | +1. **Create Account**: Go to [quay.io](https://quay.io) and sign up |
| 37 | +2. **Create Repository**: Create a repository named `kubernetes_mcp_server_openshift_ai` |
| 38 | +3. **Generate Token**: Create an access token with `write` permissions |
| 39 | + |
| 40 | +#### Using Access Token (Recommended) |
| 41 | +1. Go to your Quay.io account settings |
| 42 | +2. Navigate to "Applications" → "Generate Token" |
| 43 | +3. Give it a name (e.g., "github-actions") |
| 44 | +4. Select permissions: `write` for repositories |
| 45 | +5. Use the token as `QUAY_PASSWORD` |
| 46 | + |
| 47 | +### Manual Publishing |
| 48 | + |
| 49 | +If you prefer to publish manually: |
| 50 | + |
| 51 | +```bash |
| 52 | +# Build the image |
| 53 | +podman build -t quay.io/macayaven/kubernetes_mcp_server_openshift_ai:latest . |
| 54 | + |
| 55 | +# Login to Quay |
| 56 | +podman login quay.io |
| 57 | + |
| 58 | +# Push the image |
| 59 | +podman push quay.io/macayaven/kubernetes_mcp_server_openshift_ai:latest |
| 60 | +``` |
| 61 | + |
| 62 | +### Testing the Workflow |
| 63 | + |
| 64 | +After setting up secrets: |
| 65 | + |
| 66 | +1. **Go to**: https://github.com/macayaven/openshift-mcp-server/actions |
| 67 | +2. **Click**: "Release as container image" workflow |
| 68 | +3. **Click**: "Run workflow" |
| 69 | +4. **Select branch**: `main` |
| 70 | +5. **Click**: "Run workflow" |
| 71 | + |
| 72 | +### Troubleshooting |
| 73 | + |
| 74 | +#### Common Issues |
| 75 | + |
| 76 | +1. **Authentication Failed** |
| 77 | + - Check QUAY_USERNAME and QUAY_PASSWORD secrets |
| 78 | + - Ensure token has proper permissions |
| 79 | + - Verify repository exists on Quay.io |
| 80 | + |
| 81 | +2. **Repository Not Found** |
| 82 | + - Create the repository on Quay.io first |
| 83 | + - Check spelling of repository name |
| 84 | + |
| 85 | +3. **Permission Denied** |
| 86 | + - Ensure token has `write` permissions |
| 87 | + - Check if you're the repository owner |
| 88 | + |
| 89 | +#### Debugging |
| 90 | + |
| 91 | +Check the workflow logs: |
| 92 | +```bash |
| 93 | +# View recent workflow runs |
| 94 | +gh run list --repo macayaven/openshift-mcp-server |
| 95 | + |
| 96 | +# View specific run logs |
| 97 | +gh run view --log <run-id> --repo macayaven/openshift-mcp-server |
| 98 | +``` |
| 99 | + |
| 100 | +### Container Image Usage |
| 101 | + |
| 102 | +Once published, users can pull your image: |
| 103 | + |
| 104 | +```bash |
| 105 | +# Pull the image |
| 106 | +podman pull quay.io/macayaven/kubernetes_mcp_server_openshift_ai:latest |
| 107 | + |
| 108 | +# Run the image |
| 109 | +podman run -it --rm \ |
| 110 | + -v ~/.kube/config:/root/.kube/config:ro \ |
| 111 | + quay.io/macayaven/kubernetes_mcp_server_openshift_ai:latest |
| 112 | +``` |
| 113 | + |
| 114 | +### Security Considerations |
| 115 | + |
| 116 | +- **Secrets**: Never commit secrets to repository |
| 117 | +- **Tokens**: Use access tokens instead of passwords |
| 118 | +- **Permissions**: Grant minimum required permissions |
| 119 | +- **Rotation**: Rotate tokens regularly |
| 120 | + |
| 121 | +--- |
| 122 | + |
| 123 | +**Note**: This container publishing is optional. The primary distribution method for this fork is through npm packages. |
0 commit comments