- Helm (
>= v3.14
): Helm website - OpenShift (
>= v4.14.12
)
Ensure all dependencies for the CYPEX script are met if you generate the values.yaml
file with the ./generate_values.sh
bash script.
Refer to the OpenShift Documentation Follow the OpenShift Docs to get started with setting up your OpenShift environment.
To access the OpenShift web console:
- Run the
crc console
command. This will open your web browser and direct it to the web console.
Note:
You can also view the password for the developer
and kubeadmin
users by running:
crc console --credentials
Log in as administrator:
Username: kubeadmin
CYPEX supports three different PostgreSQL database variants. Select the appropriate setup and generate the values.yaml
file if necessary:
Internal Database (INTERNAL_DB):
- This configuration refers to a self-hosted PostgreSQL instance as a single Docker container within your application’s infrastructure, suitable for development or small-scale production environments.
- To generate the
values.yaml
for INTERNAL_DB:cd helm/cypex ./generate_values.sh --server-type INTERNAL_DB
External Database (EXTERNAL_DB):
- This configuration connects to an external PostgreSQL database managed separately from the application environment, ideal for production environments.
- To generate the
values.yaml
for EXTERNAL_DB:cd helm/cypex ./generate_values.sh --server-type EXTERNAL_DB
- Manually adjust database connections in
values.yaml
:Note:cypexDatabase: serverType: EXTERNAL_DB databaseHost: examplehost.domain.net databaseName: databaseCypexName port: "5432" postgresUser: postgres postgresPassword: <<password>> authenticatorPassword: <<password>>
postgresUser
andpostgresPassword
should already exist. TheauthenticatorPassword
will be created during the installation.
PostgreSQL Operator Database (PGO_DB):
- This configuration uses a PostgreSQL instance managed by the PostgreSQL Operator in a Kubernetes environment, suitable for cloud-native applications requiring dynamic scaling, high availability, and automated disaster recovery.
- Install the PostgreSQL Operator:
cd helm/postgres-operator helm install postgres-operator .
- Generate the
values.yaml
for PGO_DB:cd helm/cypex ./generate_values.sh --server-type PGO_DB
- Alternatively, you can edit
values.yaml
manually.
By default, the values.yaml
file is not included in the chart. It should be generated using the values.yaml.sample
. There are two ways to proceed if you have not already generated it in Step 1:
Using the
generate_values.sh
Script:cd helm/cypex ./generate_values.sh
This script helps generate all the secrets and certificates needed to start. A symbolic link folder named
secrets
is used to point to the generated secrets.Manually Editing
values.yaml.sample
:- Copy
values.yaml.sample
tovalues.yaml
and edit it manually. - Ensure self-signed certificates for Nginx, JWT secrets, PostgreSQL, and authenticator user passwords are generated first.
- Copy
Once the values.yaml
file is generated, adjust all specific configurations according to your OpenShift implementation, such as:
- Domain
cypexDatabase.storageSize
cypexDatabase.numberOfInstances
Once the values.yaml
file is generated and adjusted, proceed with the installation:
cd helm/cypex
helm install cypex .
The following output should be displayed:
NAME: cypex
LAST DEPLOYED: Tue Apr 16 12:50:31 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
To update an existing deployment:
cd helm/cypex
helm upgrade cypex .
Note: OpenShift’s reconciliation loop ensures everything is installed and running, even if you don’t install templates in a specific order.
To enable port forwarding and access CYPEX locally:
kubectl port-forward service/cypex-gui 8443:8443
Then open CYPEX in your browser at https://localhost:8443
.
Use the following credentials to log in:
User: admin
Password: (Take the password from the `values.yaml` file under the key `cypexApi.adminPassword`)
To uninstall CYPEX:
helm uninstall cypex
For external databases, manually remove all database objects to fully clean up:
DROP SCHEMA cypex cascade;
DROP SCHEMA cypex_api cascade;
DROP SCHEMA cypex_api_internal cascade;
DROP SCHEMA cypex_extensions cascade;
DROP SCHEMA cypex_generated cascade;
DROP SCHEMA cypex_log cascade;
DROP ROLE anon;
DROP ROLE authenticator;
REVOKE all on schema public from cypex_user;
REVOKE all on spatial_ref_sys from cypex_user;
REVOKE all on geography_columns from cypex_user;
REVOKE all on geometry_columns from cypex_user;
REVOKE all on schema public from cypex_admin;
REVOKE all on spatial_ref_sys from cypex_admin;
REVOKE all on geography_columns from cypex_admin;
REVOKE all on geometry_columns from cypex_admin;
REVOKE all on database <DATABASE NAME> from cypex_admin;
DROP ROLE cypex_user;
DROP ROLE cypex_admin;
Uninstall the PostgreSQL Operator if needed:
helm uninstall postgres-operator
Remove remaining Persistent Volumes:
kubectl get pv
kubectl delete pv <NAME>
CYPEX images can be obtained through Docker Hub. Please contact us if your account has not been granted access.
Install CYPEX Enterprise by setting Docker Hub credentials:
helm install cypex . --set cypexApi.imageCredentials.username=<DOCKER_HUB_USERNAME> --set cypexApi.imageCredentials.password=<DOCKER_HUB_PASSWORD>
Also adjust cypexApi.cypexLicense
and cypexApi.image
in the values.yaml
file.