8 Deploy and Manage Your Applications

By using an Oracle Deployment build step, you can deploy an application to an instance called a deployment target. You deploy extensions to Oracle Cloud Applications instances, visual applications to Visual Builder instances, or other build artifacts, like Java or Node.js applications, to instances running Oracle Java Cloud Service (JCS). You can enable continuous delivery, a method for automatically deploying a build artifact to the target service, by enabling the Auto Start functionality in a pipeline that contains a deployment build step.

Note:

Before you can publish an extension or visual application from the Designer, the pipeline's deployment job must be configured with user credentials that are authorized to deploy to the target Oracle Cloud Applications or Visual Builder instance. If your project owner hasn't provided these credentials, you'll be prompted for them each time you click Publish, and must enter them before you can continue.

If you don't know the credentials, you'll need to talk to your project owner or an administrator. Your administrator may choose to enter the credentials directly in the build jobs instead, so you aren't prompted for them each time the job runs.

See Configure the Deployment Job for extensions or Configure the Deployment Job for visual applications.

Application lifecycle operations for extensions and visual applications can be managed by using the options under their respective build step menus:

Some of these operations can also be managed from the activity menu in the Environments page's Deployments tab:

  • You can export data from, import data to, and undeploy a visual application that's deployed to your current identity domain's Visual Builder instance.

    However, if your visual application is in another identity domain, you'll need to create and use the Visual Application : Export Data, Visual Application : Import Data, or Visual Application : Undeploy build steps to undeploy to perform these operations.

  • You can delete an extension in an Oracle Cloud Applications instance in the current identity domain.

    However, if the extension is in another identity domain, you'll need to use an Application Extension : Delete build step to perform this operation.

Package, Deploy, and Manage Extensions

From the Steps tab on the job's configuration page, you can create an Application Extension Package job that packages an extension build artifact and an Application Extension Deploy job that deploys the build artifact to an Oracle Cloud Applications development instance, production instance, or any other instance. You can then add these jobs to a pipeline and run them in sequence.

Deployed extensions can be viewed from the Deployments tab on the Environments page and can be deleted manually from there too, if they are deployed to an Oracle Cloud Applications instance that is in the same identity domain as VB Studio. If an extension is deployed to an Oracle Cloud Applications instance that is in a different identity domain than VB Studio, you'll have to create and use an Application Extension build step to delete the deployed extension.

Deploy an Extension to a Oracle Cloud Applications Development Instance

When you create a project using the Application Extension template, several artifacts are created for you:

  • A Git repository that contains the extension's source code
  • A Development environment that points to the development instance where your base Oracle Cloud Application is running
  • Default build jobs that package and deploy the extension's artifact to Oracle Cloud Application's development instance
  • A pipeline to run the build sequence
  • Optionally, a private workspace in which you can edit the extension in the Designer

You'll need to do some configuration for the build steps before you can use them to deploy the extension's artifact to the Development environment. See Configure the Deployment Job for more information.

Deploy an Extension to an Oracle Cloud Applications Production Instance

If you want to deploy an extension to your Oracle Cloud Applications production instance, or any other instance, you'll need to set up separate packaging and deployment jobs for each — Visual Builder Studio does not create them for you. They're very similar to the default build jobs that are created from the Application Extension template. For these jobs, however, you'll also need to create a pipeline on your own to execute the build steps in sequence.

See Create and Configure Build Jobs for information about setting up these jobs for a production environment.

See Create and Configure a Pipeline for more information about setting up a pipeline.

View a Deployed Extension

After the deployment job runs successfully, you can view the deployed extension in the Environments page's Deployments tab:

  1. In the left navigator, click Environments Environments.
  2. Select the Oracle Cloud Application's environment.
  3. Click the Deployments tab.
  4. Click the Application Extensions toggle button.
  5. If the Oracle Cloud Application's access credentials have changed, provide the new credentials.
  6. Expand the base Oracle Cloud Application to view its deployed extensions.
    The Deployments tab shows two categories of extensions that were deployed to the Oracle Cloud Application's instance, older Application Extensions Classic extensions and newer Application Extensions extensions.

    For each Application Extensions extension, the page displays its name, description, version, and status. You can select the Show only active versions checkbox to hide inactive versions and/or the Show Previewed/Shared versions check box to display shared or previewed extensions. When you expand each deployed extension, you can see its dependencies, App UIs, the job that deployed it, and when it was published. Here's an example:

    Deployment tab showing two deployed Application Extension extensions
    For each Application Extensions Classic extension, the page displays its base application name and base URL. Expanded, it displays the extension ID, name, version, and status. If you want to see shared or previewed versions, select the Show Previewed/Shared versions check box. Here's an example:

