Skip to content

Commit 8ae67ba

Browse files
authored
Merge branch 'main' into jbrasero3110
2 parents 14806d2 + 64b257c commit 8ae67ba

File tree

401 files changed

+3515
-21362
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+3515
-21362
lines changed

.github/workflows/banned_file_changes_pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
# pull_request:
44
# branches: [ "**/*" ]
55
pull_request_target:
6-
6+
77
jobs:
88
check_for_banned_file_changes:
99
name: Look for unsupported (banned) file modifications on PRs
@@ -31,7 +31,7 @@ jobs:
3131
echo 'Changes to files in .github are not allowed.'
3232
- name: Comment if .github changed
3333
if: contains(steps.files.outputs.all_files_changed, '.github')
34-
uses: mshick/add-pr-comment@v1
34+
uses: oracle-devrel/add-pr-comment
3535
with:
3636
message: |
3737
:no_entry: **Banned Files Modified**
@@ -43,15 +43,15 @@ jobs:
4343
echo 'Changes to license_policy.yml are not allowed.'
4444
- name: Comment if license_policy.yml changed
4545
if: contains(steps.files.outputs.all_files_changed, '"license_policy.yml"')
46-
uses: mshick/add-pr-comment@v1
46+
uses: oracle-devrel/add-pr-comment
4747
with:
4848
message: |
4949
:no_entry: **Banned Files Modified**
5050
Changes to `license_policy.yml` are not permitted. Please revert your changes and re-submit a new PR. Simply changing the file back to its original state and re-committing won't work (you must revert the changes made to it).
5151
repo-token: ${{ secrets.GITHUB_TOKEN }}
5252
- name: Look for changes to repolinter.json
5353
if: contains(steps.files.outputs.all_files_changed, '"repolinter.json"')
54-
uses: mshick/add-pr-comment@v1
54+
uses: oracle-devrel/add-pr-comment
5555
with:
5656
message: |
5757
:no_entry: **Banned Files Modified**
@@ -63,7 +63,7 @@ jobs:
6363
echo 'Changes to repolinter.json are not allowed.'
6464
- name: Look for changes to sonar-project.properties
6565
if: contains(steps.files.outputs.all_files_changed, '"sonar-project.properties"')
66-
uses: mshick/add-pr-comment@v1
66+
uses: oracle-devrel/add-pr-comment
6767
with:
6868
message: |
6969
:no_entry: **Banned Files Modified**
@@ -76,4 +76,4 @@ jobs:
7676
- name: Fail on banned file changes
7777
if: contains(steps.files.outputs.all_files_changed, '.github') || contains(steps.files.outputs.all_files_changed, '"license_policy.yml"') || contains(steps.files.outputs.all_files_changed, '"repolinter.json"') || contains(steps.files.outputs.all_files_changed, '"sonar-project.properties"')
7878
run: |
79-
exit 1
79+
exit 1

.github/workflows/license_audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: echo "${{ steps.analysis.outputs.unapproved_licenses }}"
3232
- name: Comment if analysis finds unapproved licenses
3333
if: steps.analysis.outputs.unapproved_licenses == 'true'
34-
uses: mshick/add-pr-comment@v1
34+
uses: oracle-devrel/add-pr-comment
3535
with:
3636
message: |
3737
:no_entry: **License Inspection**

