Skip to content

Commit 6051646

Browse files
Merge branch 'main' into alexandruporcescu-patch-oci-data-integration-1
2 parents 75a535c + fe3a0cb commit 6051646

File tree

40 files changed

+1878
-119
lines changed

40 files changed

+1878
-119
lines changed

app-dev/devops-and-containers/devops/ansible-jenkins/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ can eventually be modified or forked.
1818

1919
Although these limitations might not fit every use case, the code can be used as a reference and there are ways to lift them.
2020

21-
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-devrel/technology-engineering/raw/main/app-dev/devops/ansible-jenkins/ansible-jenkins-rm.zip)
21+
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-devrel/technology-engineering/raw/main/app-dev/devops-and-containers/devops/ansible-jenkins/ansible-jenkins-rm.zip)
2222

app-dev/devops-and-containers/functions/java-helloworld-with-local-dev-and-oci-functions/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ docker build -t fra.ocir.io/<YOUR OCI TENANCY NAMESPACE>/helloworld-java:1
118118
</pre>
119119

120120
In the docker build command above replace the <code>region</code> if necessary and the <code>&lt;YOUR OCI TENANCY NAMESPACE&gt;</code> with yours.
121-
122121
<p>
123122

124123
After building let's do <code>docker login</code> and <code>docker push</code> to push the container to the OCIR repo:
@@ -130,6 +129,16 @@ docker login ams.ocir.io -u '&lt;YOUR OCI TENANCY NAMESPACE&gt;/oracleidentitycl
130129
docker push fra.ocir.io/&lt;YOUR OCI TENANCY NAMESPACE&gt;/helloworld-java:1
131130
</pre>
132131

132+
<p>
133+
The same as above but using OCI cli to get the &lt;YOUR OCI TENANCY NAMESPACE&gt; which is especially handy in scripting:
134+
135+
<pre>
136+
export namespace=$(oci os ns get | jq .data | tr -d '"')
137+
docker build -t fra.ocir.io/$namespace/helloworld-java:1 .
138+
docker push fra.ocir.io/$namespace/helloworld-java:1
139+
</pre>
140+
141+
<p>
133142
The last step is to create the Function Application and the function deployment for it. This can be easily done using the Cloud UI.
134143

135144
<p>

app-dev/devops-and-containers/oke/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Reviewed: 20.12.2023
5151
- [Selecting a cloud native microservice framework](https://louwersj.medium.com/selecting-a-cloud-native-microservice-framework-9974e9534da1)
5252
- [Deploying a spring boot microservice in K8s](https://techdozo.dev/deploying-a-restful-spring-boot-microservice-on-kubernetes/)
5353
- [Collection of Labs](https://oracle.github.io/cloudtestdrive/AppDev/cloud-native/livelabs/)
54+
- [OKE policies](./oke-policies/policies.md)
5455

5556
# Reusable Assets Overview
5657

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
## OKE Policies
2+
3+
4+
5+
### VCN NATIVE CNI
6+
7+
When network compartment is not the same as OKE compartment AND OKE is using VCN\_NATIVE CNI
8+
9+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpodnetworking\_topic-OCI\_CNI\_plugin.htm](https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpodnetworking_topic-OCI_CNI_plugin.htm)
10+
11+
```
12+
Allow any-user to manage instances in compartment <compartment-ocid-of-nodepool> where all { request.principal.id = '<cluster-ocid>' }
13+
Allow any-user to use private-ips in compartment <compartment-ocid-of-network-resources> where all { request.principal.id = '<cluster-ocid>' }
14+
Allow any-user to use network-security-groups in compartment <compartment-ocid-of-network-resources> where all { request.principal.id = '<cluster-ocid>' }
15+
```
16+
17+
18+
19+
### USE IPv6 WITH VCN NATIVE CNI
20+
21+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpodnetworking\_topic-OCI\_CNI\_plugin.htm](https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpodnetworking_topic-OCI_CNI_plugin.htm)
22+
23+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/conteng\_ipv4-and-ipv6.htm](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/conteng_ipv4-and-ipv6.htm)
24+
25+
UNCLEAR: Maybe this policy is necessary for every IPv6 cluster
26+
27+
```
28+
Allow any-user to use ipv6s in compartment <compartment-ocid-of-network-resources> where all { request.principal.id = '<cluster-ocid>' }
29+
```
30+
31+
32+
33+
### ENCRYPT BOOT VOLUME WITH KEY
34+
35+
To encrypt OKE worker nodes boot volume with a key that is in a different compartment than the worker nodes
36+
37+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpolicyconfig.htm#contengpolicyconfig\_topic\_Create\_Policies\_for\_User\_Managed\_Encryption](https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpolicyconfig.htm#contengpolicyconfig_topic_Create_Policies_for_User_Managed_Encryption)
38+
39+
```
40+
Allow any-user to use key-delegates in <compartment-key> where ALL {request.principal.type='nodepool', target.key.id = '<key_OCID>'}
41+
Allow service blockstorage to use keys in compartment <compartment-key> where target.key.id = '<key_OCID>'
42+
Allow any-user to use key-delegates in compartment <compartment-key> where ALL {request.principal.type='nodepool', target.key.id = '<key_OCID>'}
43+
```
44+
45+
46+
47+
### ENCRYPT BLOCK VOLUME WITH KEY
48+
49+
To enable encryption on block volumes with a key in a different compartment than the worker nodes
50+
51+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpolicyconfig.htm#contengpolicyconfig\_topic\_Create\_Policies\_for\_User\_Managed\_Encryption](https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpolicyconfig.htm#contengpolicyconfig_topic_Create_Policies_for_User_Managed_Encryption)
52+
53+
```
54+
Allow service blockstorage to use keys in compartment <compartment-key> where target.key.id = '<key-ocid>'
55+
Allow any-user to use key-delegates in compartment <compartment-key> where ALL {request.principal.type = 'cluster', target.key.id = '<key-ocid>'}
56+
```
57+
58+
59+
60+
### ENCRYPT FILE SYSTEM
61+
62+
To enable in-transit/in-place encryption of FSS
63+
64+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpolicyconfig.htm#contengpolicyconfig\_topic\_Create\_Policies\_for\_User\_Managed\_Encryption](https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpolicyconfig.htm#contengpolicyconfig_topic_Create_Policies_for_User_Managed_Encryption)
65+
66+
```
67+
Dynamic Group
68+
ALL { resource.type='filesystem', resource.compartment.id = '<file_system_compartment_OCID>' }
69+
70+
Allow dynamic-group <domain>/<dynamic-group-name> to use keys in compartment <key-compartment-name>
71+
Allow any-user to use key-delegates in compartment <compartment-key> where ALL {request.principal.type = 'cluster', target.key.id = '<key_OCID>'}
72+
```
73+
74+
75+
76+
### ENABLE CCM TO MANAGE NSGs FOR LBs and NLBs
77+
78+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringloadbalancersnetworkloadbalancers-subtopic.htm#contengcreatingloadbalancer\_topic-Specifying\_Load\_Balancer\_Security\_Rule\_Management\_Annotation](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringloadbalancersnetworkloadbalancers-subtopic.htm#contengcreatingloadbalancer_topic-Specifying_Load_Balancer_Security_Rule_Management_Annotation)
79+
80+
```
81+
ALLOW any-user to manage network-security-groups in compartment <compartment-name> where request.principal.type = 'cluster'
82+
ALLOW any-user to manage vcns in compartment <compartment-name> where request.principal.type = 'cluster'
83+
ALLOW any-user to manage virtual-network-family in compartment <compartment-name> where request.principal.type = 'cluster'
84+
```
85+
86+
87+
88+
### TAGGING RESOURCES DIFFERENT COMPARTMENT
89+
90+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengtaggingclusterresources\_iam-tag-namespace-policy.htm#contengtaggingclusterresources\_iam-tag-namespace-policy](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengtaggingclusterresources_iam-tag-namespace-policy.htm#contengtaggingclusterresources_iam-tag-namespace-policy)
91+
92+
```
93+
Allow any-user to use tag-namespace in compartment <compartment-ocid-tag-namespace> where all { request.principal.id = '<cluster-ocid>' }
94+
```
95+
96+
97+
98+
### USE MANAGED NODE POOL WITH CAPACITY RESERVATION
99+
100+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengmakingcapacityreservations.htm#contengmakingcapacityreservations\_topic\_Using\_capacity\_reservations](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengmakingcapacityreservations.htm#contengmakingcapacityreservations_topic_Using_capacity_reservations)
101+
102+
```
103+
Allow service oke to use compute-capacity-reservations in compartment id <compartment_capacity>
104+
Allow any-user to use compute-capacity-reservations in tenancy where request.principal.type = 'nodepool'
105+
```
106+
107+
108+
109+
### USE RESERVED PUBLIC IP IN DIFFERENT COMPARTMENTS THAN OKE
110+
111+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringloadbalancersnetworkloadbalancers-subtopic.htm#contengcreatingloadbalancer\_topic\_Specifying\_Load\_Balancer\_Reserved\_IP](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringloadbalancersnetworkloadbalancers-subtopic.htm#contengcreatingloadbalancer_topic_Specifying_Load_Balancer_Reserved_IP)
112+
113+
If it is a LB:
114+
115+
```
116+
ALLOW any-user to read public-ips in tenancy where request.principal.type = 'cluster'
117+
ALLOW any-user to manage floating-ips in tenancy where request.principal.type = 'cluster'
118+
```
119+
120+
121+
122+
If it is a NLB:
123+
124+
```
125+
ALLOW any-user to use private-ips in TENANCY where ALL {request.principal.type = 'cluster', request.principal.compartment.id = 'target.compartment.id'}
126+
ALLOW any-user to manage public-ips in TENANCY where ALL {request.principal.type = 'cluster', request.principal.compartment.id = 'target.compartment.id'}
127+
```
128+
129+
130+
131+
### ATTACH NSGs WHEN THEY ARE IN DIFFERENT COMPARTMENT THAN OKE
132+
133+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringloadbalancersnetworkloadbalancers-subtopic.htm#contengcreatingloadbalancer\_topic\_Specifying\_Load\_Balancer\_Network\_Security\_Group](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringloadbalancersnetworkloadbalancers-subtopic.htm#contengcreatingloadbalancer_topic_Specifying_Load_Balancer_Network_Security_Group)
134+
135+
```
136+
Allow any-user to use network-security-groups in compartment <network-compartment-ocid> where all { request.principal.id = '<cluster-ocid>' }
137+
```
138+
139+
### USE A STATICALLY PROVISIONED SNAPSHOT WHEN IT IS IN A DIFFERENT COMPARTMENT
140+
141+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim_topic-Provisioning_PVCs_on_BV.htm#contengcreatingpersistentvolumeclaim_topic-Provisioning_PVCs_on_BV-PV_From_Snapshot_CSI__section_volume-snapshot-prerequisites](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim_topic-Provisioning_PVCs_on_BV.htm#contengcreatingpersistentvolumeclaim_topic-Provisioning_PVCs_on_BV-PV_From_Snapshot_CSI__section_volume-snapshot-prerequisites)
142+
143+
```
144+
ALLOW any-user to manage volume-backups in compartment <compartment-name> where request.principal.type = 'cluster'
145+
ALLOW any-user to use volumes in compartment <compartment-name> where request.principal.type = 'cluster'
146+
```
147+
148+
### PROVISION A PVC ON A NEW FILE SYSTEM USING THE CSI VOLUME PLUGIN
149+
150+
[https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim_Provisioning_PVCs_on_FSS.htm#contengcreatingpersistentvolumeclaim_topic-Provisioning_PVCs_on_FSS-Using-CSI-Volume-Plugin](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim_Provisioning_PVCs_on_FSS.htm#contengcreatingpersistentvolumeclaim_topic-Provisioning_PVCs_on_FSS-Using-CSI-Volume-Plugin)
151+
152+
Cluster will need policies to create a new file system and to handle network resources:
153+
154+
```
155+
ALLOW any-user to manage file-family in compartment <oke-compartment-name> where request.principal.type = 'cluster'
156+
ALLOW any-user to use virtual-network-family in compartment <oke-compartment-name> where request.principal.type = 'cluster'
157+
```
158+
159+
If the compartment to which a node pool, worker node subnet, file system, or mount target belongs, is different to the compartment to which a cluster belongs, IAM policies must exist to enable the CSI volume plugin to access the appropriate location.
160+
161+
```
162+
ALLOW any-user to manage file-family in TENANCY where request.principal.type = 'cluster'
163+
ALLOW any-user to use virtual-network-family in TENANCY where request.principal.type = 'cluster'
164+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2025 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Red Hat OpenShift on Oracle Cloud Infrastructure: Solution Definition Document
2+
3+
This repository provides a comprehensive guide for deploying the Red Hat OpenShift Container Platform on Oracle Cloud Infrastructure (OCI). It outlines a high-level solution definition, including deployment architecture and the migration process for containerized workloads from an existing OpenShift environment—whether on-premises or in another cloud. The document captures the current state architecture, requirements, and a prospective state, along with potential project scope and anticipated timelines for implementation.
4+
5+
Reviewed: 11.04.2025
6+
7+
# When to use this asset?
8+
9+
This document is a critical resource for individuals and organizations planning to deploy Red Hat OpenShift on Oracle Cloud Infrastructure. It is particularly useful for:
10+
11+
- Migrating containerized applications to a newly deployed OpenShift environment on OCI.
12+
- Greenfield implementations of Red Hat OpenShift on OCI.
13+
14+
# Instructions for Utilizing This Asset
15+
16+
This document serves as a template for defining your Red Hat OpenShift project solution. It includes:
17+
18+
- Example architecture diagrams that can be customized to reflect customer-specific requirements.
19+
- Guidance on defining project scope, timelines, and technical requirements.
20+
21+
# Conclusion
22+
23+
The Red Hat OpenShift platform on Oracle Cloud Infrastructure delivers a robust, scalable, and secure environment for containerized workloads. This Solution Definition Document is designed to serve as a definitive guide for your project. We encourage all stakeholders to provide feedback, ask questions, and contribute to ensure the success of the implementation.
24+
25+
# License
26+
27+
Copyright (c) 2025 Oracle and/or its affiliates.
28+
29+
Licensed under the Universal Permissive License (UPL), Version 1.0.
30+
31+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
32+

0 commit comments

Comments
 (0)