Explore the Application Deployments Page

The Deployments page of an application enables you to redeploy the application, configure environment variables and service bindings, and view the deployment history.

The following table describes the key information that you’ll see on the application Deployments page.

Element Description

Deployments

Displays the following information about the deployed application:

  • Current version of the deployed application

  • Date-time stamp of the last deployment

  • Size of the archive file

  • Name of the archive file

  • Application source, the account that deployed the application

  • Commit ID, a string assigned in the manifest.json file when the application was packaged

  • Build number, a string assigned in the manifest.json file

  • Release notes, notes about the application when it was deployed

See Redeploy an Application.

Runtime

Displays the command that launches the application and the runtime version.

Topology

Displays the number of application instances and the amount of memory per instance in gigabytes.

Service Bindings

Lists other Oracle Cloud services to which your application connects. See Manage Service Bindings.

Environment Variables

Lists all environment variables available to the application. Click Hide System Variables to remove the system variables from the list. See Configure Environment Variables.

Deployment History

Lists the deployment history of the application.

To download the application manifest.json file or the deployment.json file, click Menu.

Redeploy an Application

If you’ve modified your application, then you can redeploy it from the Deployments page of the Application Console. This procedure assumes that the application has been deployed previously.

  1. Open the Service Console.
  2. In the Applications table, click the application name.
  3. In the left pane, click Deployments.
  4. Click Update.
  5. Click Browse to upload a new archive, manifest.json, or deployment.json file.
  6. Select the file and click Open.
  7. Edit the Launch Command, Version, Instances, or Memory (GB) values if necessary.
  8. Add service bindings or environment variables if necessary.
  9. Click Apply Edits to save the changes and restart the application.
  10. If prompted, select Rolling Restart or Concurrent Restart, then click Restart.

Manage Service Bindings

A service binding provides connectivity to other subscribed Oracle Cloud services.

Currently, 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. See the note after the steps for details.

  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.

Note:

The Username and Password aren’t automatically used to authenticate against the target service. The values are placed in the SERVICE_USER_NAME and SERVICE_USER_PASSWORD environment variables, which your application can access. If the target service requires authentication, then your application must handle it. If the target service doesn’t require authentication, then you can’t omit the user name and password for Oracle Java Cloud Service, Oracle Database Cloud Service, or Oracle MySQL Cloud Service, but you can specify any values. For Oracle Event Hub Cloud Service, the Username and Password fields are optional. For a cache service, the Username and Password fields are grayed out and aren’t used.

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 Configure Environment Variables.

Note:

The environment variables generated from an Oracle MySQL Cloud Service service binding are all uppercase, but are displayed in the console with mixed case. Ensure your code references the uppercase names.

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.

Configure Environment Variables

Environment variables provide details of the runtime environment for the application and are accessible to the running application.

Some predefined environment variables are available when you create an application. Creating service bindings for your application creates related environment variables. You can create additional environment variables, and manage all environment variables, from the Deployments page of the Application Console.

The following predefined environment variables are available when you create an application:

  • $HOSTNAME – The system generated host name for this application.

  • $PORT – The port that most application types should listen to for traffic from the load balancer.

  • $APP_HOME – The directory in which the deployed application archive file is extracted.

  • $ORA_APP_NAME – The name of the application, user-specified at creation time.

  • $ORA_APP_PUBLIC_URL – The public URL of the application.

  • $ORA_INSTANCE_NAME – The name of the specific application instance, such as web.1 or web.2.

  • $ORA_PORT – The same value as the $PORT environment variable. Your application can use either $PORT or $ORA_PORT to read the port.

If you’ve added a service binding to a subscribed Oracle Cloud service, more predefined environment variables are available, enabling the deployed application to interact with the Oracle Cloud service. See Manage Service Bindings.

Note:

The environment variables generated from an Oracle MySQL Cloud Service service binding are all uppercase, but are displayed in the console with mixed case. Ensure that your code references the uppercase names.

You can also define your own environment variables as key-value pairs in the Deployments page of the Application Console or in the deployment.json file. For details about the deployment.json file, see Creating Metadata Files in Developing for Oracle Application Container Cloud Service.

The best practice for connecting to a service with which you can’t use a service binding or a REST API is to create environment variables for the connection information. For example, to connect to a virtual machine (VM) in Oracle Cloud Infrastructure Compute Classic, create environment variables for the IP address and port of the VM.

An environment variable can reference other environment variables. For example, suppose you have a service binding and environment variables for a connection to an Oracle Database Cloud Service database but don’t want to use the default pluggable database (PDB). Suppose the service name for your PDB is MYPDB.identity-domain.oraclecloud.com. You can create your own connection descriptor in an environment variable named MYPDB_CONNECT_DESCRIPTOR that references the host name and port of the database but includes your PDB:

$DBAAS_LISTENER_HOST_NAME:$DBAAS_LISTENER_PORT/MYPDB.identity-domain.oraclecloud.com
To add an environment variable in the Deployments page of the Application Console:
  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 Environment Variables section of the Deployments page, click Add.
  5. In the Add Environment Variable dialog box, in the Name field, enter the variable name , in the Value field, enter a value. To mark the environment variable as secured, uncheck the Show check box. The value of the secure environment variables is hidden on the user interface.
  6. Click Save.
To edit a variable, click the Edit icon, edit the values in the Edit Environment Variable dialog, and click Save.

To delete a variable, click the Delete icon.

To apply the changes, click Apply Edits at the top of the page. Select Rolling Restart or Concurrent Restart, then click Restart.