- Confluence will trigger when a page has been edited, a HTTP request will be send to API Gateway/OCI Functions
- OCI Functions will either write to OCI Streaming/Data Prepper/OCI OCI OpenSearch or directly apply logic
Steps
- Create an API Gateway and deployment
- Create Automation rule in Confluence using the API Gateway endpoint
- Create OCI OpenSearch Clusters. Set up embedding model, conversation history, GenAI connection Use: https://github.com/bobpeulen/oci_opensearch/blob/main/oci_opensearch_rag_auto.ipynb
- Create OCI Functions deployment
- Create an API Gateway and deployment with PUT/POST. In this example, we use "confluence" and "updatepage" as paths.
- This example used no authentication, but you might add.
-
Add the API Gateway deployment full path in rule
{ "page_id":"{{pageidsmart}}", "page_url":"{{pageurlsmart}}" }
- Create an OCI OpenSearch cluster
- Create a OCI Data Science notebook in same VCN, private subnet + NAT gateway
- Follow these steps: https://github.com/bobpeulen/oci_opensearch/blob/main/oci_opensearch_rag_auto.ipynb
-
Create repo/project and log in Docker
docker login -u '[namespace]/OracleIdentityCloudService/[email protected]' iad.ocir.io password = Auth token
-
Create function
fn init --runtime python confluencex cd confluencex
-
Change the func.py and requirements.txt
-
Test function. Deploy and invoke function. Default values should be printed (in logs) and returned.
fn -v deploy --app app_bp fn invoke app_bp confluencex