AKS-Construction/README.md

109 строки
8.4 KiB
Markdown
Исходник Обычный вид История

2022-08-31 21:09:51 +03:00
# AKS Accelerator
2021-06-22 14:42:33 +03:00
2022-09-01 22:19:51 +03:00
Building a complete Kubernetes operational environment is hard work! __AKS Accelerator__ dramatically speeds up this work by providing the templates and deployment scripts to quickly create a __fully configured__, Kubernetes environment, tailored to meet your operational and security needs, ready to run your workloads in production.
2022-08-31 21:09:51 +03:00
![animated preview of AKS Construction Helper](docs/images/animgif.gif)
## QuickStart
2022-08-31 21:09:51 +03:00
2022-09-01 23:33:38 +03:00
* #### **Step 1**
Navigate to the AKS Construction [**helper**](https://azure.github.io/AKS-Construction/)
2022-09-01 23:33:38 +03:00
* #### **Step 2** Select your Requirements (optional)
Select your base `Operational` and `Security` Principles using the presets that have been designed from our field experience
![](docs/images/helper-presets.jpg)
2022-09-01 23:33:38 +03:00
<br/>
> **Note**
2022-09-02 15:20:31 +03:00
> If following Azure's **Landing Zone** methodology, select `Enterprise Scale` from the dropdown, then select your environment type
2022-09-01 23:33:38 +03:00
* #### **Step 3** Fine tune (optional)
Use the tabs to fine tune your cluster requirements
2022-09-01 23:33:38 +03:00
![](docs/images/helper-tabs.jpg)
* #### **Step 4** Deploy
In the `Deploy` tab, choose how you will deploy your new cluster, and follow the instructions
2022-09-01 23:33:38 +03:00
![](docs/images/helper-deploy.jpg)
## Advanced Scenarios
The QuickStart provides a nice easy way of creating your AKS Environment, once you've done this it's likely you'll want to consume AKS Construction in a more [advanced scenario](docs/AdvancedUsage.md).
2022-09-02 15:20:31 +03:00
## Project components
2021-06-22 14:55:45 +03:00
### Helper
The Helper is a website that provides a guided experience to creating your AKS environment. It dynamically generates the parameters to call the IaC, and provides deployment options using the Azure CLI, GitHub Actions or Terraform.
2021-09-15 18:44:29 +03:00
### IaC - Bicep code files
2021-06-22 14:55:45 +03:00
2021-09-15 18:44:29 +03:00
IaC (Infrastructure as Code) code files have been modularised into their component areas. [Main.bicep](bicep/main.bicep) references them and they are expected to be present in the same directory. The Deployment Helper leverages an Arm json compiled version of all the bicep files.
Releases are used to version the bicep code files, they can be leveraged directly for use in your project or you can opt to Fork the repo if you prefer.
2021-09-15 19:21:30 +03:00
### DevOps - GitHub Actions
2021-09-15 18:44:29 +03:00
2022-02-09 01:56:35 +03:00
A number of [GitHub actions](https://github.com/Azure/AKS-Construction/tree/main/.github/workflows) are used in the repo that run on push/pr/schedules. These can be copied into your own repo and customised for your CI/CD pipeline. A robust deployment pipeline is essential when coordinating the deployment of multiple Azure services that work together, additionally there is configuration that cannot be set in the template and that needs to be automated (and tested) consistently.
![preview screenshot of the helper app](docs/images/ghactionworkflow.jpg)
2021-06-24 19:53:01 +03:00
CI Name | Actions Workflow | Parameter file | CI Status | Notes
|--------|--------|--------|-----------|------|
2022-02-09 01:56:35 +03:00
| Starter cluster | [StandardCI.yml](https://github.com/Azure/AKS-Construction/blob/main/.github/workflows/StandardCI.yml) | [ESLZ Sandbox](.github/workflows_dep/AksDeploy-Basic.parameters.json) | [![AksStandardCI](https://github.com/Azure/AKS-Construction/actions/workflows/StandardCI.yml/badge.svg)](https://github.com/Azure/AKS-Construction/actions/workflows/StandardCI.yml) | A simple deployment example, good for first time users of this project to start with |
| BYO Vnet | [ByoVnetCI.yml](https://github.com/Azure/AKS-Construction/blob/main/.github/workflows/ByoVnetCI.yml) | [ESLZ Byo peered vnet](.github/workflows_dep/AksDeploy-ByoVnet.parameters.json) | [![ByoVnetCI](https://github.com/Azure/AKS-Construction/actions/workflows/ByoVnetCI.yml/badge.svg?branch=main)](https://github.com/Azure/AKS-Construction/actions/workflows/ByoVnetCI.yml) | Comprehensive IaC flow deploying multiple smoke-test apps |
| Private cluster | [ByoVnetPrivateCI.yml](https://github.com/Azure/Aks-Construction/blob/main/.github/workflows/ByoVnetPrivateCI.yml) | [ESLZ Byo private vnet](.github/workflows_dep/AksDeploy-ByoVnetPrivate.parameters.json) | [![ByoVNetPrivateCI](https://github.com/Azure/Aks-Construction/actions/workflows/ByoVnetPrivateCI.yml/badge.svg)](https://github.com/Azure/AKS-Construction/actions/workflows/ByoVnetPrivateCI.yml)| A private AKS cluster that deploys a vnet with private link services. |
2021-06-24 19:53:01 +03:00
For a more in depth look at the GitHub Actions used in this project, which steps are performed and the different CI practices they demonstrate, please refer to [this page](docs/GhActions.md).
2022-08-31 22:19:51 +03:00
## Background
2021-09-15 19:13:12 +03:00
This project unifies guidance provided by the [AKS Secure Baseline](https://docs.microsoft.com/azure/architecture/reference-architectures/containers/aks/secure-baseline-aks), [Well Architected Framework](https://docs.microsoft.com/azure/architecture/framework/), [Cloud Adoption Framework](https://azure.microsoft.com/cloud-adoption-framework/) and [Enterprise-Scale](https://github.com/Azure/Enterprise-Scale) by providing tangible artifacts to deploy Azure resources from CLI or CI/CD systems.
2021-09-15 19:13:12 +03:00
2022-09-02 15:20:31 +03:00
This project is part of the official [AKS Landing Zone Accelerator (Enterprise Scale)](https://github.com/Azure/AKS-Landing-Zone-Accelerator) architectural approach. To read more about this project and how the it fits with Enterprise Scale and the AKS Secure Baseline, look [here](referencearchs.md).
2021-06-22 14:42:33 +03:00
2021-09-17 11:10:05 +03:00
## Project Principals
2022-02-09 01:56:35 +03:00
The guiding principal we have with this project is to focus on the the *downstream use* of the project (see [releases](https://github.com/Azure/AKS-Construction/releases)). As such, these are our specific practices.
1. Deploy all components through a single, modular, idempotent bicep template Converge on a single bicep template, which can easily be consumed as a module
2021-09-17 11:10:05 +03:00
2. Provide best-practice defaults, then use parameters for different environment deployments
3. Minimise "manual" steps for ease of automation
4. Maintain quality through validation & CI/CD pipelines that also serve as working samples/docs
5. Focus on AKS and supporting services, linking to other repos to solve; Demo apps / Developer workstations / Jumpboxes / CI Build Agents / Certificate Authorities
2021-06-22 14:42:33 +03:00
## Contributing
If you're interested in contributing, we have two contribution guides in the repo which you should read first.
Guide | Description
----- | -----------
[Generic Contribution Guide](CONTRIBUTING.md) | Talks about the branching strategy, using CodeSpaces and general guidance
Adding support for ETCD encryption with KMS (#351) * various improvements Signed-off-by: Gordonby <gordon.byers@microsoft.com> * kms Signed-off-by: Gordonby <gordon.byers@microsoft.com> * contrib Signed-off-by: Gordonby <gordon.byers@microsoft.com> * KMS working on public kv Signed-off-by: Gordonby <gordon.byers@microsoft.com> * adding support for private kms Signed-off-by: Gordonby <gordon.byers@microsoft.com> * Updating branch to main Signed-off-by: Gordonby <gordon.byers@microsoft.com> * tested and working Signed-off-by: Gordonby <gordon.byers@microsoft.com> * added UI Signed-off-by: Gordonby <gordon.byers@microsoft.com> * Added byoKeyId to the UI Signed-off-by: Gordonby <gordon.byers@microsoft.com> * kms byo key validation Signed-off-by: Gordonby <gordon.byers@microsoft.com> * better error message Signed-off-by: Gordonby <gordon.byers@microsoft.com> * better regex Signed-off-by: Gordonby <gordon.byers@microsoft.com> * regext dot bracket Signed-off-by: Gordonby <gordon.byers@microsoft.com> * better regex still....! (amazing :D ) Signed-off-by: Gordonby <gordon.byers@microsoft.com> * slash dots Signed-off-by: Gordonby <gordon.byers@microsoft.com> * useless-regexp-character Signed-off-by: Gordonby <gordon.byers@microsoft.com> * regex Signed-off-by: Gordonby <gordon.byers@microsoft.com> * byo kms bicep Signed-off-by: Gordonby <gordon.byers@microsoft.com> * UI private link behaviour Signed-off-by: Gordonby <gordon.byers@microsoft.com> * key var conditionality Signed-off-by: Gordonby <gordon.byers@microsoft.com> * metadata Signed-off-by: Gordonby <gordon.byers@microsoft.com> * Add Byo KV RG Signed-off-by: Gordonby <gordon.byers@microsoft.com> * meta Signed-off-by: Gordonby <gordon.byers@microsoft.com> * added ui for rg name Signed-off-by: Gordonby <gordon.byers@microsoft.com> * kms working! Signed-off-by: Gordonby <gordon.byers@microsoft.com> * typos Signed-off-by: Gordonby <gordon.byers@microsoft.com> Signed-off-by: Gordonby <gordon.byers@microsoft.com>
2022-09-21 22:32:50 +03:00
[Helper Contribution Guide](https://github.com/Azure/AKS-Construction/blob/main/docs/ContributingHelper.md) | Talks about the structure of the app and walks through a sample change of adding a new feature to the UI and Bicep
2021-09-17 11:10:05 +03:00
2021-06-22 14:42:33 +03:00
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
## FAQ / Troubleshooting
### Subscription is not registered to use namespace Microsoft.OperationsManagement
Azure Subscriptions use resource providers to be able to create Azure Services. Sometimes it can be the case that core RP's are not properly registered in your subscription. Take time to read the error message, and follow the steps to resolve. [https://docs.microsoft.com/azure/azure-resource-manager/troubleshooting/error-register-resource-provider?tabs=azure-cli](https://docs.microsoft.com/azure/azure-resource-manager/troubleshooting/error-register-resource-provider?tabs=azure-cli)
2021-06-22 14:42:33 +03:00
## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
2021-06-22 14:42:33 +03:00
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.