To open the Oracle Cloud Application with the deployed Application Extensions Classic extension, copy the application's base URL and paste it into a web browser.

To open an app UI in a deployed Application Extensions extension, click the Open icon.

Delete an Extension

Deployed extensions can be deleted manually or by configuring a build step to delete it.

You can manually delete an app extension that's deployed to your development Oracle Cloud Applications instance (or one that's deployed to your current identity domain's Oracle Cloud Applications instance) from the Deployments tab of its environment, or configure a build job to delete it. See Delete an Extension Manually.

To delete an extension that's deployed to your production Oracle Cloud Applications instance (or one that's deployed to an Oracle Cloud Applications instance in another identity domain), configure a build job and run it. You can't delete it manually. See Configure a Job to Delete an Extension.

Delete an Extension Manually

From the Deployments tab of its environment, you can manually delete an extension that's deployed to your development Oracle Cloud Applications instance (or to your current identity domain's Oracle Cloud Applications instance):

  1. In the left navigator, click Environments Environments.
  2. Select the Development environment where the extension is deployed.
  3. Click the Deployments tab.
  4. Expand the base application's name.
  5. For the extension to delete, click Actions Three horizontal dots and select Delete.
  6. In the confirmation dialog box, click Delete.
Configure a Job to Delete an Extension
With the credentials of a user who can access the Oracle Cloud Applications instance where the extension is deployed, you can use a build job to delete an extension:
  1. In the left navigator, click Builds Builds.
  2. In the Jobs tab, click + Create Job.
  3. In the New Job dialog box, in Name, enter a unique name.
  4. In Description, enter the job's description.
  5. In Template, select the System Default OL7 for Visual Builder build executor template.
  6. Click Create.
    The Job Configuration page opens.
  7. Click the Steps tab.
  8. From Add Step, select Application Extension, and then select Delete.
  9. In Instance, select the Oracle Cloud Applications instance where the application is deployed.
  10. In Username and Password, enter the credentials of a user who can connect to the Oracle Cloud Applications instance.
  11. In Extension Manager Version, select Application Extensions for an Application Extensions application or select Application Extensions Classic for an Application Extension Classic application.
    You can find the Extension Manager version on the Deployments tab of the environment where the extension is deployed. The Application Extensions section lists deployments for the current project only, whereas the Application Extensions Classic section lists deployments for all projects associated with the environment. Optionally, you can use the Show Previewed/Shared versions checkbox to display extensions that were deployed through the Designer, not through a build step.
  12. If you selected Application Extensions Classic, enter the extension's base application, identifier (extension ID), and version in Base Application, Extension ID, and Version or, if you selected Application Extensions, enter the extension's identifier and version in Extension ID and Version.
    You can find the details on the Deployments tab of the environment where the extension is deployed.
  13. Click Save.
  14. To run a build, click Build Now.

Package, Deploy, and Manage Visual Applications

From the Steps tab on the job's configuration page, you can create a Visual Application Package job that packages a visual application build artifact and an Oracle Deployment job that deploys the build artifact to a Visual Builder development instance, production instance, or any other instance. You can then add these jobs to a pipeline and run them in sequence.

You can deploy a visual application to a standalone Visual Builder instance or to a Visual Builder instance that's part of Oracle Integration.

It’s important to keep these things in mind before you deploy a visual application to a Visual Builder instance:

  • The Visual Builder instance must be version 19.4.3.1, or later.
  • To ensure that business objects work properly, Visual Builder administrator must manually add the VB Studio hostname to the list of domains that are allowed access for each Visual Builder instance. See Allow Other Domains Access to Services in Administering Oracle Visual Builder.

