Skip to content

Reintroduce demo scripts - #6181

Open
nimrodshn wants to merge 1 commit into
Azure:mainfrom
nimrodshn:add_demo_scripts
Open

Reintroduce demo scripts#6181
nimrodshn wants to merge 1 commit into
Azure:mainfrom
nimrodshn:add_demo_scripts

Conversation

@nimrodshn

Copy link
Copy Markdown
Collaborator

What

Reintroduce a set of helpful scripts to deploy ARO-HCP clusters against a local development environment.

These were removed in !4874.

Why

These are very helpful for local testing and are missing from our demo directory, as the current bicep based script targets production environment.

Testing

Testing is required for feature completion and tests should be part of the pull
request along with the feature changes.

Describe the testing provided. If you did not add tests, provide a clear
justification.

Special notes for your reviewer

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

If E2E tests are included:

  • E2E tests follow Principles of Good E2E Test Case Design
  • If new E2E use case is covered (via a new test or new check/verifier),
    demonstrate that the test is able to detect a defect/error and fail with
    proper error message and logs which communicates nature of the problem.

Copilot AI review requested due to automatic review settings July 21, 2026 07:04
@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nimrodshn
Once this PR has been reviewed and has the lgtm label, please assign miguelsorianod for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reintroduces a set of demo/ helper scripts and request templates intended to create/manage ARO-HCP clusters against a local development setup by issuing ARM-like calls to the RP frontend.

Changes:

  • Added demo/common.sh curl-based helpers for RP GET/PUT/DELETE requests and request headers.
  • Added numbered demo scripts to register the subscription, create customer infra, create a cluster + nodepool, and query/delete the cluster.
  • Added JSON request templates for cluster and node pool creation.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
demo/01-register-sub.sh Registers the RP via az or via a local RP call (currently calls undefined helpers).
demo/02-customer-infra.sh Creates customer-side infra (RG/VNET/NSG/KV/key) for the demo flow.
demo/03-create-cluster.sh Creates required UAMIs and sends the cluster create request built from a template.
demo/04-create-nodepool.sh Builds a nodepool request from template and sends RP PUT.
demo/05-delete-cluster.sh Deletes the cluster via RP DELETE.
demo/query-cluster-rp.sh Fetches the cluster via RP GET.
demo/common.sh Shared request/header helpers used by the demo scripts.
demo/cluster.tmpl.json Cluster request template consumed by 03-create-cluster.sh.
demo/node_pool.tmpl.json Node pool request template consumed by 04-create-nodepool.sh.

Comment thread demo/01-register-sub.sh
Comment on lines +10 to +13
if is_int_testing_subscription || is_stg_testing_subscription; then
az provider register --namespace "Microsoft.RedHatOpenShift"
else
rp_put_request "${SUBSCRIPTION_RESOURCE_ID}" "{\"state\":\"Registered\", \"registrationDate\": \"now\", \"properties\": { \"tenantId\": \"${TENANT_ID}\"}}" "2.0"
Comment thread demo/02-customer-infra.sh
Comment on lines +16 to +20
if [ "$1" == "swift" ]; then
SWIFT=true
else
echo "$0 takes a single optional argument \"swift\""
fi
Comment thread demo/03-create-cluster.sh
Comment on lines +60 to +63
UAMIS_JSON_MAP=$(echo -n ${UAMIS_JSON_MAP} | jq \
--arg operator_name $curr_operator_name \
--arg uami_resource_id $curr_uami_resource_id \
'
Comment thread demo/03-create-cluster.sh
Comment on lines +150 to +152
echo "creating azure user-assigned identity ${service_managed_identity_uami_name} in resource group ${CUSTOMER_RG_NAME}"
az identity create --name "${service_managed_identity_uami_name}" --resource-group "${CUSTOMER_RG_NAME}"
echo "user-assigned identity ${uami_name} created"
Comment thread demo/03-create-cluster.sh
Comment on lines +172 to +176
# control plane operator names required for OCP 4.19.
# TODO in the future the information of the required
# identities for a given OCP version will be provided
# via API.
CONTROL_PLANE_OPERATORS_NAMES=(
Comment thread demo/query-cluster-rp.sh
Comment on lines +1 to +4
#!/bin/bash

source env_vars
source "$(dirname "$0")"/common.sh
Comment thread demo/05-delete-cluster.sh
Comment on lines +1 to +4
#!/bin/bash

source env_vars
source "$(dirname "$0")"/common.sh
Comment thread demo/02-customer-infra.sh
Comment on lines +7 to +10
source env_vars

SWIFT=false
linked_resource_type=Microsoft.RedHatOpenShift/hcpOpenShiftClusters
Comment thread demo/03-create-cluster.sh
Comment on lines +7 to +8
source env_vars
source "$(dirname "$0")"/common.sh
Comment on lines +7 to +8
source env_vars
source "$(dirname "$0")"/common.sh
@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown

@nimrodshn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-parallel 99fcbc2 link true /test e2e-parallel

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants