Updating an Application
Find out how to update applications with OCI Functions.
Having previously created an application in OCI Functions, you can change some, but not all, of the application's details. For example, you can change the application's signature verification policy.
For more information about applications, see Applications.
- Sign in to the Console as a functions developer.
- Open the navigation menu and select Developer Services. Under Functions, select Applications.
- Select the region you're using with OCI Functions.
We recommend that you use the same region as the Docker registry that's specified in the Fn Project CLI context. See Creating an Fn Project CLI Context to Connect to Oracle Cloud Infrastructure.
-
Select the compartment specified in the Fn Project CLI context. See Creating an Fn Project CLI Context to Connect to Oracle Cloud Infrastructure.
The Applications page shows the applications defined in the compartment.
-
Select the name of the application that you want to update.
- Update some or all the following details:
- Network security groups: See Adding Applications to Network Security Groups (NSGs)
- Configuration: See Passing Custom Configuration Parameters to Functions.
- Signature verification: See Signing Function Images and Enforcing the Use of Signed Images from Registry.
- Logs: See Storing and Viewing Function Logs.
- Traces: See Distributed Tracing for Functions.
Using the Fn Project CLI
Tip
From time to time, new versions of the Fn Project CLI are released. We recommend you regularly check that the latest version is installed. For more information, see Steps to upgrade the Fn Project CLI.To use the Fn Project CLI to update an existing application in the OCI Functions server:
-
Log in to your development environment as a functions developer.
-
In a terminal window, update properties of an existing application by entering:
fn update app <app-name> --<property> <value>
where:
<app-name>
is the name of the existing application you want to update.--<property> <value>
is the property you want to update, and the new value you want it to have. Enterfn update app --help
to see a list of properties and valid values.
For example:
fn update app acmeapp --syslog-url tcp://my.papertrail.com:4242
The properties of the existing application are updated with the values you specified.
-
Verify that the application has been updated by entering:
fn inspect app <app-name>
For example:
fn inspect app acme-app
Output:
{ "annotations": { "oracle.com/oci/compartmentId": "ocid1.compartment.oc1..aaaaaaaaw______nyq", "oracle.com/oci/subnetIds": [ "ocid1.subnet.oc1.iad.aaaaaaaa7______5qa" ] }, "created_at": "2020-02-18T11:53:07.375Z", "id": "ocid1.fnapp.oc1.iad.aaaaaaaaaf______r3ca", "name": "acme-app", "syslog_url": "tcp://my.papertrail.com:4242", "updated_at": "2020-03-25T10:13:32.163Z" }
Using the OCI CLI
Use the oci fn application update command and required parameters to update an application:
oci fn application update --application-id <application-ocid> [OPTIONS]
For a complete list of flags and variable options for OCI CLI commands, see the Command Line Reference.
-
Run the UpdateApplication API operation to update applications.