Deployed visual applications can be viewed from the Deployments tab on the Environments page and can be undeployed manually from there too, if they are deployed to a Visual Builder instance that is in the same identity domain as VB Studio. If a visual application is deployed to a Visual Builder instance that is in a different identity domain than VB Studio, you'll have to create and use a Visual Application build step to undeploy the deployed visual application.

Deploy a Visual Application to a Development Visual Builder Instance

When you create a project using the Visual Application template, several artifacts are created for you

  • A Git repository that contains the visual application's source code.
  • A Development environment that points to the Visual Builder development instance.
  • Default build jobs that package and deploy the visual application's artifact to the Visual Builder development instance.
  • A pipeline to run the build sequence.
  • Optionally, a private workspace to edit the visual application in the VB Studio Designer.

You'll need to do some configuration for the build steps before you can use them to deploy the application's build artifact to the Development environment. See Configure the Packaging Job and Configure the Deployment Job for more information.

Deploy a Visual Application to a Test or Production Visual Builder Instance

If you want to deploy visual applications to your Visual Builder production instance, or any other instance, you'll need to set up separate packaging and deployment jobs for each. They're very similar to the default build jobs that are created from the Visual Application template. For these jobs, however, you'll also need to create a pipeline on your own to execute the build steps in sequence.

See Create and Configure Production Build Jobs for information about setting up these jobs for a production environment.

View a Deployed Visual Application

After the deployment job runs successfully, you can view the deployed application in the Deployments tab of the Environments page.

  1. In the left navigator, click Environments Environments.
  2. Select the Visual Builder environment.
  3. Click the Deployments tab.
  4. Click the Visual Applications toggle button.
  5. If the Visual Builder instance is from a different identity domain, provide its access credentials.
  6. Expand the app's name to see the deployed app's link.

    The Deployments tab displays the applications you've deployed from the current project. It doesn't show applications deployed by other users of the project, or applications deployed from other projects.

    For example:

    Tip:

    The Schema column lists the database schemas that store the deployed app's business objects. Hover over the text to see the full schema name in a tooltip or, to copy it, select the Copy to Clipboard icon the Copy icon), then paste it in a text editor of your choice.

    See View Database Schemas Used During an App's Lifecycle for more information.

Undeploy a Visual App

Deployed visual apps can be undeployed manually or by configuring a build step to undeploy it.

You can manually undeploy a visual app that's deployed to your development Visual Builder instance (or one that's deployed to your current identity domain's Visual Builder instance) from the Deployments tab of its environment, or configure a build job to undeploy it. See Undeploy a Visual App Manually.

To undeploy a visual app that's deployed to your production Visual Builder instance (or one that's deployed to a Visual Builder instance in another identity domain), configure a build job and run it. You can't undeploy it manually. See Configure a Job to Undeploy a Visual Application.

Undeploying an application is a permanent action that completely removes application metadata and any data stored in its database. This action can't be undone. Before you undeploy, consider the impact of removing your application, especially if the version is live, because once a version has been removed from the system, it can't be recovered.

The messaging you see in the dialogs that are displayed after you initiate an undeploy action emphasize the potential for serious unintended consequences:
  • For applications that are deployed with the version in the URL (staged applications), the undeploy confirmation dialog warns, "Are you sure you want to undeploy this application? You won't be able to restore it if you do."
  • For applications that are deployed without the version in the URL (live applications), the undeploy confirmation dialog warns, "Are you sure you want to undeploy this application that is being used by your customers? You won't be able to restore it if you do."

By default, the Yes, I'm sure checkbox is unchecked, Undeploy is grayed out (unavailable), and Cancel is active and in focus. Undeploy will only become active (available) after you opt in by selecting the Yes, I'm sure checkbox.

Undeploy a Visual App Manually

From the Deployments tab of its environment, you can manually undeploy a visual app that's deployed to your development Visual Builder instance (or to your current identity domain's Visual Builder instance):

  1. In the left navigator, click Environments Environments.
  2. Select the environment where the visual application is deployed.
  3. Click the Deployments tab.
  4. Expand the application.
  5. For the visual application to undeploy, click Actions Action Menu icon and select Undeploy.
  6. In the confirmation dialog box, click Undeploy.
