Skip to content

Instantly share code, notes, and snippets.

View cwoolum's full-sized avatar

Chris Woolum cwoolum

View GitHub Profile
@cwoolum
cwoolum / BootstrapAgent.ps1
Last active October 20, 2017 17:56
Using this you can create a brand new build agent for VSTS
Write-Output "Running config with subdomain $Env:VSTS_SUBDOMAIN and token $Env:VSTS_PATTOKEN"
./config.cmd --unattended --url "https://$Env:VSTS_SUBDOMAIN.visualstudio.com" --auth PAT --token $Env:VSTS_PATTOKEN --pool default
./run.cmd
@cwoolum
cwoolum / carramrod.bas
Created April 20, 2018 17:44
Frogger in BASIC
1000 REM Frogger
1020 REM ------------------------
1030 CLS
1040 PRINT "=== Frogger ==="
1050 PRINT "UP: W"
1070 PRINT "LEFT: A"
1080 PRINT "RIGHT: S"
1081 LET I = 960
1082 LET X = 24
@cwoolum
cwoolum / commonbuild.yml
Last active December 3, 2018 19:44
YAML builds in Azure Pipelines
parameters:
services: []
jobs:
- job: Build
pool:
name: Hosted Ubuntu 1604
steps:
- task: Docker@1
@cwoolum
cwoolum / build.yml
Last active December 3, 2018 19:46
resources:
repositories:
- repository: templates
type: git
name: BuildTemplates
trigger:
branches:
include:
- master
{
"rulesDirectory": ["@ionic/v4-migration-tslint/rules"],
"rules": {
"ion-action-sheet-method-create-parameters-renamed": true,
"ion-alert-method-create-parameters-renamed": true,
"ion-datetime-capitalization-changed": true,
"ion-item-option-method-get-sliding-percent-renamed": true,
"ion-overlay-method-create-should-use-await": true,
"ion-overlay-method-present-should-use-await": true,
"ion-back-button-not-added-by-default": { "options": [true], "severity": "warning" },
@cwoolum
cwoolum / configure.sh
Last active January 6, 2019 18:54
AKS-Deploy Part 2
resourceGroupName="rg-$envName"
echo "Creating Resource Group"
az group create -l westus -n $resourceGroupName
echo "Creating VNet"
az network vnet create \
--resource-group $resourceGroupName \
--name vnet-api-$envName \
--address-prefixes 10.0.0.0/8 \
@cwoolum
cwoolum / configure.sh
Last active January 6, 2019 19:01
AKS-Deploy Part 3
spPass="$(openssl rand -base64 30)"
echo "Creating Service Principal"
spId="$(az ad sp create-for-rbac --name sp-kube-api-$envName --password $spPass --skip-assignment --query appId --output tsv)"
echo "Setting permissions for Service Principal on VNet"
az role assignment create --assignee $spId --scope $vNetResourceId --role Contributor
echo "Creating AKS Cluster"
az aks create \
--resource-group $resourceGroupName \
--name kube-api-$envName \
--node-count 2 \
--node-vm-size Standard_A2_v2 \
--enable-addons monitoring \
--network-plugin azure \
--service-cidr 10.0.0.0/16 \
--dns-service-ip 10.0.0.10 \
@cwoolum
cwoolum / helm-rbac.yaml
Last active January 6, 2019 19:19
AKS-Deploy Part 5
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: contoso-cluster-admins
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
@cwoolum
cwoolum / tear-down.sh
Created January 6, 2019 19:29
AKS-Teardown
echo Enter the name of the environment you would like to delete
read envName
echo "Deleting Resource Group"
az group delete --name rg-$envName
echo "Deleting Service Principal"
az ad sp delete --id http://sp-kube-api-$envName