Add a cluster to APPUiO Cloud
This guide describes the steps required to turn an OpenShift 4 cluster into an APPUiO Zone.
VSHN employees should follow Activate Zone instead of continuing this guide. |
Configure Keycloak
-
Create a new Keycloak Client with the following settings (leave the others at default value)
Client ID = appuio_<c-cluster-id> (1) Access Type = confidential Valid Redirect URIs = https://oauth-openshift.apps.cluster-id.tld/oauth2callback/APPUiO Base URL = https://console.cluster-id.tld/ [ Authentication Flow Overrides ] Browser Flow = APPUiO Browser RBAC (2)
1 For each enabled APPUiO Zone there shall be its own client using the cluster ID and the prefix appuio_
as name.2 See Setup RBAC
VSHN uses id.vshn.net as the IDP. |
Configure openshift4-authentication
-
After adding the cluster as a new client to APPUiO IdP, add the client secret to Vault. The value is being displayed in a grey box in the "Credentials" tab from the Keycloak client settings.
-
Add component configuration
parameters: openshift4_authentication: secrets: appuio-cloud-keycloak: clientSecret: '?{vaultkv:${cluster:tenant}/${cluster:name}/oidc/appuio-keycloak/clientSecret}' (1) identityProviders: appuio_keycloak: name: APPUiO-Cloud type: OpenID mappingMethod: add openID: issuer: https://id.appuio.cloud/auth/realms/appuio-cloud clientID: ${cluster:name} clientSecret: name: appuio-cloud-keycloak claims: (2) preferredUsername: - preferred_username name: - name email: - email
1 The Vault path for client secret 2 See also User object names in the OpenShift cluster
Configure group-sync-operator
The group-sync-operator is required to sync Keycloak groups to each APPUiO Zone.
-
Add component configuration
parameters: group_sync_operator: secrets: sync-appuio-keycloak-groups: stringData: username: '?{vaultkv:${cluster:tenant}/${cluster:name}/oidc/appuio-keycloak-sync/username}' password: '?{vaultkv:${cluster:tenant}/${cluster:name}/oidc/appuio-keycloak-sync/password}' sync: sync-keycloak-groups: schedule: '* * * * *' providers: keycloak: keycloak: url: https://id.appuio.cloud credentialsSecret: name: sync-appuio-keycloak-groups loginRealm: master realm: appuio-cloud scope: sub
Configure keycloak-attribute-sync-controller
The keycloak-attribute-sync-controller is required to sync Keycloak user attributes to each APPUiO Zone.
-
Add component configuration
parameters: keycloak_attribute_sync_controller: sync_credentials: sync-default-org-credentials: stringData: username: '?{vaultkv:${cluster:tenant}/${cluster:name}/oidc/appuio-keycloak-sync/username}' (1) password: '?{vaultkv:${cluster:tenant}/${cluster:name}/oidc/appuio-keycloak-sync/password}' sync_configurations: sync-default-org: url: https://id.appuio.cloud loginRealm: master credentialsSecret: name: sync-default-org-credentials realm: appuio-cloud attribute: appuio.io/default-organization targetAnnotation: appuio.io/default-organization schedule: '@every 1m'
1 The user for syncing attributes is the same as the one used for group-sync-operator. -
Compile and push the cluster catalog
-
Wait for Argo CD to sync the config
Configure Appcat ObjectStorage provider
Please refer to the dedicated page to setup AppCat ObjectStorage
Add Cluster to Status Page
-
Login to Statuspal
-
Select
APPUiO Cloud
status pageYou need Admin
rights on the "APPUiO Cloud" status page to be able to add new services. -
Create a service for the APPUiO Zone
-
Create the following other services and select the previously created APPUiO Zone service as their parent:
-
OpenShift Console
-
Description: URL to the OpenShift Console
-
Select
Statuspal monitoring
-
Method:
HEAD
-
Ping url: URL to the OpenShift Console
-
Check
Automatically create incident
-
Check
Pause monitoring during maintenances
-
-
OpenShift / Kubernetes API
-
Description: URL to the OpenShift / Kubernetes API
-
Select
Statuspal monitoring
-
Method:
GET
-
Ping url: URL to the OpenShift / Kubernetes API +
/healthz
-
Check
Automatically create incident
-
Check
Pause monitoring during maintenances
-
-
Image Registry
-
Description: URL to the Image Registry
-
Select
Statuspal monitoring
-
Method:
HEAD
-
Ping url: URL to the Image Registry
-
Check
Automatically create incident
-
Check
Pause monitoring during maintenances
-
-
Logging
-
Description: URL to the Logging
-
Select
Statuspal monitoring
-
Method:
HEAD
-
Ping url: URL to the Logging +
/app/kibana
-
Check
Automatically create incident
-
Check
Pause monitoring during maintenances
-
-
Networking
-
Ingress
-