Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .ibm/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,3 @@ retrieve ephemeral environment credentials.
- `KEYCLOAK_AUTH_CLIENT_SECRET`
- `KEYCLOAK_AUTH_LOGIN_REALM`
- `KEYCLOAK_AUTH_REALM`

# Installation Instructions for Tests

For tests dependent on `backstage-community-plugin-ocm-backend-dynamic` and
`backstage-community-plugin-ocm`, it's necessary to install **Advanced Cluster Management for
Kubernetes "MultiClusterHub"**.

Please follow these steps for installation:

1. Visit
[Installing Advanced Cluster Management for Kubernetes "MultiClusterHub"](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.10/html/install/installing#installing-from-the-operatorhub)
for detailed instructions on installing from the OperatorHub.
2 changes: 0 additions & 2 deletions .ibm/pipelines/auth/secrets-rhdh-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ data:
K8S_CLUSTER_NAME: $ENCODED_CLUSTER_NAME
K8S_CLUSTER_API_SERVER_URL: $K8S_CLUSTER_API_SERVER_URL
K8S_CLUSTER_TOKEN_ENCODED: $K8S_CLUSTER_TOKEN_ENCODED
OCM_CLUSTER_URL: $OCM_CLUSTER_URL
OCM_CLUSTER_TOKEN: $OCM_CLUSTER_TOKEN
KEYCLOAK_BASE_URL: $KEYCLOAK_BASE_URL_ENCODED
KEYCLOAK_LOGIN_REALM: $KEYCLOAK_LOGIN_REALM_ENCODED
KEYCLOAK_REALM: $KEYCLOAK_REALM_ENCODED
Expand Down
3 changes: 1 addition & 2 deletions .ibm/pipelines/cluster/k8s/k8s-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ EOF
fi
K8S_CLUSTER_TOKEN_ENCODED=$(printf "%s" $K8S_CLUSTER_TOKEN | base64 | tr -d '\n')
K8S_SERVICE_ACCOUNT_TOKEN=$K8S_CLUSTER_TOKEN_ENCODED
OCM_CLUSTER_TOKEN=$K8S_CLUSTER_TOKEN_ENCODED
export K8S_CLUSTER_TOKEN K8S_CLUSTER_TOKEN_ENCODED K8S_SERVICE_ACCOUNT_TOKEN OCM_CLUSTER_TOKEN
export K8S_CLUSTER_TOKEN K8S_CLUSTER_TOKEN_ENCODED K8S_SERVICE_ACCOUNT_TOKEN
}

