Run Fn Commands
Fn, or Fn Project, is an open-source, container-native, serverless platform for building, deploying, and scaling functions in multi-cloud environments. To run Fn commands when a build runs, you must have access to a Docker container that has a running Fn server.
For more information about Fn, see https://fnproject.io/.
Set Up a VM Build Executor and a Build Executor Template with Fn
Before you can create a build step that uses Fn commands, your organization administrator must create a build executor template that includes the Fn software and add a VM build executor that uses that build executor template. The build executor template can be created from scratch or software can be added to an existing build executor template.
Note: To find your organization administrator, click Contacts under your user profile. Your administrator, or a list of administrators, will display.
See Create and Manage Build Executor Templates in Administering Visual Builder Studio.
After your organization administrator adds a VM build executor to the build executor template, you can create and configure a job to use that buiold executor template and add Fn commands.
Configure a Job to Run Fn Commands
Here’s how you create and configure a job that runs Fn commands:
-
Open the job’s configuration page. If you’re creating a job, in Template in the New Job dialog, select the Fn build executor template. Proceed to step 4.
-
Click Settings
. -
In the Software tab, select the Fn build executor template.
-
Click Configure
. -
Click the Steps tab.
-
From Add Step, select Fn, and then select the command:
Use this option ... To ... Fn VersionLog the version of the Fn CLI being used and the version of the Fn Server referenced by the current context, if available, in the build log.
Fn BuildBuild a new function.
Specify the relative path of the working directory to build the function, Fn build arguments, Docker registry host, and its user name. If you don’t want to use the Docker registry’s cache, deselect the Use Docker Cache check box. To display the command’s log in the build log, select the Verbose Output check box.
Fn PushPush the image to the Docker registry.
Specify the relative path of the working directory, Docker registry host, and its user name. To display the command’s log in the build log, select the Verbose Output check box.
Fn BumpBump the version of the
func.yamlfile.Specify the relative path of the working directory and the bump type (
Major,Minor, orPatch). To display the command’s log in the build’s log, select the Verbose Output check box.Fn DeployDeploy functions to the function server. Using the deploy command, you can bump, build, push and update a function.
In Deploy to App, specify the Fn app name to deploy to. In other fields, specify the working directory, build arguments, Docker registry host, user name, API URL, and the Call URL. Select the desired check boxes, if necessary.
Fn OCIAugments the OCI configuration provided by the OCIcli builder with two additional parameters that are needed for Oracle Functions, the Oracle version of the open source Fn server. These required OCI parameters are the Oracle Compartment ID and the provider.
See Oracle Functions Quick Start Guidesfor more information about these options.
-
Click Save.