Skip to content

Commit a78cc42

Browse files
committed
README fixes afternoon
1 parent 343d341 commit a78cc42

File tree

8 files changed

+58
-364
lines changed

8 files changed

+58
-364
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This repository provides examples demonstrating how to use Oracle Functions.
1919
| Create an object in OCI Object Storage |[sample](./oci-objectstorage-put-object-python)|[sample](./oci-objectstorage-put-object-java)|
2020
| Create a PAR in OCI Object Storage |[sample](./oci-objectstorage-create-par-python)||
2121
| Display an OCI Cloud Event |[sample](./oci-event-display-python)|
22-
| Invoke another Function by Id |[sample](./oci-invoke-function-python)|[sample](./oci-invoke-function-byid-java)|
22+
| Invoke another Function |[sample](./oci-invoke-function-python)| |
2323
| Run a SQL statement against Autonomous DB using ORDS | [sample](.oci-adb-ords-runsql-python) |
2424
| Run a SQL statement against Autonomous DB using DB Client |[sample](./oci-adb-client-runsql-python)||
2525
| Publish a notification using ONS |[sample](./oci-ons-publish-python)|

oci-event-display-python/README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,49 @@ This function logs the details of a Cloud event.
55
As you make your way through this tutorial, look out for this icon ![user input icon](./images/userinput.png).
66
Whenever you see it, it's time for you to perform an action.
77

8-
## Pre-requisites
9-
1. Start by making sure all of your policies are correct from this [guide](https://docs.cloud.oracle.com/iaas/Content/Functions/Tasks/functionscreatingpolicies.htm?tocpath=Services%7CFunctions%7CPreparing%20for%20Oracle%20Functions%7CConfiguring%20Your%20Tenancy%20for%20Function%20Development%7C_____4)
108

11-
2. Have [Fn CLI setup with Oracle Functions](https://docs.cloud.oracle.com/iaas/Content/Functions/Tasks/functionsconfiguringclient.htm?tocpath=Services%7CFunctions%7CPreparing%20for%20Oracle%20Functions%7CConfiguring%20Your%20Client%20Environment%20for%20Function%20Development%7C_____0)
9+
## Prerequisites
10+
Before you deploy this sample function, make sure you have run step A, B and C of the [Oracle Functions Quick Start Guide for Cloud Shell](https://www.oracle.com/webfolder/technetwork/tutorials/infographics/oci_functions_cloudshell_quickview/functions_quickview_top/functions_quickview/index.html)
11+
* A - Set up your tenancy
12+
* B - Create application
13+
* C - Set up your Cloud Shell dev environment
1214

13-
## Create an Application to run your function
14-
You can use an application already created or create a new one as follow:
15-
![user input icon](./images/userinput.png)
15+
16+
## List Applications
17+
Assuming your have successfully completed the prerequisites, you should see your
18+
application in the list of applications.
1619
```
17-
fn create app <app-name> --annotation oracle.com/oci/subnetIds='["<subnet-ocid>"]'
20+
fn ls apps
1821
```
19-
Get the OCID of the subnet in your VCN you wish to use.
2022

21-
e.g.
23+
24+
## Create or Update your Dynamic Group
25+
In order to use other OCI Services, your function must be part of a dynamic group. For information on how to create a dynamic group, refer to the [documentation](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingdynamicgroups.htm#To).
26+
27+
When specifying the *Matching Rules*, we suggest matching all functions in a compartment with:
2228
```
23-
fn create app myapp --annotation oracle.com/oci/subnetIds='["ocid1.subnet.oc1.phx.aaaaaaaacnh..."]'
29+
ALL {resource.type = 'fnfunc', resource.compartment.id = 'ocid1.compartment.oc1..aaaaaxxxxx'}
2430
```
31+
Please check the [Accessing Other Oracle Cloud Infrastructure Resources from Running Functions](https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionsaccessingociresources.htm) for other *Matching Rules* options.
2532

26-
Running this function without access to the logs will have a limited value, we recommend configuring the application logs to go to Papertrail. Refer to [syslog-setup](https://orahub.oraclecorp.com/oracle-functions-samples/syslog-setup).
2733

2834
## Review and customize your function
2935
Review the following files in the current folder:
3036
* the code of the function, [func.py](./func.py)
3137
* its dependencies, [requirements.txt](./requirements.txt)
3238
* the function metadata, [func.yaml](./func.yaml)
3339

40+
3441
## Deploy the function
42+
In Cloud Shell, run the *fn deploy* command to build the function and its dependencies as a Docker image,
43+
push the image to OCIR, and deploy the function to Oracle Functions in your application.
44+
3545
![user input icon](./images/userinput.png)
3646
```
37-
fn -v deploy --app <your app name>
38-
```
39-
e.g.
40-
```
41-
fn -v deploy --app myapp
47+
fn -v deploy --app <app-name>
4248
```
4349

50+
4451
## Create the Cloud Event rule
4552
Create a Cloud Event rule on the console navigating to Application Integration > Event Service. Click *Create Rule*.
4653

oci-event-display-python/func.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
schema_version: 20180708
22
name: oci-event-display-python
3-
version: 0.0.2
3+
version: 0.0.1
44
runtime: python
55
entrypoint: /python/bin/fdk /function/func.py handler
66
memory: 256

oci-invoke-function-byid-java/README.md

Lines changed: 0 additions & 169 deletions
This file was deleted.

oci-invoke-function-byid-java/pom.xml

Lines changed: 0 additions & 71 deletions
This file was deleted.

oci-invoke-function-byid-java/src/main/java/com/example/fn/InvokeById.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)