.github/workflows/repolinter.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
echo "Errored: ${{ steps.analysis.outputs.errored }}"
3535
- name: Comment if analysis finds missing disclaimer
3636
if: steps.analysis.outputs.disclaimer_found == 'false'
37-
uses: mshick/add-pr-comment@v1
37+
uses: oracle-devrel/add-pr-comment
3838
with:
3939
message: |
4040
:no_entry: **FAILURE: Missing Disclaimer**
@@ -47,34 +47,34 @@ jobs:
4747
repo-token: ${{ secrets.GITHUB_TOKEN }}
4848
- name: Comment if analysis finds missing readme
4949
if: steps.analysis.outputs.readme_file_found == 'false'
50-
uses: mshick/add-pr-comment@v1
50+
uses: oracle-devrel/add-pr-comment
5151
with:
5252
message: |
5353
:no_entry: **FAILURE: Missing README**
5454
The README file seems to be missing. Please add it.
55-
55+
5656
Details:
5757
${{ steps.analysis.outputs.readme_file_details }}
5858
repo-token: ${{ secrets.GITHUB_TOKEN }}
5959
- name: Comment if analysis finds missing license
6060
if: steps.analysis.outputs.license_file_found == 'false'
61-
uses: mshick/add-pr-comment@v1
61+
uses: oracle-devrel/add-pr-comment
6262
with:
6363
message: |
6464
:no_entry: **FAILURE: Missing LICENSE**
6565
The LICENSE file seems to be missing. Please add it.
66-
66+
6767
Details:
6868
${{ steps.analysis.outputs.license_file_details }}
6969
repo-token: ${{ secrets.GITHUB_TOKEN }}
7070
- name: Comment if analysis finds copyright notice missing
7171
if: steps.analysis.outputs.copyright_found == 'false'
72-
uses: mshick/add-pr-comment@v1
72+
uses: oracle-devrel/add-pr-comment
7373
with:
7474
message: |
7575
:warning: **WARNING: Missing Copyright Notice(s)**
7676
It's a good idea to have copyright notices at the top of each file. It looks like at least one file was missing this (though it might be further down in the file - this might be a false-positive).
77-
77+
7878
Details:
7979
${{ steps.analysis.outputs.copyright_details }}
8080
repo-token: ${{ secrets.GITHUB_TOKEN }}

data-platform/core-converged-db/shared-sassets/tooling/run-plan/LICENSE renamed to app-dev/devops-and-containers/devops/azure-devops-oke/LICENSE

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
Copyright (c) 2024 Oracle and/or its affiliates.
2-
2+
33
The Universal Permissive License (UPL), Version 1.0
4-
4+
55
Subject to the condition set forth below, permission is hereby granted to any
66
person obtaining a copy of this software, associated documentation and/or data
77
(collectively the "Software"), free of charge and under any and all copyright
88
rights in the Software, and any and all patent rights owned or freely
99
licensable by each licensor hereunder covering either (i) the unmodified
1010
Software as contributed to or provided by such licensor, or (ii) the Larger
1111
Works (as defined below), to deal in both
12-
12+
1313
(a) the Software, and
1414
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
1515
one is included with the Software (each a "Larger Work" to which the Software
1616
is contributed by such licensors),
17-
17+
1818
without restriction, including without limitation the rights to copy, create
1919
derivative works of, display, perform, and distribute the Software and make,
2020
use, sell, offer for sale, import, export, have made, and have sold the
2121
Software and the Larger Work(s), and to sublicense the foregoing rights on
2222
either these or other terms.
23-
23+
2424
This license is subject to the following condition:
2525
The above copyright notice and either this complete permission notice or at
2626
a minimum a reference to the UPL must be included in all copies or
2727
substantial portions of the Software.
28-
28+
2929
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3030
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3131
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

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

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,28 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3636
SOFTWARE.
3737
-->
3838

39-
### Author
40-
<a href="https://github.com/mikarinneoracle">mikarinneoracle</a>
41-
42-
## Building and Deploying to OKE with Azure DevOps
39+
# Building and Deploying to OKE with Azure DevOps
4340

44-
There are two ways (at least) to build and deploy to OKE from Azure DevOps:
41+
There are two ways (at least) to build and deploy to Oracle Container Registry (OCIR) and Oracle Kubernetes Engine (OKE) from Azure DevOps:
4542
<ul>
4643
<li>Use OCI VM as Azure parallel job self-hosted build agent that will run as <code>instance-principal</code> and hence no OCI credentials are needed to be shared with Azure DevOps. Here <code>kubectl</code> and OCI native tooling like <code>oci cli</code> can be used in pipelines.</li>
4744
<br>
48-
<li>Use Azure DevOps native <code>tasks</code> that can run as either Azure-hosted or as self-hosted Azure parallel jobs. Credentials will be stored to Azure DevOps.</li>
45+
<li>Use Azure DevOps native <code>tasks</code> that can run as either Azure-hosted or as self-hosted Azure parallel jobs to deploy to OCIR and OKE. Credentials will be stored to Azure DevOps.</li>
4946
</ul>
5047

