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:

  1. 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.
  2. Click Settings the Gear icon.
  3. In the Software tab, select the Fn build executor template.
  4. Click Configure Configure.
  5. Click the Steps tab.
  6. From Add Step, select Fn, and then select the command:
    Use this option ... To ...
    Fn Version

    Log 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 Build

    Build 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 Push

    Push 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 Bump

    Bump the version of the func.yaml file.

    Specify the relative path of the working directory and the bump type (Major, Minor, or Patch). To display the command’s log in the build’s log, select the Verbose Output check box.

    Fn Deploy

    Deploy 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 OCI

    Augments 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 Guides for more information about these options.

  7. Click Save.