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
resource "azurerm_user_assigned_identity" "cluster" { | |
location = azurerm_resource_group.example.location | |
name = "aks-cluster-identity-${var.cluster_uid}" | |
resource_group_name = azurerm_resource_group.example.name | |
} | |
resource "azurerm_user_assigned_identity" "kubelet" { | |
location = azurerm_resource_group.example.location | |
name = "aks-kubelet-identity-${var.cluster_uid}" | |
resource_group_name = azurerm_resource_group.example.name |
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 | |
# Wait for cloud-init to finish | |
while [ ! -f /tmp/cloud-init-done ]; do echo 'Waiting for cloud-init to complete.';sleep 5; done | |
ssh -o "StrictHostKeyChecking no" $USER@$CONTROL_HOST 'sudo cp /etc/rancher/k3s/k3s.yaml ~/;sudo chown $USER:$USER k3s.yaml' | |
mkdir .kube | |
scp -o "StrictHostKeyChecking no" $USER@$CONTROL_HOST:~/k3s.yaml ./.kube/config | |
chmod 640 ~/.kube/config | |
sed -i 's/127.0.0.1/'$CONTROL_HOST'/g' ./.kube/config |
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
# To enable ssh & remote debugging on app service change the base image to the one below | |
FROM mcr.microsoft.com/azure-functions/dotnet:3.0-appservice | |
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ | |
AzureFunctionsJobHost__Logging__Console__IsEnabled=true | |
# skip installing gem documentation | |
RUN set -eux; \ | |
mkdir -p /usr/local/etc; \ | |
{ \ |
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
# Lookup TZ | |
timedatectl list-timezones | |
# Set TZ | |
sudo timedatectl set-timezone America/Toronto |
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
target_fqdns = [ | |
"azure.archive.ubuntu.com", | |
"security.ubuntu.com", | |
] |
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
git clone https://github.com/powerline/fonts.git --depth=1 | |
cd fonts | |
.\install.ps1 | |
cd .. | |
rd /S /Q fonts |
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
168.63.129.16 |
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
trigger: | |
- master | |
variables: | |
- group: akv-credentials | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: |
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
module "subnet" { | |
source = "./subnet_module.tf" | |
} | |
resource "azurerm_virtual_machine" "some_name" { | |
... | |
depends_on = module.subnet | |
subnet_id = module.subnet.id | |
} |
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
function batcherize(batchSize, unbatchedData) { | |
const batchedData = []; | |
const batchNumber = Math.ceil(unbatchedData.length/batchSize) | |
for (let batchIndex = 0; batchIndex < batchNumber; batchIndex++) { | |
const currentBatchPosition = (batchIndex * batchSize); | |
const currentBatchOffset = currentBatchPosition + (batchSize); | |
const currentBatchData = unbatchedData.slice(currentBatchPosition, currentBatchOffset); | |
batchedData.push(currentBatchData); |
NewerOlder