Configuring Your Client Environment for Function Development

Before you can start using Oracle Functions to create and deploy functions, you have to set up your client environment for function development. Note that prior to setting up your client environment, you must already have set up your tenancy (see Configuring Your Tenancy for Function Development).

Different Options for Function Development Environments

When setting up your Oracle Functions development environment, you have different options:

  • Option 1: Setting up Cloud Shell. (Recommended) For users trying out Oracle Functions for the first time, this is the recommended way to get started quickly. By copying and pasting a few commands from the Console into the Cloud Shell window, you can set up an Oracle Functions development environment in just a few minutes.

    This option enables you to experiment creating, deploying, and invoking new functions. You can also explore Oracle Functions using the samples on Git Hub (see Oracle Functions Samples). If you want to set up Cloud Shell as your Oracle Functions development environment, see the instructions in the Oracle Functions on Cloud Shell Quick Start Guide.

  • Option 2: Setting up a local machine. For most users (especially Mac and Linux users), this will be the way to work with Oracle Functions. If you set up a local machine, you'll have to specify --provider oracle when you create a new Fn Project CLI context.

    This option enables Oracle Functions to perform authentication and authorization using Oracle Cloud Infrastructure request signing, private keys, user groups, and policies that grant permissions to those user groups.

    This documentation assumes you want to set up a local machine as your client environment, and provides instructions accordingly (see Setting up a Local Machine as a Development Environment). Instructions for setting up a local machine are also included in the Oracle Functions in a Local Dev Environment Quick Start Guide.

  • Option 3: Setting up an Oracle Cloud Infrastructure compute instance. For some users, this will be more convenient than setting up a local machine. If you set up an Oracle Cloud Infrastructure compute instance, you'll have to specify --provider oracle-ip when you create a new Fn Project CLI context.

    This option enables Oracle Functions to perform authentication and authorization using instance OCIDs, dynamic groups, and policies granting permissions to those dynamic groups. This approach removes the requirement for users to manage private keys. Note that to set up an Oracle Functions development environment on an Oracle Cloud Infrastructure compute instance, you must:

    • have permission to create dynamic groups
    • create a new dynamic group that includes the compute instance's OCID
    • create a policy to give the new dynamic group access to function resources, network resources, and Oracle Cloud Infrastructure Registry
    • specify --provider oracle-ip when you create a new Fn Project CLI context

    If you want to set up an Oracle Cloud Infrastructure compute instance as your Oracle Functions development environment, see the instructions in the Oracle Functions on an OCI Compute Instance Quick Start Guide.

Setting up a Local Machine as a Development Environment

To set up a local machine as your client environment for function development, you have to complete the following tasks in the order shown in this checklist:

Click each of the links in the checklist in turn, and follow the instructions.

When you have completed all of the development environment configuration tasks, confirm your configuration is correct (see Verifying Your Configuration for Function Development).