Chapter 1. Service Registry Operator quickstart You can quickly install the Service Registry Operator on the command line by using Custom Resource Definitions (CRDs). The quickstart example deploys your Service Registry instance with storage in an SQL database: Section 1.1, "Quickstart Service Registry Operator installation" Section 1.2, "Quickstart Service Registry instance deployment" Note The recommended installation option for production environments is the OpenShift OperatorHub. The recommended storage option is an SQL database for performance, stability, and data management. 1.1. Quickstart Service Registry Operator installation You can quickly install and deploy the Service Registry Operator on the command line, without the Operator Lifecycle Manager, by using a downloaded set of installation files and example CRDs. Prerequisites You are logged in to an OpenShift cluster with administrator access. You have the OpenShift oc command-line client installed. For more details, see the OpenShift CLI documentation . Procedure Browse to Red Hat Software Downloads , select the product version, and download the examples in the Service Registry CRDs .zip file. Extract the downloaded CRDs .zip file and change to the apicurio-registry-install-examples directory. Create an OpenShift project for the Service Registry Operator installation, for example: export NAMESPACE="apicurio-registry" oc new-project "USDNAMESPACE" Enter the following command to apply the example CRD in the install/install.yaml file: cat install/install.yaml | sed "s/apicurio-registry-operator-namespace/USDNAMESPACE/g" | oc apply -f - Enter oc get deployment to check the readiness of the Service Registry Operator. For example, the output should be as follows: NAME READY UP-TO-DATE AVAILABLE AGE apicurio-registry-operator 1/1 1 1 XmYs 1.2. Quickstart Service Registry instance deployment To create your Service Registry instance deployment, use the SQL database storage option to connect to an existing PostgreSQL database. Prerequisites Ensure that the Service Registry Operator is installed. You have a PostgreSQL database that is reachable from your OpenShift cluster. Procedure Open the examples/apicurioregistry_sql_cr.yaml file in an editor and view the ApicurioRegistry custom resource (CR): Example CR for SQL storage apiVersion: registry.apicur.io/v1 kind: ApicurioRegistry metadata: name: example-apicurioregistry-sql spec: configuration: persistence: "sql" sql: dataSource: url: "jdbc:postgresql://<service name>.<namespace>.svc:5432/<database name>" userName: "postgres" password: "<password>" # Optional In the dataSource section, replace the example settings with your database connection details. For example: dataSource: url: "jdbc:postgresql://postgresql.apicurio-registry.svc:5432/registry" userName: "pgadmin" password: "pgpass" Enter the following commands to apply the updated ApicurioRegistry CR in the namespace with the Service Registry Operator, and wait for the Service Registry instance to deploy: oc project "USDNAMESPACE" oc apply -f ./examples/apicurioregistry_sql_cr.yaml Enter oc get deployment to check the readiness of the Service Registry instance. For example, the output should be as follows: NAME READY UP-TO-DATE AVAILABLE AGE example-apicurioregistry-sql-deployment 1/1 1 1 XmYs Enter oc get routes to get the HOST/PORT URL to launch the Service Registry web console in your browser. For example: example-apicurioregistry-sql.apicurio-registry.router-default.apps.mycluster.myorg.mycompany.com

Commands:
export NAMESPACE="apicurio-registry" new-project "USDNAMESPACE"
cat install/install.yaml | sed "s/apicurio-registry-operator-namespace/USDNAMESPACE/g" | oc apply -f -
NAME READY UP-TO-DATE AVAILABLE AGE apicurio-registry-operator 1/1 1 1 XmYs
apiVersion: registry.apicur.io/v1 kind: ApicurioRegistry metadata: name: example-apicurioregistry-sql spec: configuration: persistence: "sql" sql: dataSource: url: "jdbc:postgresql://<service name>.<namespace>.svc:5432/<database name>" userName: "postgres" password: "<password>" # Optional
dataSource: url: "jdbc:postgresql://postgresql.apicurio-registry.svc:5432/registry" userName: "pgadmin" password: "pgpass"
project "USDNAMESPACE" apply -f ./examples/apicurioregistry_sql_cr.yaml
NAME READY UP-TO-DATE AVAILABLE AGE example-apicurioregistry-sql-deployment 1/1 1 1 XmYs
example-apicurioregistry-sql.apicurio-registry.router-default.apps.mycluster.myorg.mycompany.com