Skip to content

Commit 35ea137

Browse files
authored
Merge pull request #1577 from oracle-devrel/oci-devops-terraform-3
Oci devops terraform 3
2 parents 5cbece6 + 7a14318 commit 35ea137

File tree

1 file changed

+11
-2
lines changed
  • app-dev/devops-and-containers/devops/oci-devops-terraform-function-java-graalvm

1 file changed

+11
-2
lines changed

app-dev/devops-and-containers/devops/oci-devops-terraform-function-java-graalvm/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ OCI DevOps IAM Policies are not part of the stack, please refer to <a href="http
5656
<p>
5757
Important! Before running the stack it is manadatory to create the OCI Registry repository for the OCI Function container and upload a dummy X86 architecture container to it. The <b>name</b> of the OCIR repo needs to match to the <code>image_name</code> of the Stack variables e.g. <b>helloworldai-java</b>. The image tag must be '<b>1</b>'.
5858
<br>
59-
This can by done by doing the following in OCI Cloud Shell (assuming the image name is 'helloworldai-java'):
59+
The reason for this is that the Stack cannot create the Function without pointing to an image in OCIR.
60+
<p>
61+
This can be done by doing the following in OCI Cloud Shell (assuming the image name is 'helloworldai-java'):
6062
<pre>
6163
oci artifacts container repository create --display-name helloworldai-java --compartment-id ocid1.compartment.oc1.....gq
6264
docker pull hello-world
@@ -67,7 +69,14 @@ Unless doing this the Stack will run into an error:
6769
<pre>
6870
Error: 400-InvalidParameter, Invalid Image fra.ocir.io/&lt;YOUR_TENANCY_NAMESPACE&gt;/&lt;image_name&gt:1 does not exist or you do not have access to use it
6971
</pre>
70-
After doing this the Stack can be run to create the OCI DevOps project. After the project creation the build pipelines can be run to build and deploy the OCI Function with real Function code.
72+
After doing this the Stack can be run to create the OCI DevOps project. After the project creation the build pipelines can be run to build and deploy the OCI Function with real Function code like <a href="https://github.com/oracle-devrel/technology-engineering/blob/main/app-dev/devops-and-containers/functions/java-helloworld-AI-with-local-dev-and-oci-functions/README.md">this one</a> (the dummy hello-world image won't run properly).
73+
<p>
74+
The Stack creates only a <i>private subnet</i> in the VCN and hence the Function cannot be called outside the tenancy by default after the build and deploy.
75+
<br>
76+
However, the Function invocation can be done from OCI Cloud Shell either by connecting to the VCN private subnet or to OCI Service Network, both options will work. The invocation can be done as follows using the Stack <code>project_name</code> e.g. :
77+
<pre>
78+
fn invoke helloworldai-java-project helloworldai-java-project
79+
</pre>
7180

7281
# Useful Links
7382

0 commit comments

Comments
 (0)