Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 1. 3scale system image with Oracle Database
By default, Red Hat 3scale API Management 2.6 has a component called system that stores configuration data in a MySQL database. You have the option to override the default database and store your information in an external Oracle Database. Follow the steps in this document to build a custom system container image with your own Oracle Database client binaries and deploy 3scale to OpenShift.
1.1. Before you begin Copier lienLien copié sur presse-papiers!
1.1.1. Obtaining Oracle software components Copier lienLien copié sur presse-papiers!
Before you can build the custom 3scale system container image, you must acquire a supported version of the following Oracle software components:
- Oracle Instant Client Package Basic or Basic Light
- Oracle Instant Client Package SDK
- Oracle Instant Client Package ODBC
1.1.2. Prerequisites Copier lienLien copié sur presse-papiers!
- Supported version of Oracle Database accessible from your OpenShift cluster
- Access to the Oracle Database system user for installation procedures
-
The 3scale 2.6
amp.ymltemplate
1.2. Preparing Oracle Database Copier lienLien copié sur presse-papiers!
Create a new database.
The following settings are required for the Oracle Database to work with 3scale:
ALTER SYSTEM SET max_string_size=extended SCOPE=SPFILE; ALTER SYSTEM SET compatible='12.2.0.1' SCOPE=SPFILE;Collect the database details.
Get the following information that will be needed for 3scale configuration:
- Oracle Database URL
- Oracle Database service name
Oracle Database system password
The
DATABASE_URLparameter must follow this format:
oracle-enhanced://USER:PASSWORD@HOST:PORT/DATABASE
Example
DATABASE_URL="oracle-enhanced://USER:PASSWORD@my-oracle-database.com:1521/threescalepdb"
Additional resources
For information on creating a new database in Oracle Database, see the Oracle documentation.
1.3. Building the system image Copier lienLien copié sur presse-papiers!
After you download the system Oracle build.yml file, you will have to manually change the AMP_RELEASE value from 2.5.0 to 2.6.0.
This section provides steps to build the system image.
Prerequisites
- The Oracle Database must be configured. For more details, follow the steps in Section 1.2, “Preparing Oracle Database”.
Procedure
Clone the 3scale OpenShift Templates GitHub repository. Use the following command:
$ git clone --branch 2.6.0.GA https://github.com/3scale/3scale-amp-openshift-templates.git-
Place your Oracle Database Instant Client Package files into the
3scale-amp-openshift-templates/amp/system-oracle/oracle-client-filesdirectory. - Download the 3scale 2.6 amp.yml template.
Run the
oc new-appcommand with the-foption and specify thebuild.ymlOpenShift template:$ oc new-app -f build.ymlRun the
oc new-appcommand with the-foption to indicate theamp.ymlOpenShift template, and the-poption to specify theWILDCARD_DOMAINparameter with the domain of your OpenShift cluster:$ oc new-app -f amp.yml -p WILDCARD_DOMAIN=mydomain.comEnter the following
oc patchcommands, replacingSYSTEM_PASSWORDwith the Oracle Databasesystempassword you set up in Section 1.2, “Preparing Oracle Database”:$ oc patch dc/system-app -p '[{"op": "add", "path": "/spec/strategy/rollingParams/pre/execNewPod/env/-", "value": {"name": "ORACLE_SYSTEM_PASSWORD", "value": "SYSTEM_PASSWORD"}}]' --type=json $ oc patch dc/system-app -p '{"spec": {"strategy": {"rollingParams": {"post":{"execNewPod": {"env": [{"name": "ORACLE_SYSTEM_PASSWORD", "value": "SYSTEM_PASSWORD"}]}}}}}}'Enter the following command, replacing
DATABASE_URLto point to your Oracle Database, specified in Section 1.2, “Preparing Oracle Database”:$ oc patch secret/system-database -p '{"stringData": {"URL": "DATABASE_URL"}}'Link the pull secret to the builder with the following command:
$ oc secrets link builder threescale-registry-authEnter the
oc start-buildcommand to build the new system image:$ oc start-build 3scale-amp-system-oracle --from-dir=.
Additional resources
- For more information about 3scale and Oracle Database support, see Red Hat 3scale API Management Supported Configurations.