From 0c98c369ac712f3c224f4f1cff94c201b44e0436 Mon Sep 17 00:00:00 2001 From: Arian Motavasseli Date: Wed, 3 Jul 2019 12:06:43 -0700 Subject: [PATCH 1/2] fixed issue with shell command. added new command to read me file --- python/cloud/oracle/README.md | 4 ++++ python/cloud/oracle/oci-instances-func/setup_local.sh | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/python/cloud/oracle/README.md b/python/cloud/oracle/README.md index 07a720b..ff4a920 100644 --- a/python/cloud/oracle/README.md +++ b/python/cloud/oracle/README.md @@ -67,6 +67,10 @@ 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:-""} From db052c83014a2975ea9c8e26c7ee601f98822477 Mon Sep 17 00:00:00 2001 From: Arian Motavasseli Date: Wed, 3 Jul 2019 12:10:06 -0700 Subject: [PATCH 2/2] added new command to read me file to update OCI_PRIVATE_KEY_BASE64 --- python/cloud/oracle/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/python/cloud/oracle/README.md b/python/cloud/oracle/README.md index ff4a920..6843542 100644 --- a/python/cloud/oracle/README.md +++ b/python/cloud/oracle/README.md @@ -70,6 +70,7 @@ Update your local env with the following [script](oci-instances-func/setup_local 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