Using Service Bindings in Oracle Application Container Cloud Service

You can use Oracle Application Container Cloud Service to run any server-side applications that store the application state information on an external data-store such as Oracle MySQL Cloud Service, Oracle Data Hub Cloud Service, and Oracle Database Cloud Service. Such applications are typically referred as cloud-native 12-factor applications. For more information, see 12-factor applications.

A service binding provides connectivity to other subscribed Oracle Cloud services. You can use a service binding to connect from Oracle Application Container Cloud Service to Oracle Database Cloud Service, Oracle MySQL Cloud Service, Oracle Java Cloud Service, Oracle Event Hub Cloud Service, Oracle Data Hub Cloud Service, or an application cache.

To add a service binding:

  1. Open the Service Console.
  2. In the Applications table, click the application name.
  3. In the Application Console, click the Deployments page.
  4. In the Service Bindings section of the Deployments page, click Add.
  5. In the Add Service Binding dialog box, specify these values:
    Service Type
    Type of the service: Oracle Java Cloud Service, Oracle Database Cloud Service, Oracle MySQL Cloud Service, Oracle Event Hub Cloud Service, Oracle Data Hub Cloud Service, or caching service. For Oracle Event Hub Cloud Service, specify OEHCS to publish or subscribe to a topic or OHEPCS to access a cluster at the platform level.
    Service Name
    Name of the service, the name of an Oracle Java Cloud Service instance, Oracle Database Cloud Service database, Oracle MySQL Cloud Service database, Oracle Event Hub Cloud Service topic or cluster, Oracle Data Hub Cloud Service instance, or cache service.
    Username
    User name used to access the service. See the note after the steps for details.
    Password
    Password for the user name.
  6. Click Save.
  7. To apply the changes, click Apply Edits at the top of the page. If prompted, select Rolling Restart or Concurrent Restart, then click Apply.

The service binding is added to the list and its environment variables are automatically added to the Environment Variables list. For Oracle Java Cloud Service, these variables have names beginning with the prefix JAAS_. For Oracle Database Cloud Service, the prefix is DBAAS_. For Oracle MySQL Cloud Service, the prefix is MYSQLCS_. For Oracle Event Hub Cloud Service, the prefix is OEHCS_ or OEHPCS_. For Oracle Data Hub Cloud Service, the prefix is DHCS_. For a cache service, there is one variable, named CACHING_INTERNAL_CACHE_URL. See Configuring Environment Variables.

To edit a service binding, click the Edit icon, edit the values in the Service Binding — Edit dialog box, and click Save. To delete a service binding, click the Delete icon.

As an alternative, you can define service bindings in the deployment.json file. See Creating Metadata Files in Developing for Oracle Application Container Cloud Service.

See Service Bindings in Developing for Oracle Application Container Cloud Service.