Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>OCI DevOps ToolsNew to Visual Studio Code? Get it now.
OCI DevOps Tools

OCI DevOps Tools

Preview

Oracle Labs

graalvm.org
|
92 installs
| (0) | Free
Oracle Cloud Infrastructure DevOps Tools
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

OCI DevOps Tools

Enables easy integration with the Oracle Cloud Infrastructure (OCI) DevOps service. The DevOps service can host your source code in the Oracle Cloud and build, then deploy, your projects in hosted CI/CD pipelines.

The extension creates a project in the DevOps service, sets up a source code repository, as well as build and deployment pipelines, enabling you to easily transition from local to cloud-based development and deployment.

Supported Projects and Platforms

Supported project types:

  • Maven & Gradle for following technologies:
    • Micronaut
    • Graal Cloud Native (OCI support required)
    • SpringBoot 3.0.5 (GraalVM Native Support dependency must be enabled in project)

Supported GraalVM versions:

  • GraalVM 22.x
  • GraalVM 23.0, Java 17

Automatic Proxy resolution in NetBeans Language Server

This extension uses Apache NetBeans Language Server and when running on GraalVM behind proxy it requires GraalVM JavaScript (Graal.JS) component installed to perform automatic proxy resolution. Either install Graal.JS using GraalVM VSCode extension or invoke gu install js for GraalVM used by VSCode.

See below for more info on Proxy setup.

Quickstart

If you are working with a Graal Cloud Native (or Spring Boot) project, the extension will set up build pipelines to build containers for your Java-based application and native executable. The extension will also create deployment pipelines that will deploy these containers to an OKE cluster.

If you have a standard Maven or Gradle project, you can still use this extension to build your JAR files in the cloud on the OCI DevOps service, but as of now deployment pipelines are not created.

For more information, see Graal Cloud Native and OCI DevOps service.

To get started, you will need:

  • To install the extension, you require
  • A Java installation (JDK 17+)
  • An Oracle Cloud account (a free account is OK)
  • A configured .oci/config file to access OCI services
  • An API Key
  • The OCI CLI
  • An OKE cluster. OKE is Oracle's managed Kubernetes service.

Having done the above, and with a Graal Cloud Native, or a Spring Boot, project, you can can now create an OCI DevOps project.

Create DevOps Project

  1. Open the OCI DEVOPS panel in VSCode Explorer and click the Create OCI DevOps Project button

    devops-ci-jobs.png

  2. You will be guided through the process of creating an OCI DevOps project:

    • If you are using mutiple OCI profiles, you will first be need to select the OCI profile that you wish to use

    • Select your comparment in OCI. Your DevOps project will be created here.

    • Confirm the DevOps project name. This must be unique to the tenancy.

    • Depending on your setup, you might be asked to:

      • Confirm the SSH keys for git operations and add the OCI DevOps git server to your SSH config and known_hosts file.

      • Select an existing OKE cluster on OCI, or create a new one using the OKE Quick Create action.

        oke_quick_create.png

    • When the new OKE cluster is created, configure local access to the OKE Kubernetes cluster using the VNC-Native Public Endpoint. This is done using the OCI CLI and you may have already done this in the prerequisite steps.

      set_oke_access.png

Once you create a DevOps project, the following build targets now become available from within VS Code:

devops-ci-jobs.png

You can run these build targets, which will run in the Cloud in the OCI DevOps service and not locally, by clicking on the triangle run icon.

Default Pipelines Setup

  • Build OCI Native Executable Container: Packages the application as a native executable in a container image.
  • Build OCI JVM Container: Packages the application as a JVM-based container image.

Once built, the container images can be pulled by clicking on the cloud icon, which provides the command required to pull the containers locally.

The build specification files for each pipeline are stored in .devops/. If you update the build specification file, commit and push the change to the DevOps-hosted repository, the build pipelines will be updated to reflect this change. It should be noted that the build pipelines run on custom sized build runners in order to ensure there is suffcient memory to build all native executables using GraalVM Native Image. These can be customised within the OCI Cloud Console.

OCI Kubernetes deployment with OKE

When the build pipeline succeeds, the container image can be deployed to OKE using Deploy OCI Native Executable Container to OKE deployment pipeline. When complete, the application can be tested in a browser by selecting the action Open in Browser for Deploy pipeline. This will set up port forwarding using your local kubectl.

Open OKE application in local browser

It will perform kubectl port forwarding from OKE to localhost as indicated by the VSCode status bar.

kubectl port forwarding active.

Project Dependencies Vulnerability Audits

The extension also performs project audits for vulnerabilities in third-party project libraries; supported project types are Maven and Gradle. Project Audits require an OCI account (.oci/config file) and uses OCI ADM Knowledgebase which retrieves data from the nvd.nist.gov database. Just select the Run Project Audit action in the Java Projects panel to check for vulnerabilities in an opened project. If a project contains a vulnerable dependency, it is shown in the PROBLEMS view.

Project Audits action and reported errors

When your project is moved into the DevOps service in the OCI Cloud, it is scanned for vulnerabilities by the Application Dependency Management service. The results of this audit can be displayed within the OCI DevOps Services panel by clicking on the plus icon and selecting Add Knowledge Base from the displayed menu.

Add Knowledge Base

Adding more OCI DevOps Services

The OCI DEVOPS SERVICES feature is not limited by the four jobs listed in the previous step. There are many more: You can add an existing build pipeline, a build artifact, a container registry, etc.

more-ci-jobs.png

Prerequisites

  • Extension Pack for Java Microsoft extension
  • Kubernetes Microsoft extension ​

Note: The extension depends on the Apache NetBeans Language Server, GraalVM Extension Pack for Java. (VS Code installs these required extensions for you.)

Proxy Setup

When working behind firewall over a proxy then VSCode Proxy has to be set ON. In VSCode Settings set Http: Proxy Support to ON. Subsequently when working without proxy set this OFF.

HTTP Proxy in VSCode

Many tools used to work on Java projects, such as Maven, Gradle, kubectl, and docker (if used), may require proxy configuration.

Provide Feedback or Seek Help

  • Request a feature
  • File a bug

Privacy Policy

Read the Oracle Privacy Policy to learn more.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft