diff --git a/python/cloud/oracle/README.md b/python/cloud/oracle/README.md index 07a720b..6843542 100644 --- a/python/cloud/oracle/README.md +++ b/python/cloud/oracle/README.md @@ -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} diff --git a/python/cloud/oracle/oci-instances-func/setup_local.sh b/python/cloud/oracle/oci-instances-func/setup_local.sh index ceded37..5a6171a 100755 --- a/python/cloud/oracle/oci-instances-func/setup_local.sh +++ b/python/cloud/oracle/oci-instances-func/setup_local.sh @@ -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:-""}