General Usage Engine Private Edition Preparations (4.2)
Add Helm Repository
Add the helm repository where the Usage Engine Private Edition helm chart is located by running the following command:
helm repo add digitalroute https://digitalroute-public.github.io/usage-engine-private-edition
Although it is not a strict requirement, the install commands used throughout this installation guide assume that the repository has been added like this.
Container Images
Usage Engine Private Edition consists of the following container images hosted in the Digital Route AWS ECR registry:
Name | Description |
---|---|
| This is the container image used by the platform pod. |
| This is the container image used by EC pods. |
| This is the container image used by the uepe-operator pod. |
| This is the container image used by the desktop-online pod. |
Where <version>
is the desired Usage Engine Private Edition version, for example 4.0.0
.
Note!
Since Usage Engine Private Edition 3.1, the container images have multi-architecture support (AMD and ARM).
Hosting Container Images in Your Own Container Registry
If you have your own container registry, it is recommended that you host the Usage Engine Private Edition container images there rather than in the Digital Route AWS ECR registry.
In order to access the container images in the Digital Route AWS ECR registry, you will need to authenticate yourself first. Here is how you can do this using the docker
CLI:
docker login -u AWS \
-p $(AWS_ACCESS_KEY_ID=<your aws access key> AWS_SECRET_ACCESS_KEY=<your aws secret access key> aws ecr get-login-password --region eu-west-1) \
462803626708.dkr.ecr.eu-west-1.amazonaws.com
Where <your aws access key>
and <your aws secret access key>
are the access keys provided by Digital Route (see General Pre-requisites | ECR Access Keys in case you have not received any access keys yet).
Once authenticated, you can pull the container images, re-tag them and then finally push them to your own container image repository.
Depending on how your container registry is configured, you probably need to set up an image pull secret that allows the Kubernetes cluster to pull the container images from your container registry in runtime.
Image Pull Secret for Digital Route AWS ECR
On the other hand, if you do not have your own container image registry, then you need to set up an image pull secret that allows the Kubernetes cluster to pull the container images from the Digital Route AWS ECR in runtime.
Such a secret can be created like this:
kubectl create secret docker-registry ecr-cred \
--docker-server=https://462803626708.dkr.ecr.eu-west-1.amazonaws.com \
--docker-username=AWS \
--docker-password=$(AWS_ACCESS_KEY_ID=<your aws access key> AWS_SECRET_ACCESS_KEY=<your aws secret access key> aws ecr get-login-password --region eu-west-1) \
-n uepe
Where <your aws access key>
and <your aws secret access key>
are the access keys provided by Digital Route (see General Pre-requisites | ECR Access Keys in case you have not received any access keys yet).
Since AWS ECR credentials expire after 12 hours, the image pull secret needs to be refreshed regularly. This can be automated through a cron job. The following yaml spec is an example of such a cron job:
Where <your aws access key>
and <your aws secret access key>
are the access keys provided by Digital Route (see General Pre-requisites | ECR Access Keys in case you have not received any access keys yet).
Simply put the above yaml spec into a file called ecr-credentials-sync.yaml
, and then use the following command to create it in your Kubernetes cluster:
System Database
The Usage Engine Private Edition helm chart is capable of automatically creating the system database at install time. However, that assumes that you are able to supply database administrator credentials (see Bootstrapping System Credentials).
If, for one reason or another, you are unable to supply that, the system database must be created manually prior to installing the Usage Engine Private Edition helm chart.
A tool called uepe-sys-db-tool.jar
is provided to facilitate this.
To use it, simply go to Release Information, download it for the relevant version, and then execute it like this:
The instructions on screen will guide you through the process of configuring the database, and once done, a set of database scripts will be generated. These database scripts can then be used to create the system database and database users. Following the instructions on the screen, you are also required to supply the JDBC user and JDBC password that Usage Engine Private Edition will use to connect to its system database.
The main entry point script mentioned at the end of the instruction, is the ONLY file that should be executed by the user. The rest of the files are referenced by the main entry point script to complete the database creation.
Example - SAP Hana
The SAP Hana instruction would look like this.
The main entry point script saphana_create_instance.sh
should be executed by the user like this:
Example - PostgreSQL
The PostgreSQL instruction would look like this.
The main entry point script postgre_create_instance.sh
should be executed like this, passing the <postgreSQL administrator user> as the argument.
At the end of the execution, you may connect to the database instance via database client tool. Once connected to the database instance, verify that system database and database users have been created successfully.
However, you won’t see any database table being created in the system database. This was designed deliberately as the database tables will only be created during the installation of the Usage Engine Private Edition.
cert-manager
The most automated and secure way to provide the certificate is to use cert-manager .
If it is not already installed in your Kubernetes cluster, follow these instructions on how to install the cert-manager Helm chart. Make sure to install a version that is listed in the Compatibility Matrix (4.2).
Cert-manager must be backed by a certificate authority (CA) to sign the certificates. Once configured with a CA, cert-manager will automatically sign and renew certificates for the system as needed. Configuring cert-manager with a CA is done by creating an Issuer
or ClusterIssuer
resource (this resource will be referenced later when installing Usage Engine Private Edition).
Refer to Issuer Configuration for a all the details.
It’s also possible to use an issuer specifiction that will issue a self-signed certificate:
Please note that the ClusterIssuer
mentioned above is only recommended for testing purposes and not for production. In the coming section, we will create a ClusterIssuer
of ACME type
, which is generally used in production environment.
Regardless of the chosen issuer specification, to create the issuer, simply put the specification in a yaml file (here we call it example-issuer.yaml
), and then execute a command like this:
Based on the example above the created ClusterIssuer
can be inspected like this:
Secret
If you do not want to automate the certificate provisioning with cert-manager, you can instead manually install a public certificate in a Kubernetes Secret
and then refer to that when installing Usage Engine Private Edition.
The Secret
must include a keystore file (keystore.jks) in JKS format as well as separate files for key (tls.key) and certificate (tls.crt).
This is an example script that can generate a Secret
like that (make sure to set the parameters at the beginning of the script before executing it):
Note that this will generate a self-signed certificate, which is not suitable for use in publicly exposed interfaces.
Once the Secret
has been generated, its content can be inspected like this:
Bootstrapping System Credentials
Usage Engine Private Edition uses a number of system credentials in order to function as expected.
These system credentials are kept in a Kubernetes secret called env-secrets
located in the same namespace as where Usage Engine Private Edition is being installed.
This secret can be populated in three different ways:
Manually creating and populating it prior to installing Usage Engine Private Edition.
Providing the credential(s) as helm values at install time. In which case the secret will be automatically created (if it does not already exist) and populated with the corresponding helm value(s). Be aware that storing credentials in a values.yaml file in version control is not secure. If you still need to do this you should consider using tools like GitHub - getsops/sops: Simple and flexible tool for managing secrets .
Letting it be automatically populated at install time. In which case the secret will be automatically created and populated. Passwords will consist of eight randomly generated characters.
Here follows an explanation of the system credentials used by Usage Engine Private Edition:
Secret Key | Corresponding Helm Value | Description |
---|---|---|
|
| The user that Usage Engine Private Edition uses when connecting to the system database. |
|
| The password of the user that Usage Engine Private Edition uses when connecting to the system database. See If you created the system database manually (see the preparations for System Database), then you need to make sure to use the same password here. |
|
| The password of the user owning the system database schema. If you created the system database manually (see the preparations for System Database), then you need to make sure to use the same password here. |
|
| The PostgreSQL database administrator password. Only relevant when using PostgreSQL to store the system database. Required in order to have the system database automatically created when installing Usage Engine Private Edition. If you created the system database manually (see the preparations for System Database), then you do not need to set this at all. |
|
| The Oracle database administrator password. Only relevant when using Oracle to store the system database. Required in order to have the system database automatically created when installing Usage Engine Private Edition. If you created the system database manually (see the preparations for System Database), then you do not need to set this at all. |
|
| The SAP HANA database administrator password. Only relevant when using SAP HANA to store the system database. Required in order to have the system database automatically created when installing Usage Engine Private Edition. If you created the system database manually (see the preparations for System Database), then you do not need to set this at all. |
|
| The password of the |
|
| Keystore password. Used when installing Usage Engine Private Edition with TLS enabled. You need to make sure that this password matches how the certificate was set up when preparing for TLS. |
|
| Key password. Used when installing Usage Engine Private Edition with TLS enabled. You need to make sure that this password matches how the certificate was set up when preparing for TLS. |
This is an example of how to create and populate the secret with some credentials:
To inspect the content of the secret, simply execute the following command:
To retrieve a given credential in cleartext, simply execute a command like this (where “jdbcPassword” in the template parameter is the credential you would like to inspect):