X

The Visual Builder Cloud Service Blog

Automating CI/CD for Oracle Cloud Functions with Visual Builder Studio

Shay Shmeltzer
Director of Product Management - Oracle

Serverless computing is one of the more attractive aspects offered by cloud platform - letting you focus on coding functionality and letting the provider take care of providing dynamically scaling platform to run your code. Oracle is offering the Oracle Cloud Functions Service as a platform for hosting serverless functions. Oracle Functions is based on the Fn Project - an open source, container native solution for writing functions that supports a variety of languages (including Java, go, ruby, node, python, and more) . In this blog we'll highlight some of the capabilities that are built into Oracle Visual Builder Studio to help you manage the development cycle for such functions and to automate continuous deployment to the Oracle cloud platform.

The video demo below focuses on the code management and CI/CD automation functionality. For code management we use the Git repositories in Visual Builder Studio. For CI/CD automation VB Studio offers Fn specific build steps as well as integration with the Oracle infrastructure environment:

In this blog we won't cover the basics of setting up a functions environment in the Oracle Cloud - for that we would recommend following the getting started with functions tutorials.

Setting Up CI/CD Environment for Functions

In our build job we use three steps to configure our build and deployment environment.

The first one is a Docker Login step - in our example we hook up to the Oracle Container Registry. To do that you just need to provide the url for your registry region.oicr.io and your user/pass. (Note that if you wish to use other docker registries you can connect to them instead).

Then we setup the environment for OCIcli command to work in using the OCIcli step. The information you require for this can mostly be found through your OCI tenancy and user information. More info on where you can locate the specific value for each of the fields is in our doc.

The third configuration is specific for the fn context used in OCI using the Fn OCI step. The information for this section can be found on the getting started tab of the specific app you created in the functions area in your Oracle Cloud environment.

Environment configuration steps

In order to run these create a build VM that adds the Docker, OCIcli, and Fn software to the default VM template - info here.

Fn Build Steps

Depending on your goals you can choose the appropriate Fn step from the set of built-in steps offered by VB Studio - these map to the regular fn command lines and provide easier way to customize the activities.

Function Build Steps

In the demo we are using an Fn Build step to create the function, then an Fn Push to publish the function into the Oracle containers registry, and finally an Fn Deploy to deploy the function into an application in the Oracle Cloud Function service.

 

Fn Build and Push

Fn Deploy

And Much More

As the demo shows, you can easily hook up your build to your Git repository so changes in code will trigger a build process. Also note that your build can run unit test on your functions, and even check for vulnerabilities in third party libraries you might be using.

In addition don't forget that Visual Builder Studio also provides you with a full team management platform for tracking issues, managing development sprints, and sharing information through wikis.

The combination of Visual Builder Studio and Oracle Cloud Functions gives your team a perfect platform for cloud-native serverless development.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.