FlexDeploy and Oracle APEX

FlexDeploy is a DevOps platform for CI/CD with out of box support Oracle APEX build & deploy automation. Oracle Application Express (APEX) is a common low code development framework, which is also used to develop extensions for Oracle E-Business Suite.

This FlexDeploy Loves APEX Blog Series will help you understand what makes FlexDeploy a perfect choice to implement DevOps and Continuous Delivery with Oracle APEX.  Here is a summary of FlexDeploy Loves APEX Blog Series:

In this blog article, we will discuss using FlexDeploy to export APEX application from the development environment and promote automatically to other environments like Test, QA, Production, etc.

APEX Application

In this approach, we will source the APEX application from the development environment. APEX development happens in a browser against the development environment, so there is nothing else needed by the developer at this point.

Configuration Steps

FlexDeploy configurations (step #2 below) is a one-time activity, and it does not require any scripting. We recommend the use of FlexDeploy Blueprints for faster setup.

  1. Install SQLcl on FlexDeploy server
  2. Configure FlexDeploy (workflows, topology, project, etc.)

You can download Build APEX and Deploy APEX workflow files for reference. FlexDeploy Blueprints will create these workflows automatically. Note that workflows are precisely the same as if you were maintaining application files in SCM.

Build workflow will export applications in split format and produce zip artifact. FlexDeploy will store build artifact in the artifact repository. Exported application has many files and folders with individual pages and components in separate files. In this build, there is no compilation or validation.

Deploy workflow is a single plugin operation to perform deployment of the APEX application in the target environment. This workflow handles deploying either the entire application or some set of page/component files. Artifacts captured during build execution will be used during deploy execution. When requesting deployment, the user will select an application version and target environment.

Now we need to define Topology for your APEX environments. First, we will create an Instance using the name of APEX Workspace and associate it with various environments (Dev, QA, Production) and workflows (Build APEX, Deploy APEX). Here is what the Instance will look like for APEX. FlexDeploy instance is a logical setup that maps to various environments and is assigned workflows that will execute against it.

Now we can provide configuration details for each circle in the matrix below. FlexDeploy plugin will use configuration values defined for each environment. The colored circle will change to indicate whether it is configured fully, partially, or not at all configured.

Each environment will have different properties and endpoints. Here are some property value details which is self-explanatory.

  • Oracle SQLcl Home – path where SQLcl is installed. You will need to install SQLcl on endpoint that is selected for execution.
  • Oracle Database URL – JDBC URL to connect to APEX server. Endpoint must be able to connect to this URL.
  • APEX User – Parsing schema, APEX_xxxxxx or System user that has security to install and export APEX applications.
  • APEX Password – Password for APEX User.

FlexDeploy uses SQLcl to import application files. You can install it on the FlexDeploy server, in which case we will remotely install all applications (using Localhost endpoint). You can also use SSH endpoints, but we will leave that for more advanced talk.

Now that we have the Topology configured, we can create a FlexDeploy project for each APEX application. The project needs to be configured with various details about application, but no SCM configurations are needed in this case.

We will use None as SCM Type as application is sourced from the Development environment. Workflows and Instances created previously are configured here as well. Every FlexDeploy project has a Stream, in this case it is called main.

Now let’s configure properties at the project level, which is what differentiates one application from other.

  • Application ID or Name – Id or Name of application as seen on Application Builder.
  • Workspace Name – Workspace where application will be deployed. Use uppercase name.
  • Parsing Schema – Parsing (owner) schema for application. Can be left empty if same in all environments as it will be part of exported application as default.
  • Various Export Options – Similar to what you see on App Builder when you export application, configure as necessary.

Build and Deploy

Now we are ready to execute build and deploy. Builds can be started either 1) Manually, 2) REST API, 3) CI Triggers, 4) Release and Pipelines. We recommend use of Release and Pipelines as that allows you to deploy your APEX application with other supporting objects (packages, tables, sequences etc.)

After successful execution of build workflow, FlexDeploy will store artifacts in its artifact repository with unique version. You can deploy specific version to any environment. In this example, we have selected to build All Files, but you can always build even single page which can be deployed to target environments.

Now let’s deploy the version that was just exported from Development environment to Test environment as shown below. You can request a deployment manually as shown below or you can use other automated approaches to deploy a specific version. Note that approvals, schedules, and notifications are all available as they are part of FlexDeploy platform.

Once deployment is complete, you can see the status of deployment on project activity page. For more details including individual page level deployment details you can use various reports.

You can use test automation to run automated tests against a deployed application. Use test results to decide if the application is ready to be promoted to next environment. utPLSQL is a popular tool for such test automation. All of these are options available for any type of project in FlexDeploy.

You just saw how you can configure an APEX project in FlexDeploy, and automatically promote an APEX application from Development to various environments. You can now just copy this FlexDeploy project and adjust various properties to match another APEX application.

In next post, I will show you how to export an APEX applications from development environment and commit to SCM.

< Previous Post

Next Post >

Download the Datasheet

Chandresh Patel

I have been working with Java EE technologies since 2000. After implementing IBM WebSphere and custom framework solutions, my past 10 years have been focused on Oracle Fusion Middleware such as WebLogic, ADF, WebCenter and Coherence. I have been part of many automation projects in the past and have a passion for automation capabilities to help our customers deliver software faster and with higher quality. In my current role as a Principal Architect at Flexagon, I am driving the FlexDeploy product strategy and development to build DevOps/CI/CD features that help our customers.

More posts by Chandresh Patel
    

Leave a Reply

Your email address will not be published. Required fields are marked *