Configure a Job to Undeploy a Visual Application
You'll need the credentials of a user who can access the Visual Builder instance where the visual application is deployed to undeploy a visual application through a build job:
  1. In the left navigator, click Builds Builds.
  2. In the Jobs tab, click + Create Job.
  3. In the New Job dialog box, in Name, enter a unique name.
  4. In Description, enter the job's description.
  5. In Template, select the System Default OL7 for Visual Builder template.
  6. Click Create.
  7. Click Configure the Tools icon.
  8. Click the Steps tab.
  9. From Add Step, select Visual Application, and then select Undeploy.
  10. In Instance, select the Visual Builder instance where the application is deployed.
  11. In Username and Password, enter the user's credentials who can connect and undeploy from the Visual Builder instance.
  12. In Application URL Root and Application Version, enter the visual application's root URL and its version.
    You can find the application's root URL and its version from the Deployments tab of the environment where the visual application is deployed.

    For example:

  13. Click Save.
  14. To run a build, click Build Now.

Lock, Unlock, or Roll Back a Deployed Visual Application

You can lock and unlock deployed visual applications, and the web applications that they contain, as well as roll back a deployed visual application. You would lock and unlock a visual application when you have maintenance tasks to complete and don’t want users to access the web application in the deployed visual application during the maintenance period.

These visual applications lifecycle operations (lock, unlock, roll back) can be managed manually from the Environments page through the Deployments tab or they can be managed with Visual Application build steps.

The Rollback menu option is available to use when you have deployed your visual application more than once without including the application version in the URL. That is, live appears in the application URL, rather than the application version. For example, if you've deployed two versions of your visual application to https://host/app-name/live/index.html, you can roll back to version 1 by using the Rollback menu option. You can only roll back one previous version.

If you deploy a visual application to a Visual Builder instance in the same identity domain as your VB Studio instance and you don't include the application version in the URL, you can perform this task from the Deployments tab of your Environments page.

Visual Applications Deployment Tab in Environments Page

Under the following conditions, you'll need to add and configure steps in a build job to lock, unlock, or roll back a visual application:

  • If you deployed your visual application to a different identity domain
  • If the URL includes the application version

After you create and configure the lifecycle management build steps, you may want to add them, in some combination, to the pipeline you created for the packaging and deployment steps for that testing or production instance. By integrating these build steps in your deployment process, you'll ensure a more robust and error-free process when upgrades are done through deployment.

Deploy Build Artifacts to Oracle Cloud Services

You can configure an Oracle Deploy build step to deploy your project's build artifacts like Java and Node.js applications to Oracle Cloud Services, including Oracle Java Cloud Service (JCS).

Before you can create a build step for deployment, you must first create an environment and then add the JCS instance to it. This instance will be used for your deployment target. If you don't add it in the Environments page, you won't be able to select it in the build step. See Set Up an Environment for information about creating an environment and adding instances to it.

Today, more and more customers are securing their resources and Oracle Cloud Services, such as JCS, behind private VCNs. If you already run Oracle Cloud services in your private VCN and plan to use VB Studio to deploy to those services, you should configure your private VCN so your services and these VMs are in the same VCN. VM build executors need to access VB Studio and VB Studio needs to access the VM build executors. That access is done through a public subnet that needs to be configured. See Allow VM Build Executors to Access A Private Subnet's Resources.

You can either add a build step that deploys the build artifact(s) to the job that creates and packages the artifact(s) or you can create a separate job for each task. If you use separate jobs, you can create a pipeline that begins with a job that builds and packages the application, followed by a job that deploys the build artifact(s) to the desired target environment. Using pipelines allows you the flexibility to add testing and other tasks to the flow.

Deploy an Application to JCS

