Configuring Apicurio Studio storage
This chapter explains how to configure the available Apicurio Studio storage options:
Apicurio Studio storage options
The main decision to make when deploying Apicurio Studio is which storage backend to use.
The following storage options are available:
Storage option | Description |
---|---|
In-memory |
Data is stored in RAM on each Apicurio Studio node. This is the easiest deployment to use, but is not recommended for production environment. All data is lost when restarting Apicurio Studio with this storage option, which is suitable for a development environment only. |
SQL database |
Data is stored in a relational database, in this case PostgreSQL 12+. This is the recommended storage option in a production environment for performance, stability, and data management (backup/restore, and so on). |
Configuring Apicurio Studio In-Memory storage using CLI
The in-memory storage option uses RAM to store the data on nodes where Apicurio Studio is deployed, and it is the simplest persistence option to use.
-
You must have a Kubernetes cluster with cluster administrator access.
-
TODO
This persistence option does not support data distribution across Apicurio Studio nodes.
Therefore, it is only recommended for development environments using a single replica (Pod ).
|
Configuring SQL (PostgreSQL) storage
-
You must have a Kubernetes cluster with cluster administrator access.
-
You have a PostgreSQL database reachable from your Kubernetes cluster.
-
In the Kubernetes web console, log in with cluster administrator privileges.
-
Change to the Kubernetes namespace in which Apicurio Studio and your PostgreSQL Operator are installed.
-
TODO
Installing PostgreSQL database storage using OpenShift OperatorHub
One of the available storage options requires that you provide connection information to a PostgreSQL database. You can use any PostgreSQL database available on your OpenShift cluster, but it is recommended to use OperatorHub to choose and install an Operator that can manage a PostgreSQL database for you.
You can install your preferred PostgresQL Operator, but this section shows how to install the PostgreSQL Operator by Dev4Ddevs.com and create a new database for Apicurio Registry.
-
You must have cluster administrator access to an OpenShift cluster.
-
In the OpenShift Container container-platform web console, log in using an account with cluster administrator privileges.
-
Change to the OpenShift project in which Apicurio Studio is installed. For example, from the Project drop-down, select
my-project
. -
In the left navigation menu, click Operators > OperatorHub.
-
In the Filter by keyword text box, enter
PostgreSQL
to find an Operator suitable for your environment, for example, PostgreSQL Operator by Dev4Ddevs.com or Crunchy PostgreSQL for OpenShift. -
Read the information about the Operator, and click Install. This displays the Create Operator Subscription page.
-
Select your subscription settings, for example:
-
Installation Mode: Select one of the following:
-
All namespaces on the cluster (default)
-
A specific namespace on the cluster and then my-project
-
-
Update Channel > stable
-
Approval Strategy: Select Automatic or Manual
-
-
Click Subscribe. This displays the Operators > Installed Operators page.
-
Wait a few moments until the Status for the PostgreSQL Operator displays Succeeded and the subscription is Up to Date.
You must read the documentation from your chosen PostgreSQL Operator for details on how to create and manage your database. -
Create a PostgreSQL database for your Apicurio Studio storage. For example, click Installed Operators > PostgreSQL Operator by Dev4Ddevs.com > Create database > YAML.
-
Edit the database settings as follows:
-
name
: Change the value tostudio
-
image
: Change the value tocentos/postgresql-10-centos7
-
-
Edit any other database settings as needed depending on your environment, for example:
apiVersion: postgresql.dev4devs.com/v1alpha1 kind: Database metadata: name: studio namespace: my-project spec: databaseCpu: 30m databaseCpuLimit: 60m databaseMemoryLimit: 512Mi databaseMemoryRequest: 128Mi databaseName: example databaseNameKeyEnvVar: POSTGRESQL_DATABASE databasePassword: postgres databasePasswordKeyEnvVar: POSTGRESQL_PASSWORD databaseStorageRequest: 1Gi databaseUser: postgres databaseUserKeyEnvVar: POSTGRESQL_USER image: centos/postgresql-10-centos7 size: 1
-
Click Create Database, and wait until the database is created.