This repository provides scripts and procedures for setting up test validation external services for SAP EIC on OpenShift Container Platform (OCP). The services covered include PostgreSQL and Redis. This guide will help you install and configure these services, as well as perform cleanup after validation.
- Access to an OpenShift Container Platform cluster using an account with
cluster-admin
permissions. - Installed
oc
,jq
, andgit
command line tools on your local system.
When ODF (OpenShift Data Foundation) is installed, set the shared file system parameters as follows:
Property | Settings |
---|---|
Enable Shared File System | yes |
Shared File System Storage Class | ocs-storagecluster-cephfs |
Additionally, set the ODF ocs-storagecluster-ceph-rbd
storage class as default for RWO/RWX Block volumes to meet most block storage requirements for various services running on OpenShift.
The following steps will install the Crunchy Postgres Operator and use its features to manage the lifecycle of the external PostgreSQL DB service.
- Clone the repository:
git clone https://github.com/redhat-sap/sap-edge.git
- Create a new project:
oc new-project sap-eic-external-postgres
- Apply the OperatorGroup configuration:
oc apply -f sap-edge/edge-integration-cell/external-postgres/operatorgroup.yaml
- Apply the Subscription configuration:
oc apply -f sap-edge/edge-integration-cell/external-postgres/subscription.yaml
- Wait for the Postgres operator to be ready:
bash sap-edge/edge-integration-cell/external-postgres/wait_for_postgres_operator_ready.sh
- Create a PostgresCluster:
oc apply -f sap-edge/edge-integration-cell/external-postgres/postgrescluster-v15.yaml
- For other versions, replace
v14
withv15
orv16
.
- For other versions, replace
- Wait for Crunchy Postgres to be ready:
bash sap-edge/edge-integration-cell/external-postgres/wait_for_postgres_ready.sh
- Get access details of Crunchy Postgres:
bash sap-edge/edge-integration-cell/external-postgres/get_external_postgres_access.sh
After running the above script, you will get the access details of Crunchy Postgres like the following:
- External DB Hostname:
hippo-primary.sap-eic-external-postgres.svc
- External DB Port:
5432
- External DB Name:
eic
- External DB Username:
eic
- External DB Password:
xklaieniej12#
- External DB TLS Root Certificate saved to
external_postgres_db_tls_root_cert.crt
Please use the provided information to set up the EIC external DB accordingly.
To clean up the PostgresCluster:
oc delete postgrescluster eic -n sap-eic-external-postgres
bash sap-edge/edge-integration-cell/external-postgres/wait_for_deletion_of_postgrescluster.sh
oc delete subscription crunchy-postgres-operator -n sap-eic-external-postgres
oc get csv -n sap-eic-external-postgres --no-headers | grep 'postgresoperator' | awk '{print $1}' | xargs -I{} oc delete csv {} -n sap-eic-external-postgres
oc delete namespace sap-eic-external-postgres
This guide provides instructions for setting up and validating the Redis service for SAP EIC on OpenShift Container Platform (OCP). The steps include installing the Redis Enterprise Operator, creating a RedisEnterpriseCluster and RedisEnterpriseDatabase, and cleaning up after validation.
- Access to an OpenShift Container Platform cluster using an account with
cluster-admin
permissions. - Installed
oc
,jq
, andgit
command line tools on your local system.
The following steps will install the Redis Enterprise Operator and use its features to manage the lifecycle of the external Redis datastore service.
- Clone the repository:
git clone https://github.com/redhat-sap/sap-edge.git
- Create a new project:
oc new-project sap-eic-external-redis
- Apply the OperatorGroup configuration:
oc apply -f sap-edge/edge-integration-cell/external-redis/operatorgroup.yaml
- Apply the Subscription configuration:
oc apply -f sap-edge/edge-integration-cell/external-redis/subscription.yaml
- Apply the Security Context Constraint (SCC):
- For OpenShift versions earlier than 4.16, use:
oc apply -f sap-edge/edge-integration-cell/external-redis/security_context_constraint_v2.yaml
- For OpenShift versions 4.16 and later, use
oc apply -f sap-edge/edge-integration-cell/external-redis/security_context_constraint.yaml
- Wait for the Redis operator to be ready:
bash sap-edge/edge-integration-cell/external-redis/wait_for_redis_operator_ready.sh
- Create a RedisEnterpriseCluster:
oc apply -f sap-edge/edge-integration-cell/external-redis/redis_enterprise_cluster.yaml
- Wait for the RedisEnterpriseCluster to be ready:
bash sap-edge/edge-integration-cell/external-redis/wait_for_rec_running_state.sh
- Create a RedisEnterpriseDatabase:
oc apply -f sap-edge/edge-integration-cell/external-redis/redis_enterprise_database.yaml
- Note: You might need to run the above command several times until it works because the previously created RedisEnterpriseCluster needs some time to enable the admission webhook successfully.
- Wait for the RedisEnterpriseDatabase to be ready:
bash sap-edge/edge-integration-cell/external-redis/wait_for_redb_active_status.sh
- Get access details of Redis:
bash sap-edge/edge-integration-cell/external-redis/get_redis_access.sh
After running the above script, you will get the access details of Redis like the following:
- External Redis Addresses:
redb-headless.sap-eic-external-redis.svc:12117
- External Redis Mode:
standalone
- External Redis Username:
[leave me blank]
- External Redis Password:
XpglWqoR
- External Redis Sentinel Username:
[leave me blank]
- External Redis Sentinel Password:
[leave me blank]
- External Redis TLS Certificate content saved to
external_redis_tls_certificate.pem
- External Redis Server Name:
[leave me blank]
To clean up the Redis instance:
oc delete redisenterprisedatabase redb -n sap-eic-external-redis
oc delete redisenterprisecluster rec -n sap-eic-external-redis
bash sap-edge/edge-integration-cell/external-redis/wait_for_deletion_of_rec.sh
oc delete subscription redis-enterprise-operator-cert -n sap-eic-external-redis
oc get csv -n sap-eic-external-redis --no-headers | grep 'redis-enterprise-operator' | awk '{print $1}' | xargs -I{} oc delete csv {} -n sap-eic-external-redis
# For OpenShift versions earlier than 4.16
oc delete scc redis-enterprise-scc-v2
# For OpenShift versions 4.16 and later
oc delete scc redis-enterprise-scc
oc delete namespace sap-eic-external-redis
This project is licensed under the Apache License 2.0. See the LICENSE for details.