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
# created the service broker via command | |
SECURITY_USER_NAME=<username> | |
SECURITY_USER_PASSWORD=<the password> | |
URL=http://meta-azure-service-broker.<public ip value here>.xip.io | |
cf create-service-broker meta-azure-service-broker $SECURITY_USER_NAME $SECURITY_USER_PASSWORD $URL | |
# enabled service for redis | |
cf enable-service-access azure-rediscache |
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
# The following example assigns the Azure Kubernetes Service Cluster Admin Role to an individual user account. | |
# This is controlled via Azure AD -> Azure AKS (separate from AAD integration with | |
# AKS where someone can assign a user a cluster role | |
# Get the resource ID of your AKS cluster | |
AKS_CLUSTER=$(az aks show --resource-group myResourceGroup --name myAKSCluster --query id -o tsv) | |
# Get the account credentials for the logged in user | |
ACCOUNT_UPN=$(az account show --query user.name -o tsv) |
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: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: prepull | |
spec: | |
selector: | |
matchLabels: | |
name: prepull | |
template: | |
metadata: |
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
# Docker | |
# Build and push an image to Azure Container Registry | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker | |
trigger: | |
- master | |
resources: | |
- repo: self |
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
# get list of nodes | |
kubectl get nodes | |
# beta.kubernetes.io/os=windows | |
# taint | |
nodes=$(kubectl get no \ | |
-o jsonpath="{.items[*].metadata.name}" \ | |
-l=beta.kubernetes.io/os=windows) |
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
rg=apim | |
location=eastus2 | |
vnet=apim-vnet | |
az group create --name $rg --location $location | |
az network vnet create -n $vnet -g $rg -l $location \ | |
--address-prefixes 10.0.0.0/16 \ | |
--subnet-name default \ | |
--subnet-prefixes 10.0.0.0/24 |
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
$resourceGroupName = "myResourceGroup" | |
$scalesetName = "myVMScaleSet" | |
$vmInstanceId = 0 | |
$location = "eastus2" | |
$snapshotName = "vmss_snapshot" | |
# create the snapshot | |
$vmss = Get-AzVmssVM -ResourceGroupName $resourceGroupName -VMScaleSetName $scalesetName -InstanceId $vmInstanceId |
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": "[concat(variables('vmNodeType0Name'),'OMS')]", | |
"properties": { | |
"publisher": "Microsoft.EnterpriseCloud.Monitoring", | |
"type": "MicrosoftMonitoringAgent", | |
"typeHandlerVersion": "1.0", | |
"autoUpgradeMinorVersion": true, | |
"settings": { | |
"workspaceId": "[reference(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspacename')), '2015-11-01-preview').customerId]" |
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
// sourced: https://stackoverflow.com/questions/35902685/service-fabric-stateless-server-custom-udp-listener | |
<?xml version="1.0" encoding="utf-8"?> | |
<ServiceManifest Name="UdpServicePkg" | |
Version="1.0.0" | |
xmlns="http://schemas.microsoft.com/2011/01/fabric" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<ServiceTypes> | |
<!-- This is the name of your ServiceType. |
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
Param( | |
[string]$vstsAccount = "<VSTS-ACCOUNT-NAME>", | |
[string]$projectName = "<PROJECT-NAME>", | |
[string]$releaseDefinitionId = "<RELEASE-ID>", | |
[string]$keepForever = "true", | |
[string]$user = "", | |
[string]$token = "<PERSONAL-ACCESS-TOKEN>" | |
) | |
Write-Verbose "Parameter Values" |