Last active
June 5, 2020 22:43
-
-
Save brucedkyle/36beabccd209df6ebf440306ffbdc8c3 to your computer and use it in GitHub Desktop.
Set up Azure tooling
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
# Set the root path for extensions | |
code --extensions-dir <dir> | |
# List the installed extensions. | |
code --list-extensions | |
# Install extension | |
code --install-extension (<extension-id> | <extension-vsix-path>) | |
# Uninstalls an extension. | |
code --uninstall-extension (<extension-id> | <extension-vsix-path>) |
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
az aks get-credentials --resource-group $RESOURCEGROUPNAME --name $AKSCLUSTERNAME | |
kubectl get nodes |
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
powershell -command "(Get-Variable PSVersionTable -ValueOnly).PSVersion" |
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
az aks install-cli |
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
#Requires -Version 7.0 | |
#Requires -Modules PowerShellGet | |
# you may need to agree to accepts signed PowerShell modules | |
Set-ExecutionPolicy -ExecutionPolicy AllSigned | |
# From https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 | |
if ($PSVersionTable.PSEdition -eq 'Desktop' -and (Get-Module -Name AzureRM -ListAvailable)) { | |
Write-Warning -Message ('Az module not installed. Having both the AzureRM and ' + | |
'Az modules installed at the same time is not supported.') | |
} else { | |
Install-Module -Name Az -AllowClobber -Scope CurrentUser -Force | |
Install-Module -Name Az.Blueprint -Scope CurrentUser -Force | |
Install-Module -Name Az.Security -Scope CurrentUser -Force | |
Install-Module -Name Az.OperationalInsights -Scope CurrentUser -Force | |
Install-Module -Name Az.Network -Scope CurrentUser -Force | |
Install-Module -Name azuread -Scope CurrentUser -Force | |
} |
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
### Adapted from https://www.thomasmaurer.ch/2019/05/how-to-install-azcopy-for-azure-storage/ | |
$destimationPath = [Environment]::GetFolderPath("MyDocuments") | |
#Download AzCopy | |
Invoke-WebRequest -Uri "https://aka.ms/downloadazcopy-v10-windows" -OutFile AzCopy.zip -UseBasicParsing | |
#Curl.exe option (Windows 10 Spring 2018 Update (or later)) | |
# curl.exe -L -o AzCopy.zip https://aka.ms/downloadazcopy-v10-windows | |
#Expand Archive | |
Expand-Archive ./AzCopy.zip ./AzCopy -Force | |
#Move AzCopy to the destination you want to store it | |
New-Item -ItemType directory -Path $destimationPath\Azure\AzCopy | |
Get-ChildItem ./AzCopy/*/azcopy.exe | Move-Item -Destination $destimationPath\Azure\AzCopy\AzCopy.exe | |
#Add your AzCopy path to the Windows environment PATH using PowerShell: | |
Set-Item -Path Env:Path -Value ($Env:Path + ";" + $destimationPath + "\Azure\AzCopy") | |
$env:Path -split ';' |
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
curl -L https://aka.ms/InstallAzureCli | bash |
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
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi |
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
sudo apt install git-all |
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
# for Ubuntu 14 and above | |
sudo apt-get install jq |
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
# Update the packages index and install the dependencies | |
sudo apt update | |
sudo apt install software-properties-common apt-transport-https wget | |
# Import the Microsoft GPG key | |
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - | |
# Enable the Visual Studio Code repository | |
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | |
# Install the latest version of Visual Studio Code with: | |
sudo apt update | |
sudo apt install code |
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
Get-AzResourceProvider -ListAvailable | Select-Object ProviderNamespace, RegistrationState |
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
az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table |
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
az login |
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
Register-AzResourceProvider -ProviderNamespace Microsoft.Batch |
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
az provider register --namespace Microsoft.Batch |
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
# Connect to Azure with a browser sign in token | |
Connect-AzAccount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment