-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup-azure-tools.sh
61 lines (48 loc) · 1.92 KB
/
setup-azure-tools.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
### List of preferred tools ###
### Install PowerShell Core https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7#ubuntu-1804
# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of products
sudo apt-get update
# Enable the "universe" repositories
sudo add-apt-repository universe
### Install AZ CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
# Install PowerShell
sudo apt-get install -y powershell
# Start PowerShell
pwsh
# Install Azure PowerShell
Install-Module -Name Az -AllowClobber -Scope CurrentUser
# Update Azure PowerShell
# Install-Module -Name Az -AllowClobber -Force
### Install Azure AD (Note: Not compatible with linux yet)
# Install-module AzureAD -Verbose
# Optional Workaround
# Register-PackageSource -Trusted -ProviderName 'PowerShellGet' -Name 'Posh Test Gallery' -Location https://www.poshtestgallery.com/api/v2/
# Install-Module -Name AzureAD.Standard.Preview
## Azure Resource Graph
# Add the Resource Graph extension to the Azure CLI environment
az extension add --name resource-graph
az extension list
az graph query -q 'Resources | project name, type | limit 5' -o table
### Install or Update Git
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
git --version
# bash-completion package
sudo apt install bash-completion
### Install Homebrew package manager
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
brew hey #verify
# jq
sudo apt install jq
# xclip
sudo apt xclip
# display ssh key
cat ~/.ssh/id_rsa.pub