You can create a job that copies build artifacts generated by another job and deploys those artifacts to a JCS target instance:

  1. In the left navigator, click Builds Builds.
  2. In the Jobs tab, click + Create Job.
  3. In the New Job dialog box, in Name, enter a unique name.
  4. In Description, enter the job's description.
  5. In Template, select the build executor template.
  6. Click Create.
  7. In the Job Configuration page, in the Before Build tab, select Copy Artifacts from the Add Before Build Action dropdown.
  8. Select the job that produces the artifact from the From job dropdown and the last successful build from the Which build dropdown, then click Save.
  9. In the Steps tab, click the Add Step dropdown and select Oracle Deployment.
  10. In the Target Instance dropdown, select the JCS instance where you want to deploy the application.
    If you don't see the instance that you want to deploy to, you'll need to go to the Environments page and define a new instance. After you do that, it will show up as a target in the dropdown.
  11. In the Deploy to Java dialog, select the desired Oracle Weblogic Server 12 version (12.2.x or higher, or 12.1.x), then enter the HTTPS port number, username, and password.
    The only supported protocol for JCS deployments is the Oracle WebLogic RESTful Management Interface protocol using REST APIs.
  12. Click Find Targets and select the server you want to deploy to from the list of available servers or clusters.
  13. Click OK.
  14. In the Build Artifact field, enter the path to the artifact that you want to deploy.
  15. In the Application Name field, enter the name that will be used by the target JCS service to identify your application.
  16. Select the Deploy as shared library checkbox to deploy the artifact directly to the JCS server as a shared library or leave it unchecked (default).
    When the artifact is deployed directly to a JCS server, any application can reference the resources in that deployed shared library.
  17. Click Save.
  18. To run the job, from the Builds page, click Build Now and the job will execute, first copying the artifact, then deploying it to the selected JCS target instance.
At this point, you probably want to create a pipeline that flows a series of jobs that builds and packages the artifact, then retrieves it and deploys it to the desired JCS server in the target instance.
Access a Deployed Application

You can access an application deployed to an Oracle Cloud service from the console of that target service. Here are some ways to get the deployed application’s URL. You'll need to enter your identity domain name and your credentials, if you’re prompted to do so.

The Deployments tab on the Environments page shows deployed extensions and deployed visual applications. The Application Extensions Classic category shows deployments for all projects associated with this environment; the Application Extensions category shows deployments for the current project. Visual Applications also show deployments only for the current project.
Action How To

Create the application’s URL that’s deployed to JCS

  1. Use the JCS View a Service Instance API to get the Content URL and examine the response body output to find the content_url.

    Example:

    curl -i -X GET -u jdoe@example.com:my_password -H "X-ID-TENANT-NAME:exampleidentitydomain" https://jaas.oraclecloud.com/jaas/api/v1.1/instances/exampleidentitydomain/exampleservice

    For more information about the REST API, see XREST API for Oracle Java Cloud Service.

    You have to use basic authentication to call the REST API. You can use cURL or a browser REST add-on, such as Postman for Google Chrome, to make this call.

  2. Get the context root of the application from the application.xml deployment descriptor for EAR deployments or from the web.xml deployment descriptor for WAR deployments.

    If there is no such descriptor, you’ll need to get the context root from the WebLogic Console.

    1. Open the WebLogic Console of the JCS instance. You can access the console from the Java Service link of the JCS deployment configuration.

    2. Click Deployments in the Domain Structure pane.

    3. Click the deployed application name in the Deployments table.

    4. In the Overview tab, copy the value displayed by Context Root.

    Note that the <host>:<port> referenced in the WebLogic Console is local to the JCS instance, so you’ll need the externally available IP address or the host name of the JCS instance VM to access the deployed application.

  3. Join the content URL and the context root of the application to construct the application URL.

    For example, if the content URL is http://129.130.131.132 and the context root is /deploy4214351085908057349, the application’s URL would be http://129.130.131.132/deploy4214351085908057349.

For more information, see Accessing an Application Deployed to an Oracle Java Cloud Service Instance in Administering Oracle Java Cloud Service.

Manage Oracle Cloud Service Deployments

By using the Oracle Java Cloud Service console, you can start and stop a deployment, redeploy an application, or undeploy a deployment.

Action How To

Start or stop the application

Open and use the target service’s console to start or stop the deployed application on the target service.

Redeploy the application

If you’ve made changes to the source code or the build generated a new artifact, you can rerun the deploy build step to redeploy the application to the target service.

View logged deployment information

In the build log, locate and view the deployment section.

Undeploy a deployed application

Open and use the target service’s console to stop and then undeploy the deployed application on the target service.