This file contains 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
{{range $i, $id := .availability_zone_names.value}} | |
apiVersion: kops.k8s.io/v1alpha2 | |
kind: InstanceGroup | |
metadata: | |
creationTimestamp: null | |
labels: | |
kops.k8s.io/cluster: {{$.cluster_name.value}} | |
name: master-{{.}} | |
spec: | |
image: kope.io/k8s-1.15-debian-stretch-amd64-hvm-ebs-2020-01-17 |
This file contains 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: kops.k8s.io/v1alpha2 | |
kind: Cluster | |
metadata: | |
creationTimestamp: null | |
name: {{.cluster_name.value}} | |
spec: | |
api: | |
loadBalancer: | |
type: Internal | |
authorization: |
This file contains 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
[cmdletbinding()] | |
Param ( | |
[Parameter(Mandatory=$true)] | |
$apimServiceName, | |
[Parameter(Mandatory=$true)] | |
$resourceGroupName, | |
[Parameter(Mandatory=$true)] | |
$location, | |
[Parameter(Mandatory=$true)] | |
$organisation, |
This file contains 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
#this scripts will create keyvault, assign permissions to users, apps, and groups. | |
#pipeline service principal App ObjectID will be assigned list,get and set permissions. | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true)]$location, | |
[Parameter(Mandatory=$true)]$resourceGroupName, | |
[Parameter(Mandatory=$true)]$keyVaultName, | |
[Parameter(Mandatory=$true)]$secretName, |
This file contains 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
# Downloads the Visual Studio Team Services Build Agent and installs on the new machine | |
# and registers with the Visual Studio Team Services account and build agent pool | |
# Enable -Verbose option | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true)]$VSTSAccount, | |
[Parameter(Mandatory=$true)]$PersonalAccessToken, | |
[Parameter(Mandatory=$true)]$AgentName, | |
[Parameter(Mandatory=$true)]$PoolName |
This file contains 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
# Downloads the Visual Studio Team Services Build Agent and installs on the new machine | |
# and registers with the Visual Studio Team Services account and build agent pool | |
# Enable -Verbose option | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory = $true)]$VSTSAccount, | |
[Parameter(Mandatory = $true)]$PersonalAccessToken, | |
[Parameter(Mandatory = $true)]$AgentName, | |
[Parameter(Mandatory = $true)]$PoolName, |
This file contains 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
<# | |
.SYNOPSIS | |
Wrapper script for get all the VM's in all RG's or subscription level and then Start or Stop all valid required VMs in loop | |
.DESCRIPTION | |
This runbook is intended to start/stop VMs (ARM based VMs) that resides in a given list of Azure resource group(s).If the resource group list is empty, then the script gets all the VMs in the current subscription. | |
Upon completion of the runbook, an option to email results of the started VM can be sent via SendGrid account. | |
This runbook requires the Azure Automation Run-As (Service Principle) account, which must be added when creating the Azure Automation account. | |
.EXAMPLE | |
.\start_stop_VM.ps1 -Action "Value1" -WhatIf "False" |
This file contains 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 | |
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
echo $1, $2, $3, $4, $5, $6 | |
if [ ! -e $6/.configure ]; then | |
touch $6/.configure | |
fi | |
if [ ! -e $6/.token ]; then | |
touch $6/.token |
This file contains 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
FROM microsoft/vsts-agent:ubuntu-16.04-docker-17.12.0-ce | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | |
RUN apt-get install -y nodejs | |
RUN node -v | |
RUN apt-get update | |
RUN apt-get install -y wget | |
RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb | |
RUN dpkg -i packages-microsoft-prod.deb |
This file contains 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 | |
#Provide VSTS account name NOT the FULL URL | |
export VSTS_ACCOUNT=abc-example-dev | |
#Provide the PAT value | |
export VSTS_TOKEN=izpcivnfdfgdgd7gawylkjllw255yvgmoe4qtc4fxqg2mtprx4oyutretjxdpcgp5nvq | |
#The build agent will be ubuntu hostname appended with word agent | |
export VSTS_AGENT='$(hostname)-agent' | |
#Provide the POOL name for agent | |
export VSTS_POOL="Self-Hosted Linux Agent" | |
#provide the path where the agent will install and run, home for the agent |