5148
<p>
52-
For this example I've used the second option. I'm also using a self-hosted agent/runner on OCI but that's just because I can use the <code>always-free</code> VM instance for it as part of the default OCI subscription and I don't have any Azure-hosted agents available in my Azure subscription. Technically that does not matter since the agent is a vanilla Oracle Linux VM instance and does not contain any customizations whatsover to do the pipeline work (it could however, but it does not).
49+
For this example I've used the second option. I'm also using a self-hosted agent/runner on OCI but that's just because I can use the <code>always-free</code> VM instance for it as part of the default OCI subscription and I don't have any Azure-hosted agents available in my Azure subscription. Technically that does not matter since the agent is a vanilla Oracle Linux VM instance and does not contain any customizations whatsover to do the pipeline work (it could however, but it does not).
50+
51+
Reviewed: 29.10.2024
52+
53+
# When to use this asset?
54+
55+
Anyone who wants to do CI/CD from Azure DevOps to deploy and run containers on Oracle Kubernetes Engine (OKE) using Azure DevOps native tasks.
56+
57+
# Author
58+
<a href="https://github.com/mikarinneoracle">mikarinneoracle</a>
59+
60+
# How to use this asset?
5361

5462
## Copy the files to the Azure DevOps repo
5563

@@ -60,7 +68,7 @@ To make this build and deploy to OKE to work is not a big task. First copy the f
6068
Before building the Docker image repo needs to be created under the desired <code>compartment</code>. This can be easily done using OCI Cloud UI. Name the repository as <b><i>Azure-test</i></b>, for example.
6169

6270
<p>
63-
Then modify the <code>deployment.yaml</code> <a href="https://github.com/oracle-devrel/technology-engineering/tree/main/app-dev/devops-and-containers/devops/azure-devops-oke/deployment.yaml#L19">line 19</a> by replacing the &lt;TENANCY_NAMESPACE&gt; with yours and if you gave another name for the OCIR repo then modify also that here, too. Modify also the <code>region</code> if using some other OCI region than <b><i>fra.ocir.io</i></b>.
71+
Then modify the <code>deployment.yaml</code> <a href="https://github.com/oracle-devrel/technology-engineering/tree/main/app-dev/devops-and-containers/devops/azure-devops-oke/files/deployment.yaml#L19">line 19</a> by replacing the &lt;TENANCY_NAMESPACE&gt; with yours and if you gave another name for the OCIR repo then modify also that here, too. Modify also the <code>region</code> if using some other OCI region than <b><i>fra.ocir.io</i></b>.
6472

6573
<p>
6674
To be able to do <code>Docker login</code> to the repo create <code>auth token</code> for your OCI user unless you already have one.
@@ -74,7 +82,7 @@ Once the OKE cluster is up and running with <code>kubectl</code> access setup th
7482
<a href="https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengaddingserviceaccttoken.htm" target="_NEW">https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengaddingserviceaccttoken.htm</a>.
7583

7684
<p>
77-
Name the secret <b><i>oke-kubeconfig-azure-token</i></b> as in <code>azure-token.yaml</code> <a href="https://github.com/oracle-devrel/technology-engineering/tree/main/app-dev/devops-and-containers/devops/azure-devops-oke/azure-token.yaml#L4" target="_NEW">line 4</a>.
85+
Name the secret <b><i>oke-kubeconfig-azure-token</i></b> as in <code>azure-token.yaml</code> <a href="https://github.com/oracle-devrel/technology-engineering/blob/main/app-dev/devops-and-containers/devops/azure-devops-oke/files/azure-token.yaml#L4" target="_NEW">line 4</a>.
7886

7987
## Setup Azure DevOps OCI connections for OKE and OCIR
8088

@@ -93,7 +101,7 @@ To make the Azure DevOps pipeline to work with OCIR and OKE two <code>Service Co
93101
<ul>
94102
<li>Type: Kubernetes</li>
95103
<li>Authentication method: Service Account</li>
96-
<li>Server URL: OKE cluster server address from your <i>~/.kube/config</i> e.g. <i>https://145.144.233.100:6443</i></li>
104+
<li>Server URL: OKE cluster server address from your <i>~/.kube/config</i> e.g. <i>https://xxx.144.233.100:6443</i></li>
97105
<li>Authorization Secret: Get the secret JSON by doing <i>kubectl get secret oke-kubeconfig-azure-token -n kube-system -o json</i> and paste it here</li>
98106
<li>Service connection name: OKE</li>
99107
<li>Grant access permission to all pipelines: YES</li>
@@ -109,22 +117,22 @@ Edit the created pipeline and select <code>Variables</code> to create them as fo
109117

