This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to AKS Cluster | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Flask Application | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-16.04 | |
| steps: | |
| - uses: actions/checkout@v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Login to Azure | |
| az login | |
| #Select the subscription | |
| az account set -s "<SUB_NAME>" | |
| #Create a Resource Group | |
| az group create --location southeastasia --name "ACRBuild-RG" | |
| #Create ACR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| * Author - Kasun Rajapakse | |
| * Script - Get VMs Antimalware not installed | |
| #> | |
| #Get the subscriptions | |
| Write-Host "Getting Subscription Details" -ForegroundColor "Yellow" | |
| Get-AzSubscription | Where-Object {$PSItem.State -eq "Enabled"} | Export-Csv -Path .\subscriptions.csv | |
| #Import the Subscriptions | |
| Write-Host "Importing Subscriptions" -ForegroundColor "Yellow" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| * Author - Kasun Rajapakse | |
| * Script - Get VMs Antimalware not installed | |
| #> | |
| #Get the subscriptions | |
| Write-Host "Getting Subscription Details" -ForegroundColor "Yellow" | |
| Get-AzSubscription | Where-Object {$PSItem.State -eq "Enabled"} | Export-Csv -Path .\subscriptions.csv | |
| #Import the Subscriptions | |
| Write-Host "Importing Subscriptions" -ForegroundColor "Yellow" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Install the latest module | |
| Install-Module -Name Az -Repository PSGallery | |
| #Initialize the following with your resource group and storage account names | |
| $rgname = "LifeCyclePolicy-RG" | |
| $saAccountName = "lifecyclepolicysa" | |
| $location = "southeastasia" | |
| #Create Storage Account | |
| New-AzResourceGroup -Name $rgname -Location $location -Verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| RG_NAME=TF-State-RG | |
| SA_NAME=tfstatekasunsa | |
| CONTAINER_NAME=tfstate | |
| # Create resource group | |
| az group create --name $RG_NAME --location eastus | |
| # Create storage account |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: grafana-ingress | |
| namespace: monitoring | |
| annotations: | |
| kubernetes.io/ingress.class: nginx | |
| cert-manager.io/cluster-issuer: letsencrypt-prod | |
| nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
| spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: cert-manager.io/v1alpha2 | |
| kind: ClusterIssuer | |
| metadata: | |
| name: letsencrypt-prod | |
| namespace: ingress-basic | |
| spec: | |
| acme: | |
| server: https://acme-v02.api.letsencrypt.org/directory | |
| email: <Email> | |
| privateKeySecretRef: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Create Resource Group | |
| $ResourceGroup = (New-AzResourceGroup -Name VM-UpdateMgt -Location "Southeast Asia").ResourceGroupName | |
| #Create ARM Deployment | |
| New-AzResourceGroupDeployment -Name VM-UpdateMgt -ResourceGroupName $ResourceGroup -Mode Incremental -TemplateFile ./azuredeploy.json -TemplateParameterFile ./azuredeploy-parm.json -Verbose | |
| #Configure Update Management | |
| $duration = New-TimeSpan -Hours 2 | |
| $StartTime = (Get-Date "02:00:00").AddDays(5) |