Set Up VB Studio for Developing Visual Applications
This chapter tells you how to set up Oracle Visual Builder Studio (VB Studio) so that your users can create visual applications.
A visual application is a responsive web or native mobile application developed using VB Studio's browser-based development environment. You deploy a visual application to a Visual Builder instance or to a Visual Builder instance available in Oracle Integration. The Visual Builder instance must be version 19.4.3.1, or later.
Set Up Visual Builder Studio for Visual Applications
Here’s a summary of how to set up VB Studio for developing visual applications:
To perform this action: | See this: | Why do I need to perform this action? |
---|---|---|
1. Get access to Visual Builder instances. | Get Access to Visual Builder Instances | To deploy an app, your users need credentials that allow them to access the Visual Builder instance (deployment target). If an instance isn't available for them, you must create it. |
2. Get the required IDCS roles assigned to you. | Get the Required IDCS Roles | To create and set up the VB Studio instance, you must be assigned some specific IDCS roles. |
3 (Optional) Configure VB Studio to run build jobs and pipelines. | Configure VB Studio to Use the Free VM Executor for Build Jobs and Pipelines | To run build jobs and pipelines, you must configure VB Studio to connect to an OCI account or the built-in free account. |
If you're developing a visual application using an instance of VB Studio that was provisioned in your Oracle Cloud Applications account, follow the procedures in Create and Set Up a Project for Development (Different Identity Domain).
Get Access to Visual Builder Instances
You can deploy a visual application to a standalone Visual Builder instance or to a Visual Builder instance that's part of Oracle Integration. You cannot deploy to Visual Builder Studio itself.
- Create a Visual Builder Service
Instance.
To create an instance, you'll need the IDCS VISUALBUILDER_ENTITLEMENT_ADMINISTRATOR service role.
- Add an IDCS User to Your Cloud Account and assign the user a Visual Builder role to connect and deploy applications.
- Access Instance Settings
- Configure Security Options for Applications
- Set Page Messages for Access Denied Errors
- Allow Other Domains Access to Services
- Switch to Your Own Oracle DB Instance
- Reset an Expired Password or ATP Wallet for Your Oracle DB Instance
- Manage Self-signed Certificates
- Configure Support for a Custom Domain
- The Visual Builder instance must be version 19.4.3.1 or later.
- To ensure that business objects work properly, your Visual Builder administrator must manually add the VB Studio hostname to the allow list for each Visual Builder instance. For more information, see Add an Allowed Origins Domain.
- If you need to create a VB Studio instance to deploy to, create it in the same Oracle Cloud account and identity domain as the Visual Builder Studio instance you are developing the visual application with. When you need to deploy your app for testing or to go live, you'll need to create instances for those environments using working credentials in different identity domains. You are using VBS to develop the appSee Create the VB Studio Instance.
- Follow your organization's guidelines to create and set up Visual
Builder instances for deployment targets. Your guidelines may suggest that you
create instances for different deployment environments, such as development,
integration, test, pre-stage, stage, pre-production, and production. You can
create these instances in different identity domains or in a common identity
domain.
This documentation assumes that you have created and set up Visual Builder instances you can deploy to in your development and production environments, where each instance is in a different identity domain.
To deploy your visual application to Visual Builder development and production instances, you'll need credentials to access them. You'll be prompted for these credentials when you set up the instances or when you perform a manual deployment to those instances.
Get the Required IDCS Roles
Make sure that you have the necessary identity domain roles you'll need to set up VB Studio on an OCI tenancy:
You must be assigned this role: | To ... |
---|---|
Identity Domain Administrator or User Administrator | Add users and assign IDCS roles. |
DCS_INSTANCE_ENTITLEMENT_ADMINISTRATOR | Create the VB Studio instance. |
DEVELOPER_ADMINISTRATOR | Set up VB Studio. After you're assigned the role, you're considered VB Studio's Organization Administrator. |
OCI_Administrator (OCI Administrator) | Set up OCI compartments and buckets, which are required to set up the VB Studio build system. |
Set Up the VB Studio Project
After setting up VB Studio, follow these steps to create and set up a project for developing your visual applications.
To perform this action: | See this: | Why do I need to perform this action? |
---|---|---|
1. Create a project for visual applications and set up the project for development. | Create and Set up a Project | To develop a visual application, you must create a VB Studio project and set up the project for your developers. |
2. Add users to the project. | Add Users to the Project | To allow your team members to access the visual application project, invite them to join the project. |
3. (Optional) Configure advanced settings. | Optional Configuration | These settings are optional, depending on your configuration. |
4. Developers can now create visual applications. | Develop Your Application | This is the main development stage for your visual app. |
Create and Set up a Project
A project gathers all the resources you need for developing software—in this case, visual applications. After you create the project, you must set it up.
The procedures that you use to create and set up the project depend on whether your Visual Builder instance is in the same identity domain as your VB Studio instance or in a different domain.
- If the Visual Builder instance is in a different identity domain than the VB Studio instance, see Create and Set Up a Project for Development (Different Identity Domain).
- If the Visual Builder instance is in the same identity domain as the VB Studio instance, see Create and Set Up the Project for Development (Same Identity Domain).
Create and Set Up a Project for Development (Different Identity Domain)
To develop visual applications using a VB Studio instance that's in a different identity domain than your Visual Builder instance (for example, a VB Studio instance provisioned in your Oracle Cloud Application account), you'll need to add a Visual Builder instance to your VB Studio project.
Follow these steps to create and set up the project, configure the deployment job, and add users to the project:
Create and Set Up the Project for Development (Same Identity Domain)
To develop visual applications using a VB Studio instance that's in the same identity domain as your Visual Builder instance, you'll first need to first create a project based on the Visual Application template, then make a few configuration settings in the project so that it's ready for developing visual applications.
Here's a summary of how to create and set up a VB Studio project for development:
To perform this action: | See this: |
---|---|
1. Create a project. | Create a Project |
2. Configure the deployment job.
By default, the deployment job doesn't have credentials to connect to the target development instance, so you must specify them manually. |
Configure the Deployment Job |
3. Verify your credentials by running the development pipeline. | Run the Pipeline Manually |
4. View the deployed visual applications. | View the Deployed Visual Application |
5. Add team members to the project. | Add Users to the Project |
Create a Project
If you're developing a visual application using a VB Studio instance that's in the same identity domain as your Visual Builder instance, you'll need to base your project on the Visual Application project template.
When you create a project using the Visual Application template, these artifacts are created for you:
- A Git repository, which contains the visual application's source code.
To see the Git repository's files, go to the Project Home page, click the Repositories tab, then click the Git repository name:
- A Development environment pointing to the Visual Builder development instance.
In the navigation menu, click Environments
to see the Development environment:
- Build jobs that package and deploy the visual application's artifact to the Visual Builder development instance.
By default, Visual-Application-Package and Visual-Application-Deploy jobs are created for you. The Visual-Application-Package job generates the visual application's artifact file. The Visual-Application-Deploy job deploys the visual application's artifact file to the Visual Builder development instance.
In the navigation menu, click Builds
and then click the Jobs tab to see the build jobs:
To run builds of the package and deploy jobs, you must first allocate VM build executors and make the appropriate deployment configurations. Without the appropriate configuration or VM executors, the builds won't run.
- A pipeline to run the build jobs in a sequence.
In the navigation menu, click Builds
and then click the Pipelines tab. In the pipeline's row, click the Actions
menu and select View Layout.
- A private workspace to edit the visual application in the VB Studio Designer.
In the navigation menu, click Workspaces
to see the workspace:
- By default, the project uses the organization's default markup language. Your project's users use the markup language to format wiki pages and comments. If required, you can change the project's markup language from the Project Administration page. See Change a Project’s Wiki Markup Language.
- A VM executor is created if this project is VB Studio's first project and no build VM executors had existed when you created the project. The VM executor uses the System Default OL7 for Visual Builder
build executor template. You can use this VM executor to run build jobs that reference the System Default OL7 for Visual
Builder template in the current project and other projects as
well. See VM Build Executors for more information about VM executors and build executor
templates.
In the navigation menu, click Organization
and then click the VM Build Executors tab to see the VM executor.
Configure the Deployment Job
The deployment job deploys the visual application's build artifact to your Visual Builder development instance. In the job, specify the application's version and profile, and the credentials required to connect and deploy build artifact to your Visual Builder development instance.
Run the Pipeline Manually
The development build pipeline runs automatically when a commit is pushed to the Git repository's branch specified in the packaging job.
- In the
navigation menu, click
Builds
.
- Click the Pipelines tab.
- In development pipeline's row, click the Actions
menu and select Run Pipeline.
To monitor the pipeline and see each job's status, click the pipeline's name. To see a job's build log, click the job's name and click View Log.
If you want to run a job's build manually, open the job's details page and click Build Now. You can monitor its build on the job's details page.Add Users to the Project
You must explicitly add users before they can work within a project, as explained in this table:
If you want to: | Do this: |
---|---|
Add a user to the project |
|
Add a group to a project |
|
Add multiple users or groups to the project |
|
Change a user’s or a group's project membership |
To change a user’s or a group's project membership,
click the Change Membership icon |
Remove a user or a group from the project |
Before removing a user, change the ownership of any assigned issues and merge requests to another user. For the user or the group you to remove, click
Remove
|
Optional Configuration
After setting up the project, you can follow these optional steps to configure some advanced settings in your project. You can perform these steps at any time during your development cycle.
To perform this action: | See this: |
---|---|
Add more VM executors or executor
templates.
By default, VB Studio is connected to its built-in free account and uses one free VM build executor with fixed software packages in the executor template. If you want to add more VM executors or customize executor template's software packages, configure VB Studio to connect to your OCI account. |
Add More VM Build Executors or Build Executor Templates |
Configure the packaging job to change the visual application's archive file names.
By default, the packaging job
generates two archive files: |
Step 7 in Configure the Packaging Job |
Protect the Git repository's main
branch for unapproved code updates.
By default, a branch
is accessible to all project users and anyone can make changes to
its files. To restrict changes and push commits to the
|
Set Merge Restrictions on the main Branch |
Add More VM Build Executors or Build Executor Templates
If you want to add more VMs to reduce the wait time for your organization's members or create custom VM templates, or use advanced features for VMs (such as use your own VCN or use a different VM shape), you should configure VB Studio to connect to your own OCI account.
- Set up your OCI account and get the required input
values.
See Set Up the OCI Account and Get the Required OCI Input Values.
- In the
navigation menu, click
Organization
.
- Click Connect OCI Account.
- Enter the required details and click Validate.
- After successful validation, click Save.
The executor template and the free VM build executor of your built-in free account migrate to the OCI account.
To create custom executor templates, see Create and Manage Build Executor Templates. Remember to add Node.js 16 (or a higher version) to the VM template. Node.js 16 is the minimum version required for packaging visual applications.
To add more VM executors:
Configure the Packaging Job
From the source files in the Git repository's main
branch, the packaging job generates two archive files: a source archive file that contains
the visual application's source files and a build artifact archive file.
- In the Jobs tab, click the deployment job.
- Click Configure.
- Click Configure
.
- Click the Steps tab and navigate to the Oracle Deployment section.
- In File names, select Use custom file names.
- In Sources and Build Artifact, enter the same file names (with path) you specified in the packaging job.
- Click Save.
Develop Your Application
Now that you've set up VB Studio and created a visual application project and added users to it, guide your organization members who develop visual applications to these documents to learn more about VB Studio.
- Build Web and Mobile Applications with VB Studio in Building Web and Mobile Applications with Visual Builder Studio describes how to create, edit and publish visual applications.
-
Get Started in Using Visual Builder Studio is a good resource, as it explains how to manage a project, create and manage issues and Agile boards, review source code with merge requests, and more.
Set Up Additional Deployment Instances
If you want to deploy a visual application to additional Visual Builder instances (for example, a production or QA instance), you must create a separate VB Studio environment and add the instance to it. You can add only one Visual Builder instance to an environment.
After you add a Visual Builder instance to an environment, the Service
Instances tab displays a tile that shows basic information, such as
status and response time, about the instance. Click
Details to see additional information (Visual Builder
release version, Service URI, etc.) or click the Home Page link to visit its home
page URL.
When you add a Visual Builder instance (a service instance or an IDCS resource) to an environment, VB Studio creates an IDCS Application (also known as a Client Application) in the background. The IDCS Application generates an OAuth token to access the newly added Visual Builder instance and handles authentication when VB Studio tries to access the target instance. Provisioning the IDCS Application takes a few seconds to complete after VB Studio adds the Visual Builder instance to an environment.
If the newly added instance stays in the Unknown status for some time, it usually indicates that the IDCS Application provisioning may have failed. VB Studio added the Visual Builder instance but can't access it. In such a case, click Actions and select Remove to delete the Visual Builder instance from the environment, and then click Add to add it again.
Set Up the Project to Deploy for Production
After your development and test cycles are complete, you may want to configure the project to build and deploy visual applications to the Visual Builder production instance.
Before you proceed, contact the Visual Builder administrator and make sure that the Visual Builder production instance is properly configured and running. For example, make sure that the production instance's security options are configured and the instance points to the correct database.
Here's a summary of how to set up the VB Studio project for deployment:
To perform this action: | See this: |
---|---|
1. In the VB Studio project, create an environment for the Visual Builder production instance. The Visual Builder production instance usually resides in another identity domain. | Set Up Additional Deployment Instances |
2. Create a production branch from the
main branch. Use this branch to push your
application to production.
|
Create a Production Branch |
3. Create the production packaging and deployment build jobs, and set up the pipeline. | Create and Configure Production Build Jobs |
4. (Optional) Restrict users who can edit the production jobs or run their builds. | Configure a Job's Privacy Setting |
Before you run production jobs, make sure that all code changes have been pushed to the production branch and there are no open merge requests.
Create a Production Branch
Follow your organization's guidelines to create a branch and protect it from unverified changes. To protect the branch, you can set merge restrictions, make the branch private and restrict who can push commits to it, or freeze it.
- In the
navigation menu, click
Git
.
- Click the Refs view
and then click Branches
.
- From the Repositories drop-down list, select the repository.
- Click + Create Branch.
- In the New Branch dialog box, in Name, enter the branch name.
From the Base drop-down list, select the
main
branch as the base branch. - Click Create.
Create and Configure Production Build Jobs
You need to set up some packaging and deployment jobs before you can deploy visual applications to your Visual Builder production instance. This topic explains how to do that.
Before you configure production build jobs, make a note of these:
- In the production packaging job, use the Git repository's production branch to generate production artifacts.
- In the development packaging job, if you changed the default file names of archive artifact files, get the new names and their paths. You'll need them when you configure the production packaging job.
- If you configured the development packaging job to overwrite the
application's version defined in
visual-application.json
, get the new version. You'll need it when you configure the production packaging job. - While configuring deployment build jobs, you specify whether to include the application's version in its URL. A visual application without the version in its URL is called a Live application. Usually, you deploy a live application to a production instance.
- If you deploy a version of a visual application that's never been deployed, VB Studio overwrites the last deployed version with the new version.
VB Studio doesn't undeploy the previously deployed version from the production instance. It continues to remain on the target instance, but is inaccessible.
- If you want to redeploy a live application or a previously deployed version, undeploy it first, else the deploy build fails. To undeploy a previously deployed visual application version, configure a undeploy build job and run it. You can't undeploy it manually from the Environments page.
- If you've created an application profile for production, get its name. You'll need it when you configure the production deployment job.
Create a Production Packaging Build Job
The production packaging job generates a visual application artifact that's ready to deploy.
Create a Production Deployment Build Job
The production deployment job deploys the visual application's artifact that was generated in the production packaging job to the Visual Builder production instance. Before you create the job, get the access credentials of a user who can connect and deploy to the Visual Builder production instance.
Configure a Production Job's Privacy Setting
Mark a job as private to restrict who can see or edit a job's configuration, or run its build.
A private job shows a Lock
icon in the jobs list on the right side of the Job Protection page, in the
Jobs tab of the Builds page, and in the pipelines.
Create and Configure a Pipeline
To ensure the production deployment job runs automatically after the production packaging job, create a pipeline and set the dependency.
Run the Pipeline
When you're ready to deploy the visual application to the production instance, run the production pipeline.
- In the
navigation menu, click
Builds
.
- Click the Pipelines tab.
- In development pipeline's row, click the Actions
menu and select Run Pipeline.
After a successful build, you'll find the deployed application's link in the Deployments tab of the Environments page.
To view the latest build log of a job, open the Builds page, click the job's name, and then click Build Log.
Undeploy a Visual Application
If you want to undeploy a visual application that's deployed to Visual Builder, you can do so manually or through a job configuration.
You can undeploy a visual application manually if it is deployed to a Visual Builder instance that's in the same identity domain as VB Studio. If the visual application is deployed to a Visual Builder instance in a different identity domain than VB Studio (such as your production instance) or the Visual Builder instance was added to an environment through credentials, you should configure a build job to undeploy it.
Undeploy a Visual Application Manually
You can undeploy a visual application that's deployed to your current identity domain's Visual Builder manually from the Deployments tab of its environment.
If your visual application is deployed to an identity domain that's different than your VB Studio instance, you'll need to follow the instructions in Configure a Build Job to Undeploy a Visual Application to undeploy the application.
- In the
navigation menu, click
Environments
.
- Select the environment where the visual application is deployed.
- Click the Deployments tab.
- Expand the application.
- For the visual application to undeploy, click Actions
and select Undeploy.
- If the visual application is a live application (without the version number in the URL), select the Yes, I'm sure check box.
- Click Undeploy.
Configure a Build Job to Undeploy a Visual Application
[2020-01-01 12:00:00] === Begin VB App Ops Undeploy Application===
[2020-01-01 12:00:00] Application employee-manager-visual-web-app/0.1 has been undeployed
[2020-01-01 12:00:00] === End VB App Ops Undeploy Application ===
Executor log size 364 B (364)
[2020-01-01 12:00:02]
[2020-01-01 12:00:02] Build completed.
[2020-01-01 12:00:02] Status: DONE Result: SUCCESSFUL Duration: 7.0 sec