Oracle Functions on an OCI Compute Instance
Set up, creation, and deployment

A. Set up your tenancy

1. Create groups and users

If suitable users and groups don't exist already, log in to the Console as a tenancy administrator and under Governance and Administration, go to Identity and then:

See documentation for more details.

2. Create compartment

If a suitable compartment in which to create network resources and Oracle Functions resources doesn't exist already, log in to the Console as a tenancy administrator and under Governance and Administration, go to Identity and then:

See documentation for more details.

3. Create VCN and subnets

If a suitable VCN in which to create network resources doesn't exist already, log in to the Console as a tenancy administrator and under Core Infrastructure, go to Networking and then:

See documentation for more details.

4. Create policy for group

Log in to the Console as a tenancy administrator and under Governance and Administration, go to Identity and click Policies and then:

See documentation for more details.

B. Set up an OCI compute instance

For some users, setting up a development environment on an Oracle Cloud Infrastructure compute instance will be more convenient than setting up a local machine.

When you set up an Oracle Cloud Infrastructure compute instance, you'll have to specify --provider oracle-ip when you create a new Fn CLI context later on. This 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 a compute instance, you must have permission to create dynamic groups.

1. Create instance and obtain OCID

Log in to the Console as a tenancy administrator and:

See documentation for more details.

2. Create a dynamic group

Create a new dynamic group to include the compute instance. Log in to the Console as a tenancy administrator and:

See documentation for more details.

3. Create policy for dynamic group

Create a policy to give the new dynamic group access to function resources, network resources, and Oracle Cloud Infrastructure Registry. Log in to the Console as a tenancy administrator and:

See documentation for more details.

C. Set up dev environment on the compute instance

1. Install and start Docker

Log in to your development environment as a functions developer and:

See documentation for more details.

2. Generate auth token

Log in to the Console as a functions developer and:

See documentation for more details.

3. Log in to Registry

Log in to your development environment as a functions developer and:

See documentation for more details.

4. Install Fn Project CLI

Log in to your development environment as a functions developer and:

See documentation for more details.

D. Set up Fn Project CLI on the compute instance

1. Set up Fn Project CLI context --provider oracle-ip

Log in to your OCI compute instance development environment as a functions developer and:

2. Complete Fn Project CLI context configuration

Log in to your development environment as a functions developer and:

You're now ready to start creating, deploying, and invoking functions.

See documentation for more details.

E. Create, deploy, and invoke your function

1. Create your first application

Log in to the Console as a functions developer and under Solutions and Platform, go to Developer Services and click Functions, and:

See documentation for more details.

2. Create your first function

Log in to your development environment as a functions developer and:

See documentation for more details.

3. Deploy your first function

Log in to your development environment as a functions developer and:

See documentation for more details.

4. Invoke your first function

Log in to your development environment as a functions developer and:

See documentation for more details.

5. Next steps

Now that you've created, deployed, and invoked a function, read the documentation to find out how to:


You're done!

Find out more about Oracle Cloud Infrastructure and Oracle Functions

Product Information

User Guide (HTML and PDF), docs.cloud.oracle.com, Fn Project

Attend Oracle Cloud Events

See events.oracle.com, blogs.oracle.com

Join the Community

See Customer Community, Forums

Follow Oracle Cloud

Facebook | Twitter | YouTube

About Oracle | Contact Us | Legal Notices | Terms of Use | Your Privacy Rights | Sustainability


Copyright © 2018, 2020, Oracle and/or its affiliates. All rights reserved.