110118
<ul>
111119
<li>CONTAINER_REGISTRY: OCIR</li>
112-
<li>CONTAINER_REPOSITORY: Use the same name as in the <code>deployment.yaml</code> <a href="https://github.com/oracle-devrel/technology-engineering/tree/main/app-dev/devops-and-containers/devops/azure-devops-oke/deployment.yaml#L19">line 19</a> but <b><i>without</i></b> the <code>region</code> and the <code>tag</code> ("1" in the example YAML file) e.g. <b><i>&lt;TENANCY_NAMESPACE&gt;/azure-test</i></b></li>
120+
<li>CONTAINER_REPOSITORY: Use the same name as in the <code>deployment.yaml</code> <a href="https://github.com/oracle-devrel/technology-engineering/tree/main/app-dev/devops-and-containers/devops/azure-devops-oke/files/deployment.yaml#L19">line 19</a> but <b><i>without</i></b> the <code>region</code> and the <code>tag</code> ("1" in the example YAML file) e.g. <b><i>&lt;TENANCY_NAMESPACE&gt;/azure-test</i></b></li>
113121
<li>containerImageFullNameForK8sDeploy: The same as above but with the OCI region e.g. <b><i>fra.ocir.io/&lt;TENANCY_NAMESPACE&gt;/azure-test</i></b></li>
114122
<li>K8S_CONNECTION_NAME: OKE</li>
115123
<li>K8S_NAMESPACE: default</li>
116124
<li>OcirPullSecret: ocirsecret</li>
117125
</ul>
118126

119127
<p>
120-
<img src="pipeline-vars.png" width="800" />
128+
<img src="files/pipeline-vars.png" width="800" />
121129

122130
## Run the pipeline
123131

124132
Pipeline runs automatically after commiting changes and when all of the above are properly set it should complete succesfully.
125133

126134
<p>
127-
<img src="azure-devops-oke.png" width="800" />
135+
<img src="files/azure-devops-oke.png" width="800" />
128136

129137
<p>
130138
Pipeline will create a Kubernetes <b><i>load balancer</i></b> service to provide a public access point to the pod in the OKE cluster:
@@ -133,7 +141,7 @@ Pipeline will create a Kubernetes <b><i>load balancer</i></b> service to provide
133141
<PRE>
134142
kubectl get svc
135143
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
136-
httpd-lb LoadBalancer 10.96.175.74 144.200.51.195 80:32452/TCP 4h1m
144+
httpd-lb LoadBalancer 10.96.175.74 xxx.200.51.195 80:32452/TCP 4h1m
137145
</PRE>
138146

139147
<p>
@@ -145,14 +153,14 @@ curl 144.200.51.195
145153
{
146154
"path": "/",
147155
"headers": {
148-
"host": "144.200.51.195",
156+
"host": "xxx.200.51.195",
149157
"user-agent": "curl/8.4.0",
150158
"accept": "*/*"
151159
},
152160
"method": "GET",
153161
"body": "",
154162
"fresh": false,
155-
"hostname": "144.200.51.195",
163+
"hostname": "xxx.200.51.195",
156164
"ip": "::ffff:10.0.10.220",
157165
"ips": [],
158166
"protocol": "http",
@@ -166,6 +174,13 @@ curl 144.200.51.195
166174
}%
167175
</PRE>
168176

177+
# Useful Links
178+
179+
- [Oracle Kubernetes Engine (OKE)](https://www.oracle.com/cloud/cloud-native/kubernetes-engine/)
180+
- Simplify operations of enterprise-grade Kubernetes at scale. Easily deploy and manage resource-intensive workloads such as AI with automatic scaling, patching, and upgrades.
181+
- [Oracle](https://www.oracle.com/)
182+
- Oracle Website
183+
169184
### License
170185

171186
Copyright (c) 2024 Oracle and/or its affiliates.

0 commit comments

Comments
 (0)