Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow documentation #519

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ByoVnetCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ jobs:
CostEstimate:
needs: [ReusableWF, Validation]
if: github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'test-deploy-byoconfig')
uses: TheCloudTheory/arm-estimator/.github/workflows/estimateFromUrl.yml@main
#uses: Gordonby/arm-estimator/.github/workflows/estimateFromUrl.yml@gb-workflowpolish
uses: TheCloudTheory/arm-estimator/.github/workflows/[email protected]
with:
rg: ${{ needs.ReusableWF.outputs.RG }}
environment: ${{needs.ReusableWF.outputs.Environment}}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ByoVnetPrivateCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,12 @@ jobs:
CostEstimate:
needs: [ReusableWF]
if: github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'test-deploy-privateconfig')
uses: TheCloudTheory/arm-estimator/.github/workflows/estimateFromUrl.yml@main
#uses: Gordonby/arm-estimator/.github/workflows/estimateFromUrl.yml@gb-workflowpolish
uses: TheCloudTheory/arm-estimator/.github/workflows/[email protected]
with:
rg: ${{ needs.ReusableWF.outputs.RG }} #Automation-Actions-AksDeployCI #'${{ env.RG }}' There seems to be an issue passing Env variables in reusable workflows
environment: ${{needs.ReusableWF.outputs.Environment}}
aceVersion: 1.1-beta2
templateFileURL: https://github.com/Azure/AKS-Construction/releases/download/${{ needs.ReusableWF.outputs.LatestAkscVersionTag }}/main.json
#templateParamFileURL: ${{ needs.ReusableWF.outputs.ParamFilePath }}
templateParamFileURL: https://raw.githubusercontent.com/Azure/AKS-Construction/${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}/${{ needs.ReusableWF.outputs.ParamFilePath }}

secrets:
Expand Down
30 changes: 30 additions & 0 deletions samples/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Workflow docs

The AKS Construction repository uses GitHub action workflows extensively, in particular we use reusable workflows to expose common reusable workflows that can be leveraged from your own workflows.

In this section of the samples, various features and workflow jobs will be explained.

## Infrastructure Workflows

### InfraCI - Starter cluster

This workflow is one of the simplest for showing the fundamental steps of a IaC workflow.

1. Validation
1. Infra Deployment
1. App Deployment (smoke test)
1. Infra Cleanup/Destruction

## Reusable Workflows

Workflow | Purpose | Sample
-------- | ------- | ------
Deploy | Deploys AKSC infrastructure with minimal inputs |
Troubleshooting | |
CleanUp | Iterates over a resource group and removes all resources

## Job Showcase

Job | Purpose | Sample
--- | ------- | ------
Azure Cost Estimate | Estimates the monthly cost of an Azure Deployment | [sample](azureCostEstimator.md)
12 changes: 12 additions & 0 deletions samples/workflows/azureCostEstimator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ACE (Azure Cost Estimator)

[ACE](https://github.com/TheCloudTheory/arm-estimator) is a project created by Microsoft MVP [Kamil Mrzygłód](https://github.com/kamil-mrzyglod). It provides a mechanism to take a bicep/arm file with parameters and provide an estimated monthly cost of the deployment.

AKS Construction leverages ACE in two of the deployment workflows to showcase more advanced Infrastructure as Code practices that can be incorporated into workflows.

## The output

In addition to the job output, we persist a json file as an artifact. We could choose to query the costs and fail the workflow if the cost was too high.

## Adding the workflow