Skip to content

Instantly share code, notes, and snippets.

View resume.json
{
"meta": {
"theme": "kendall"
},
"basics": {
"name": "Matt Mencel",
"label": "Cloud Automation Engineer - SRE",
"email": "matt@techminer.net",
"phone": "(309) 333-6056",
"website": "https://medium.com/@matt_89326",
@MattMencel
MattMencel / kustomize_manifest.yaml
Created Sep 30, 2020
azdo-pipeline-template kustomize manifest
View kustomize_manifest.yaml
apiVersion: v1
kind: Namespace
metadata:
labels:
azure-key-vault-env-injection: enabled
name: azure-pipelines-agent
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
@MattMencel
MattMencel / azure_postgres_restore.md
Last active Feb 13, 2020
Azure Postgres Database Restores
View azure_postgres_restore.md

Azure Postgres Database Restore

Steps

Remove the AAD Group from the original DB instance

There is a problem (bug?) where Azure won't let you do a point-in-time restore of a postgres server if an AAD account or group is assigned as an admin.

Do this from the portal.

@MattMencel
MattMencel / Terraform-Plan-Steps.yml
Last active Sep 27, 2019
Azure CLI Tasks to Authenticate with an SPN
View Terraform-Plan-Steps.yml
- task: AzureCLI@1
displayName: 'Setup Authentication'
inputs:
azureSubscription: '$(SUBSCRIPTION_NAME)'
addSpnToEnvironment: true
scriptLocation: inlineScript
failOnStandardError: 'true'
inlineScript: |
echo "##vso[task.setvariable variable=ARM_SUBSCRIPTION_ID]$(az account show --query="id" -o tsv)"
echo "##vso[task.setvariable variable=ARM_CLIENT_ID]${servicePrincipalId}"
@MattMencel
MattMencel / disk_response.json
Last active Mar 19, 2019
Azure API Compute Resource SKU Responses
View disk_response.json
{
"resourceType": "disks",
"name": "Standard_LRS",
"tier": "Standard",
"size": "S4",
"locations": [
"centralus"
],
"locationInfo": [
{
@MattMencel
MattMencel / init.fish
Created Jan 30, 2019
Fish Shell Config
View init.fish
#~/.config/omf/init.fish
set -g theme_display_k8s_context yes
set -g theme_display_ruby no
set -g theme_display_user yes
set -g theme_display_hostname yes
set -g theme_powerline_fonts no
set -g theme_nerd_fonts yes
set -g theme_newline_cursor yes
@MattMencel
MattMencel / Publish-Terraform-Artifact.yml
Created Jan 9, 2019
Publish Terraform Artifact Template
View Publish-Terraform-Artifact.yml
steps:
- script: |
echo "Compressing $(terraform.path) directory..."
tar -czf $(state.key).tar.gz -C $(terraform.path) .
displayName: 'Compress $(terraform.path) Artifact'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: $(state.key).tfplan'
inputs:
PathtoPublish: '$(state.key).tar.gz'
@MattMencel
MattMencel / azure-deploy-vsts.yml
Created Jan 7, 2019
Deploy VSTS Agent to AKS Cluster with Helm
View azure-deploy-vsts.yml
resources:
- repo: self
clean: true
queue:
name: Hosted Ubuntu 1604
trigger:
batch: true
branches:
include:
- master
@MattMencel
MattMencel / DEV-TF-plan.yml
Last active Feb 13, 2019
Terraform Plans with Azure DevOps - Part 2
View DEV-TF-plan.yml
steps:
- task: JamiePhillips.Terraform.TerraformTool.TerraformTool@0
displayName: 'Use Terraform $(terraform.version)'
inputs:
version: '$(terraform.version)'
- script: |
az login --service-principal -u $(SPN-ID) -p $(SPN-SECRET) --tenant $(TENANT-ID)
ACCESS_KEY=`az storage account keys list -n $(STORAGE_ACCT) -o json | jq -r '.[0].value'`
echo "##vso[task.setvariable variable=ACCESS_KEY]$ACCESS_KEY"
@MattMencel
MattMencel / azure-pipelines.yml
Last active Jan 9, 2019
Terraform Plans with Azure DevOps - Part 1
View azure-pipelines.yml
name: $(BuildDefinitionName).$(DayOfYear)$(Rev:.r)
resources:
repositories:
- repository: Templates
type: git
name: Templates
pool:
name: Terraform Agents
trigger:
batch: true
You can’t perform that action at this time.