Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oci py example #176

Open
wants to merge 2 commits into
base: oci-py-example
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions python/cloud/oracle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ fn --verbose deploy --app oci

Update your local env with the following [script](oci-instances-func/setup_local.sh).

Run the following command to configure OCI_PRIVATE_KEY_BASE64:
```bash
fn config fn [INPUT_APP_NAME] [INPUT_FUNCTION_NAME] OCI_PRIVATE_KEY_BASE64 $(cat ~/.oci/[INPUT_PRIVATE_KEY_FILE_NAME] | base64)
```

Updating configuration:
```bash
fn config fn oci list-instances OCI_USER ${OCI_USER}
Expand Down
1 change: 0 additions & 1 deletion python/cloud/oracle/oci-instances-func/setup_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export OCI_USER=`cat ~/.oci/config | grep user | awk '{split($0,array,"=")} END{
export OCI_TENANCY=`cat ~/.oci/config | grep tenancy | awk '{split($0,array,"=")} END{print array[2]}'`
export OCI_REGION=`cat ~/.oci/config | grep region | awk '{split($0,array,"=")} END{print array[2]}'`
export OCI_FINGERPRINT=`cat ~/.oci/config | grep fingerprint | awk '{split($0,array,"=")} END{print array[2]}'`
export OCI_PRIVATE_KEY_BASE64=`cat $(cat ~/.oci/config | grep key_file | awk '{split($0,array,"=")} END{print array[2]}') | base64`
export OCI_COMPARTMENT=${OCI_COMPARTMENT:-`cat ~/.oci/config | grep compartment_id | awk '{split($0,array,"=")} END {print array[2]}'`}
export OCI_PRIVATE_KEY_PASS=${OCI_PRIVATE_KEY_PASS:-""}