diff --git a/app-dev/devops-and-containers/devops/azure-devops-oke/LICENSE b/app-dev/devops-and-containers/devops/azure-devops-oke/LICENSE new file mode 100644 index 000000000..96d702080 --- /dev/null +++ b/app-dev/devops-and-containers/devops/azure-devops-oke/LICENSE @@ -0,0 +1,35 @@ +Copyright (c) 2024 Oracle and/or its affiliates. + +The Universal Permissive License (UPL), Version 1.0 + +Subject to the condition set forth below, permission is hereby granted to any +person obtaining a copy of this software, associated documentation and/or data +(collectively the "Software"), free of charge and under any and all copyright +rights in the Software, and any and all patent rights owned or freely +licensable by each licensor hereunder covering either (i) the unmodified +Software as contributed to or provided by such licensor, or (ii) the Larger +Works (as defined below), to deal in both + +(a) the Software, and +(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +one is included with the Software (each a "Larger Work" to which the Software +is contributed by such licensors), + +without restriction, including without limitation the rights to copy, create +derivative works of, display, perform, and distribute the Software and make, +use, sell, offer for sale, import, export, have made, and have sold the +Software and the Larger Work(s), and to sublicense the foregoing rights on +either these or other terms. + +This license is subject to the following condition: +The above copyright notice and either this complete permission notice or at +a minimum a reference to the UPL must be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/app-dev/devops-and-containers/devops/azure-devops-oke/README.md b/app-dev/devops-and-containers/devops/azure-devops-oke/README.md index 827b23394..3c842d89d 100644 --- a/app-dev/devops-and-containers/devops/azure-devops-oke/README.md +++ b/app-dev/devops-and-containers/devops/azure-devops-oke/README.md @@ -36,20 +36,28 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> -### Author -mikarinneoracle - -## Building and Deploying to OKE with Azure DevOps +# Building and Deploying to OKE with Azure DevOps -There are two ways (at least) to build and deploy to OKE from Azure DevOps: +There are two ways (at least) to build and deploy to Oracle Container Registry (OCIR) and Oracle Kubernetes Engine (OKE) from Azure DevOps:

-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 always-free 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). +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 always-free 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). + +Reviewed: 29.10.2024 + +# When to use this asset? + +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. + +# Author +mikarinneoracle + +# How to use this asset? ## Copy the files to the Azure DevOps repo @@ -60,7 +68,7 @@ To make this build and deploy to OKE to work is not a big task. First copy the f Before building the Docker image repo needs to be created under the desired compartment. This can be easily done using OCI Cloud UI. Name the repository as Azure-test, for example.

-Then modify the deployment.yaml line 19 by replacing the <TENANCY_NAMESPACE> with yours and if you gave another name for the OCIR repo then modify also that here, too. Modify also the region if using some other OCI region than fra.ocir.io. +Then modify the deployment.yaml line 19 by replacing the <TENANCY_NAMESPACE> with yours and if you gave another name for the OCIR repo then modify also that here, too. Modify also the region if using some other OCI region than fra.ocir.io.

To be able to do Docker login to the repo create auth token for your OCI user unless you already have one. @@ -74,7 +82,7 @@ Once the OKE cluster is up and running with kubectl access setup th https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengaddingserviceaccttoken.htm.

-Name the secret oke-kubeconfig-azure-token as in azure-token.yaml line 4. +Name the secret oke-kubeconfig-azure-token as in azure-token.yaml line 4. ## Setup Azure DevOps OCI connections for OKE and OCIR @@ -93,7 +101,7 @@ To make the Azure DevOps pipeline to work with OCIR and OKE two Service Co