agentleFS
rossoctlrossoctl/agent-skills/skills/hypershift-setup/SKILL.md

hypershift-setup

Skill1 starsChanged 4 months agoApache-2.0View on GitHub

Set up the local environment for HyperShift testing: installs the hcp CLI, ansible collections, Python dependencies, clones hypershift-automation, and configures credentials. Use when setting up HyperShift for the first time, after reinstalling tools, or when the hcp CLI or ansible collections are missing.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After reinstalling tools or machine

    line 22
  2. Distinctive:

    If automatic download fails:

    line 88
  3. Distinctive:

    hypershift-preflight: Run full pre-flight checks

    line 214
  4. Distinctive:

    hypershift-cluster: Create and destroy clusters

    line 215
  5. Distinctive:

    hypershift-quotas: Check AWS quotas

    line 216

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

HyperShift Local Setup Skill

Set up the local development environment for HyperShift cluster provisioning.

Scripts referenced here live in ../hypershift-cluster/scripts/. Run any script with no arguments (or --help where supported) to see its options first.

When to Use

  • First time setting up HyperShift testing
  • After reinstalling tools or machine
  • Missing hcp CLI or ansible collections
  • User asks "setup hypershift" or "configure hypershift"

Prerequisites

Before running setup:

  1. AWS CLI: Configured with admin credentials
  2. OpenShift CLI (oc): Installed and logged into the management cluster
  3. Ansible: pip install ansible-core
  4. Credentials file: Created by setup-hypershift-ci-credentials.sh

Quick Setup Workflow

# 1. Run preflight check first
../hypershift-cluster/scripts/preflight-check.sh

# 2. Set up credentials (requires IAM admin - first time only)
../hypershift-cluster/scripts/setup-hypershift-ci-credentials.sh

# 3. Set up local tools
../hypershift-cluster/scripts/local-setup.sh

What local-setup.sh Does

  1. Loads credentials from .env.rossoctl-hypershift-custom or .env.hypershift-ci
  2. Installs hcp CLI from the OpenShift console to ~/.local/bin
  3. Clones hypershift-automation repository (fork with additional-tags support)
  4. Installs ansible collections: kubernetes.core, amazon.aws, community.general
  5. Installs Python dependencies: boto3, botocore, kubernetes, openshift
  6. Saves pull secret to ~/.pullsecret.json
  7. Verifies kubeconfig for the management cluster

Running local-setup.sh

../hypershift-cluster/scripts/local-setup.sh

Expected output:

✓ Loaded credentials from .env.rossoctl-hypershift-custom
✓ hcp CLI installed to ~/.local/bin
✓ Cloned to .../hypershift-automation
✓ Ansible collections installed
✓ Python dependencies installed
✓ Pull secret saved to ~/.pullsecret.json
✓ Management kubeconfig verified

After Setup

# Create your first cluster
../hypershift-cluster/scripts/create-cluster.sh

See the hypershift-cluster skill for the full create/deploy/test workflow.

Manual Steps

Install hcp CLI Manually

If automatic download fails:

# 1. Get the console downloads URL
oc get consoleclidownloads hcp-cli-download -o jsonpath='{.spec.links}'

# 2. Download from the OpenShift console
# Go to: ? → Command Line Tools → Download hcp CLI

# 3. Extract to ~/.local/bin
tar -xzf hcp-*.tar.gz && mv hcp ~/.local/bin/
chmod +x ~/.local/bin/hcp

# 4. Add to PATH (add to ~/.zshrc or ~/.bashrc)
export PATH="$HOME/.local/bin:$PATH"

Install Ansible Collections Manually

ansible-galaxy collection install kubernetes.core amazon.aws community.general --force-with-deps
pip install boto3 botocore kubernetes openshift PyYAML

Clone hypershift-automation Manually

cd ..
git clone -b add-additional-tags-support https://github.com/Ladas/hypershift-automation.git

Credentials File Structure

Setup creates .env.rossoctl-hypershift-custom (or .env.hypershift-ci) in your working directory:

# AWS credentials (scoped to MANAGED_BY_TAG)
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_REGION="us-east-1"

# Cluster configuration
export MANAGED_BY_TAG="rossoctl-hypershift-custom"
export BASE_DOMAIN="octo-emerging.redhataicoe.com"
export HCP_ROLE_NAME="rossoctl-hypershift-custom-hcp-role"

# Management cluster access
export KUBECONFIG="$HOME/.kube/rossoctl-hypershift-ci-mgmt.kubeconfig"

# Pull secret (for accessing Red Hat registries)
export PULL_SECRET='{"auths":{...}}'

The scripts locate this file relative to your current working directory (or via $HYPERSHIFT_ENV_FILE); they do not assume any particular repository layout.

Verify Setup

# Check hcp CLI
hcp version

# Check ansible
ansible-playbook --version
ansible-galaxy collection list | grep -E "kubernetes|amazon|community"

# Check AWS credentials
aws sts get-caller-identity

# Check management cluster access
source .env.rossoctl-hypershift-custom
oc get hostedclusters -n clusters

Troubleshooting

hcp CLI Not Found

# Add ~/.local/bin to PATH
export PATH="$HOME/.local/bin:$PATH"

# Check if installed
ls -la ~/.local/bin/hcp

Ansible Collection Errors

ansible-galaxy collection install kubernetes.core amazon.aws community.general --force

hypershift-automation Not Found

# Check the sibling directory (or $HYPERSHIFT_AUTOMATION_DIR)
ls -la ../hypershift-automation

# Re-run setup
../hypershift-cluster/scripts/local-setup.sh

AWS Credentials Invalid

# Verify credentials work
source .env.rossoctl-hypershift-custom
aws sts get-caller-identity

# If using the wrong credentials (e.g., CI instead of admin)
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY

Management Cluster Access Denied

# Re-login to the management cluster
oc login <management-cluster-url>

# Re-run credentials setup
../hypershift-cluster/scripts/setup-hypershift-ci-credentials.sh

Related Skills

  • hypershift-preflight: Run full pre-flight checks
  • hypershift-cluster: Create and destroy clusters
  • hypershift-quotas: Check AWS quotas

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.