|
1 |
| -# |
| 1 | +# Oracle Container Engine for Kubernetes ([OKE][oke]) Base stack |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +This repo contains a Terraform Module for how to deploy Oracle Container Engine for [Kubernetes][kubernetes_101] ([OKE][oke]) cluster on Oracle Cloud Infrastructure ([OCI][oci]). This module is designed to be used with the [OCI Resource Manager][oci_rm] to deploy a cluster in a single step. The module can also be used with the [OCI Terraform Provider][oci_tf_provider] to deploy a cluster using local or CloudShell Terraform cli. |
| 6 | + |
| 7 | +This repo also includes the modules for deploying the following cluster components on the OKE cluster: |
| 8 | + |
| 9 | +| Component | Description | |
| 10 | +| --- | --- | |
| 11 | +| [Kubernetes Cluster Autoscaler](modules/cluster-tools/oke-cluster-autoscaler.tf) | This module deploys the Kubernetes Cluster Autoscaler on the OKE cluster. | |
| 12 | +| [Metrics Server](modules/cluster-tools/metrics-server.tf) | This module deploys the Metrics Server on the OKE cluster. | |
| 13 | +| [Kubernetes Ingress Nginx Controller](modules/cluster-tools/ingress-nginx.tf) | This module deploys the Nginx Ingress Controller on the OKE cluster. | |
| 14 | +| [Prometheus](modules/cluster-tools/prometheus.tf) | This module deploys the Prometheus monitoring system on the OKE cluster. | |
| 15 | +| [Grafana](modules/cluster-tools/grafana.tf) | This module deploys the Grafana monitoring system on the OKE cluster. | |
| 16 | +| [Cert Manager](modules/cluster-tools/cert-manager.tf) | This module deploys the Cert Manager on the OKE cluster. | |
| 17 | +<!-- | [Fluentd](modules/fluentd) | This module deploys a Fluentd agent on the OKE cluster. | |
| 18 | +| [Kubernetes Dashboard](modules/kubernetes-dashboard) | This module deploys the Kubernetes Dashboard on the OKE cluster. | |
| 19 | +| [Jaeger](modules/jaeger) | This module deploys the Jaeger tracing system on the OKE cluster. | |
| 20 | +| [Kiali](modules/kiali) | This module deploys the Kiali tracing system on the OKE cluster. | |
| 21 | +| [Keycloak](modules/keycloak) | This module deploys the Keycloak identity and access management system on the OKE cluster. | --> |
| 22 | + |
| 23 | +## Deploy Using Oracle Resource Manager |
| 24 | + |
| 25 | + If you aren't already signed in, when prompted, enter the tenancy and user credentials. |
| 26 | + Review and accept the terms and conditions. |
| 27 | + |
| 28 | +1. Click to deploy the stack |
| 29 | + |
| 30 | + [![Deploy to Oracle Cloud][magic_button]][magic_oke_stack] |
| 31 | + |
| 32 | +1. Select the region and compartment where you want to deploy the stack. |
| 33 | + |
| 34 | +1. Follow the on-screen prompts and instructions to create the stack. |
| 35 | + |
| 36 | +1. After creating the stack, click Terraform Actions, and select Plan. |
| 37 | + |
| 38 | +1. Wait for the job to be completed, and review the plan. |
| 39 | + |
| 40 | +1. To make any changes, return to the Stack Details page, click Edit Stack, and make the required changes. Then, run the Plan action again. |
| 41 | + |
| 42 | +1. If no further changes are necessary, return to the Stack Details page, click Terraform Actions, and select Apply. |
| 43 | + |
| 44 | +## Deploy Using the Terraform CLI |
| 45 | + |
| 46 | +### Prerequisites |
| 47 | + |
| 48 | +Create a terraform.tfvars file and populate with the required variables or override existing variables. |
| 49 | + |
| 50 | +Note: An example [tfvars file](examples/terraform.tfvars.example) is included for reference. Using this file is the |
| 51 | +preferred way to run the stack from the CLI, because of the large number of variables to manage. |
| 52 | + |
| 53 | +To use this file just copy the example [tfvars file](examples/terraform.tfvars.example) and save it in the outermost directory. |
| 54 | +Next, rename the file to **terraform.tfvars**. You can override the example values set in this file. |
| 55 | + |
| 56 | +### Clone the Module |
| 57 | + |
| 58 | +Clone the source code from suing the following command: |
| 59 | + |
| 60 | +```bash |
| 61 | +git clone github.com/oracle-quickstart/oke-base |
| 62 | +``` |
| 63 | + |
| 64 | +```bash |
| 65 | +cd oke-base |
| 66 | +``` |
| 67 | + |
| 68 | +### Running Terraform |
| 69 | + |
| 70 | +After specifying the required variables you can run the stack using the following commands: |
| 71 | + |
| 72 | +```bash |
| 73 | +terraform init |
| 74 | +``` |
| 75 | +```bash |
| 76 | +terraform plan |
| 77 | +``` |
| 78 | +```bash |
| 79 | +terraform apply |
| 80 | +``` |
| 81 | + |
| 82 | +### Terraform Variables |
| 83 | + |
| 84 | +A complete listing of the Terraform variables used in this stack are referenced [here](VARIABLES.md). This document is automatically generated |
| 85 | +using the [terraform-docs](https://github.com/terraform-docs/terraform-docs) with the following command: |
| 86 | + |
| 87 | +```bash |
| 88 | +terraform-docs markdown table --sort-by required --show inputs --show outputs . > VARIABLES.md |
| 89 | +``` |
| 90 | + |
| 91 | +## What's a Terraform Module? |
| 92 | + |
| 93 | +A Terraform Module refers to a self-contained packages of Terraform configurations that are managed as a group. This repo |
| 94 | +is a Terraform Module and contains many "submodules" which can be composed together to create useful infrastructure patterns. |
| 95 | + |
| 96 | +## Which projects use this Module? |
| 97 | + |
| 98 | +| | | | |
| 99 | +|---|---|---| |
| 100 | +||[oci-cloudnative (MuShop)](https://github.com/oracle-quickstart/oci-cloudnative)| This project is a reference implementation of a cloud native microservices application on Oracle Cloud Infrastructure (OCI). It is a multi-tiered application that demonstrates how to build and deploy a cloud native application on OCI using Kubernetes, Docker, Istio and other open source technologies. | |
| 101 | +||[oke-unreal-pixel-streaming](https://github.com/oracle-quickstart/oke-unreal-pixel-streaming)| This project deploys a Kubernetes cluster on Oracle Cloud Infrastructure (OCI) and deploys the Unreal Pixel Streaming demo application on the cluster. | |
| 102 | +||[oke-sysdig](https://github.com/oracle-quickstart/oke-sysdig)|This project deploy a Sysdig Secure agent on an OKE cluster.| |
| 103 | +||[oke-snyk](https://github.com/oracle-quickstart/oke-snyk)|This project deploy a Snyk agent on an OKE cluster.| |
| 104 | +> Several other projects, samples, demos, and customers quickstarts also uses this module or used as base. |
| 105 | +
|
| 106 | +## How is this Terraform Module versioned? |
| 107 | + |
| 108 | +This Terraform Module follows the principles of [Semantic Versioning](http://semver.org/). You can find each new release, |
| 109 | +along with the changelog, in the [Releases Page](https://github.com/hashicorp/terraform-google-consul/releases). |
| 110 | + |
| 111 | +During initial development, the major version will be 0 (e.g., `0.x.y`), which indicates the code does not yet have a |
| 112 | +stable API. Once we hit `1.0.0`, we will make every effort to maintain a backwards compatible API and use the MAJOR, |
| 113 | +MINOR, and PATCH versions on each release to indicate any incompatibilities. |
| 114 | + |
| 115 | +## Questions |
| 116 | + |
| 117 | +If you have an issue or a question, please take a look at our [FAQs](./FAQs.md) or [open an issue](https://github.com/oracle-quickstart/oke-base/issues/new). |
| 118 | + |
| 119 | +## Contributing |
| 120 | + |
| 121 | +This project welcomes contributions from the community. Before submitting a pull |
| 122 | +request, see [CONTRIBUTING](./CONTRIBUTING.md) for details. |
| 123 | + |
| 124 | +## License |
| 125 | + |
| 126 | +Copyright (c) 2021, 2022 Oracle and/or its affiliates. |
| 127 | +Released under the Universal Permissive License (UPL), Version 1.0. |
| 128 | +See [LICENSE](./LICENSE) for more details. |
| 129 | + |
| 130 | +[oci]: https://cloud.oracle.com/en_US/cloud-infrastructure |
| 131 | +[oci_rm]: https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm |
| 132 | +[oke]: https://www.oracle.com/cloud/cloud-native/container-engine-kubernetes/ |
| 133 | +[kubernetes_101]: https://www.oracle.com/cloud/cloud-native/container-engine-kubernetes/what-is-kubernetes/ |
| 134 | +[tf]: https://www.terraform.io |
| 135 | +[orm_landing]:https://www.oracle.com/cloud/systems-management/resource-manager/ |
| 136 | +[oci_tf_provider]: https://www.terraform.io/docs/providers/oci/index.html |
| 137 | +[magic_button]: https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg |
| 138 | +[magic_oke_stack]: https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-quickstart/oke-base/releases/latest/download/oke-base-stack-latest.zip |
0 commit comments