patch_and_restart() {
Expand Down
6 changes: 0 additions & 6 deletions .ibm/pipelines/cluster/operators/acm/multiclusterhub.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .ibm/pipelines/cluster/operators/acm/operator-group.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions .ibm/pipelines/env_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ RHDH_PR_OS_CLUSTER_TOKEN=$(cat /tmp/secrets/RHDH_PR_OS_CLUSTER_TOKEN)
ENCODED_CLUSTER_NAME=$(echo "my-cluster" | base64)
K8S_CLUSTER_API_SERVER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
K8S_SERVICE_ACCOUNT_TOKEN=$K8S_CLUSTER_TOKEN_ENCODED
OCM_CLUSTER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
OCM_CLUSTER_TOKEN=$K8S_CLUSTER_TOKEN_ENCODED
KEYCLOAK_BASE_URL=$(cat /tmp/secrets/KEYCLOAK_BASE_URL)
KEYCLOAK_BASE_URL_ENCODED=$(printf "%s" $KEYCLOAK_BASE_URL | base64 | tr -d '\n')
KEYCLOAK_LOGIN_REALM="myrealm"
Expand Down
3 changes: 1 addition & 2 deletions .ibm/pipelines/jobs/eks-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ handle_eks_helm() {

K8S_CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
K8S_CLUSTER_API_SERVER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
OCM_CLUSTER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL OCM_CLUSTER_URL
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL

re_create_k8s_service_account_and_get_token

Expand Down
3 changes: 1 addition & 2 deletions .ibm/pipelines/jobs/eks-operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ handle_eks_operator() {

K8S_CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
K8S_CLUSTER_API_SERVER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
OCM_CLUSTER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL OCM_CLUSTER_URL
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL

re_create_k8s_service_account_and_get_token

Expand Down
3 changes: 1 addition & 2 deletions .ibm/pipelines/jobs/gke-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ handle_gke_helm() {

K8S_CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
K8S_CLUSTER_API_SERVER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
OCM_CLUSTER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL OCM_CLUSTER_URL
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL

re_create_k8s_service_account_and_get_token # Populate K8S_CLUSTER_TOKEN

Expand Down
3 changes: 1 addition & 2 deletions .ibm/pipelines/jobs/gke-operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ handle_gke_operator() {

K8S_CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
K8S_CLUSTER_API_SERVER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
OCM_CLUSTER_URL=$(printf "%s" "$K8S_CLUSTER_URL" | base64 | tr -d '\n')
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL OCM_CLUSTER_URL
export K8S_CLUSTER_URL K8S_CLUSTER_API_SERVER_URL

re_create_k8s_service_account_and_get_token # Populate K8S_CLUSTER_TOKEN

Expand Down
22 changes: 0 additions & 22 deletions .ibm/pipelines/resources/cluster_role/cluster-role-ocm.yaml

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions .ibm/pipelines/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ apply_yaml_files() {
"$dir/resources/service_account/service-account-rhdh.yaml"
"$dir/resources/cluster_role_binding/cluster-role-binding-k8s.yaml"
"$dir/resources/cluster_role/cluster-role-k8s.yaml"
"$dir/resources/cluster_role/cluster-role-ocm.yaml"
)

for file in "${files[@]}"; do
Expand All @@ -353,11 +352,7 @@ apply_yaml_files() {

oc apply -f "$dir/resources/cluster_role/cluster-role-k8s.yaml" --namespace="${project}"
oc apply -f "$dir/resources/cluster_role_binding/cluster-role-binding-k8s.yaml" --namespace="${project}"
oc apply -f "$dir/resources/cluster_role/cluster-role-ocm.yaml" --namespace="${project}"
oc apply -f "$dir/resources/cluster_role_binding/cluster-role-binding-ocm.yaml" --namespace="${project}"

OCM_CLUSTER_TOKEN=$(oc get secret rhdh-k8s-plugin-secret -n "${project}" -o=jsonpath='{.data.token}')
export OCM_CLUSTER_TOKEN
envsubst < "${DIR}/auth/secrets-rhdh-secrets.yaml" | oc apply --namespace="${project}" -f -

# Select the configuration file based on the namespace or job
Expand Down Expand Up @@ -599,39 +594,6 @@ uninstall_olm() {
fi
}

# Installs the advanced-cluster-management OCP Operator
install_acm_ocp_operator() {
oc apply -f "${DIR}/cluster/operators/acm/operator-group.yaml"
install_subscription advanced-cluster-management open-cluster-management release-2.14 advanced-cluster-management redhat-operators openshift-marketplace
wait_for_deployment "open-cluster-management" "multiclusterhub-operator"
wait_for_endpoint "multiclusterhub-operator-webhook" "open-cluster-management"
oc apply -f "${DIR}/cluster/operators/acm/multiclusterhub.yaml"
# wait until multiclusterhub is Running.
timeout 900 bash -c 'while true; do
CURRENT_PHASE=$(oc get multiclusterhub multiclusterhub -n open-cluster-management -o jsonpath="{.status.phase}")
echo "MulticlusterHub Current Status: $CURRENT_PHASE"
[[ "$CURRENT_PHASE" == "Running" ]] && echo "MulticlusterHub is now in Running phase." && break
sleep 10
done' || echo "Timed out after 15 minutes"
}

# TODO
# Installs Open Cluster Management K8S Operator (alternative of advanced-cluster-management for K8S clusters)
# TODO: Verify K8s compatibility and enable OCM tests if compatible
install_ocm_k8s_operator() {
install_subscription my-cluster-manager operators stable cluster-manager operatorhubio-catalog olm
wait_for_deployment "operators" "cluster-manager"
wait_for_endpoint "multiclusterhub-operator-work-webhook" "open-cluster-management"
oc apply -f "${DIR}/cluster/operators/acm/multiclusterhub.yaml"
# wait until multiclusterhub is Running.
timeout 600 bash -c 'while true; do
CURRENT_PHASE=$(oc get multiclusterhub multiclusterhub -n open-cluster-management -o jsonpath="{.status.phase}")
echo "MulticlusterHub Current Status: $CURRENT_PHASE"
[[ "$CURRENT_PHASE" == "Running" ]] && echo "MulticlusterHub is now in Running phase." && break
sleep 10
done' || echo "Timed out after 10 minutes"
}

# Installs the Red Hat OpenShift Pipelines operator if not already installed
install_pipelines_operator() {
DISPLAY_NAME="Red Hat OpenShift Pipelines"
Expand Down Expand Up @@ -683,14 +645,12 @@ delete_tekton_pipelines() {

cluster_setup_ocp_helm() {
install_pipelines_operator
install_acm_ocp_operator
install_crunchy_postgres_ocp_operator
install_orchestrator_infra_chart
}

cluster_setup_ocp_operator() {
install_pipelines_operator
install_acm_ocp_operator
install_crunchy_postgres_ocp_operator
install_serverless_ocp_operator
install_serverless_logic_ocp_operator
Expand All @@ -699,14 +659,12 @@ cluster_setup_ocp_operator() {
cluster_setup_k8s_operator() {
install_olm
install_tekton_pipelines
# install_ocm_k8s_operator
# install_crunchy_postgres_k8s_operator # Works with K8s but disabled in values file
}

cluster_setup_k8s_helm() {
# install_olm
install_tekton_pipelines
# install_ocm_k8s_operator
# install_crunchy_postgres_k8s_operator # Works with K8s but disabled in values file
}

Expand Down
15 changes: 0 additions & 15 deletions .ibm/pipelines/value_files/values_showcase-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,6 @@ global:
plural: "routes"
serviceLocatorMethod:
type: multiTenant
# Enable OCM plugins.
- package: ./dynamic-plugins/dist/backstage-community-plugin-ocm-backend-dynamic
disabled: false
pluginConfig:
catalog:
providers:
ocm:
default:
name: testCluster # Can be any arbitrary name supported by kubernetes
url: ${OCM_CLUSTER_URL}
serviceAccountToken: ${OCM_CLUSTER_TOKEN}
skipTLSVerify: true
owner: janus-authors
- package: ./dynamic-plugins/dist/backstage-community-plugin-ocm
disabled: false
# Enable Bulk import plugins.
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamic
disabled: false
Expand Down
15 changes: 0 additions & 15 deletions .ibm/pipelines/value_files/values_showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,6 @@ global:
plural: "routes"
serviceLocatorMethod:
type: multiTenant
# Enable OCM plugins.
- package: ./dynamic-plugins/dist/backstage-community-plugin-ocm-backend-dynamic
disabled: false
pluginConfig:
catalog:
providers:
ocm:
default:
name: testCluster # Can be any arbitrary name supported by kubernetes
url: ${OCM_CLUSTER_URL}
serviceAccountToken: ${OCM_CLUSTER_TOKEN}
skipTLSVerify: true
owner: janus-authors
- package: ./dynamic-plugins/dist/backstage-community-plugin-ocm
disabled: false
# Enable bulk import plugins.
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamic
disabled: false
Expand Down
103 changes: 0 additions & 103 deletions e2e-tests/playwright/e2e/plugins/ocm.spec.ts

This file was deleted.

Loading
Loading