Wednesday, January 13, 2021

Install Fn Project CLI for Oracle Cloud Infrastructure Compute Instance

5:28 AM Posted by Dilli Raj Maharjan No comments


    The Fn project is an open-source container-native serverless platform that you can run anywhere, any cloud or on-premise. It’s easy to use, supports every programming language, and is extensible and performant. Fn is an event-driven, open source, Functions-as-a-Service (FaaS) compute platform that you can run anywhere. 

During installation of fn project cli for Oracle Cloud Infrastructure docker, oci-cli should be installed and configured. Following are the step by step guide to install fn project cli in OCI compute instance.

Create Compute instance from OCI Console.


Click on Navigation menu, click on Compute and click on Instances.



Click on Create Instance button in the Instance page.


Provide the name of Instance.



Select required Operating system. In my case I have select Oracle Linux 8.



Provide SSH Public keys. I have provided 2 public key to connect the instance from. Finally click on Create to create instance.



Once instance is created login to the instance via ssh as user opc.



Install docker and git redhat packages. 


For Linux 7:
sudo yum -y install docker git


For Linux 8:
sudo yum -y install git

Install yum utilities.
sudo yum -y install yum-utils




Add Linux 8 yum docker repo.
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo



Execute install docker redhat packages.
sudo yum install docker-ce docker-ce-cli containerd.io



Once docker is installed, enable docker at startup and start docker services.
systemctl stop docker
systemctl start docker


Intall fn project cli


Install fn project with command below. Click here if you want more in fn cli installation. 
curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh


Once fn project is installed, install and configure oci-cli with command below. Click here if you need more info in oci-cli installation and setup.
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"


Generate an API Signing Key


An API Signing key should be generated and uploaded or pasted an API Key in console. Click here to learn more about creating API signing key and uploading. In my case I have already generated and uploaded signing key.



Setup oci-cli

Collect OCI informations as tenancy_ocid, user_ocid, FINGERPRINT etc prior to setup oci.


Setup oci-cli with command below. Provide appropriate information.

oci setup config


0 comments:

Post a Comment