Oracle DB Services
Apcera provides the Oracle Service Gateway to integrate with Oracle Database 11g and later. You can use the Oracle Service Gateway to enable applications deployed to the Apcera Platform to access an Oracle database that is either internal or external to the Apcera environment.
The Oracle Service Gateway is provided as open source software available on GitHub: https://github.com/apcera/service-gateways/tree/master/oracle-service-gateway.
Oracle Service Gateway implementation
The Oracle Service Gateway implements the Apcera Service Gateway REST API. The Oracle Service Gateway is a stateless service gateway that does note require a persistent datastore to store its state. The service gateway performs the actions required to create and delete providers, services, and bindings. See persisting resource state for details on how the stateless API is called.
By default, the Provider creates a new Oracle DB tablespace for the Apcera provider. Once the provider is registered with Apcera, a service that is created for the provider uses that same tablespace and creates a user. Alternatively, you can update the Oracle Service Gateway so that the tablespace are created for each service.
In this implementation, Oracle Providers and Services require administrator credentials to create and delete users; tablespaces are optional. (See examples below.)
Deploying the Oracle Service Gateway
To create the Oracle Service Gateway, refer to the README for instructions on deploying the Oracle Service Gateway in your Apcera Platform, including requirements and installation.
Once you have defined the Oracle Service Gateway, you can use it to register an Oracle DB provider, create Oracle services, and bind applications running in the Apcera Platform to those services the same as any other service gateway type supported by Apcera. Instructions on how to do that are provided next.
Creating Oracle Services
Follow these steps to test your Oracle Service Gateway implementation by creating an Oracle provider and service, and binding an app to the service.
1) Obtain the connection string for your Oracle DB server.
You need the Oracle DB RFC 3986 compliant URL in the following format:
2) Register the Oracle DB provider using the Oracle Service Gateway.
$ apc provider register oracledb-provider --type oracle -- --url oracle://<sysuser>:<syspassword>@<hostname>[:port]/SID
Or, using tablespaces:
$ apc provider register oracledb-provider --type oracle -- --url oracle://<sysuser>:<syspassword>@<hostname>[:port]/SID --default-tablespace defaults --temporary-tablespace tempts
3) Create a Oracle service and bind an application to it.
$ apc service create oracledb --provider oracle-provider --job myapp