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
import os, zipfile | |
import geopandas as gpd | |
import pandas as pd | |
import shutil | |
project_folder = 'Spain_CartoCity/' | |
extension = '.zip' | |
root_folder = '/Users/Eamon/Google Drive/Python Scripts/merge_CartoCiudad' | |
df_list = [] |
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
#!/usr/bin/env bash | |
#This assumes you are attempting to connect to Azure AKS from outside Azure. | |
#By default Azure doesn't provide any external access or assign an IP address to worker nodes, so this script: | |
#1. Creates a public ip address in the same region as the cluster | |
#2. Associates the ip address with the NIC card attached to the worker VM | |
#Azure creates a separate group for managed clusters e.g. MC_my_cluster_my_cluster_group_my_region | |
#Azure creates node names in the format aks_agentpool_0000000_0 | |
#The respective NIC cards have the same number as the node_number e.g. aks-agentpool-0000000-nic-0 |
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
#!/usr/bin/env bash | |
# this creates a github webhook that gets all events to a repository, useful with Jenkins Blue Ocean | |
service_url="https://my_url" | |
service_port="my_port" | |
organisation="" | |
repository="" | |
git_url="https://api.github.com/repos/${organisation}/${repository}/hooks" | |
auth_token="" # needs to have admin permissions for the repository |
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
myResourceGroup=my-azure-resource-group | |
# To delete VMs: | |
az vm list -o tsv -g $myResourceGroup | | |
awk '{print $7}' | | |
while read line; | |
do az vm delete --resource-group $myResourceGroup --name $line --yes | |
done |
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
VM_USERNAME=azureuser | |
NODE_NAME=aks-nodepool1-47278868-0 | |
CONTAINER_LIFETIME=600 | |
INTERNAL_IP=$(kubectl get nodes --selector=kubernetes.io/hostname=$NODE_NAME -o json | jq .items[0].status.addresses[0].address --raw-output) | |
DEPLOYMENT_NAME=aksssh | |
LABELS="app=aksssh" | |
kubectl run $POD_NAME --image=debian --labels=$LABELS --command sleep $CONTAINER_LIFETIME | |
sleep 60 | |
POD_NAME=$(kubectl get po --selector=$LABELS -o json | jq .items[0].metadata.name --raw-output) | |
kubectl exec $POD_NAME -- apt-get update |