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
# Download and install specific version of Terraform - adjust dowload version as needed | |
sudo apt-get install unzip | |
wget https://releases.hashicorp.com/terraform/1.0.8/terraform_1.0.8_linux_amd64 | |
unzip terraform_1.0.8_linux_amd64.zip | |
sudo install terraform /usr/local/bin/ | |
terraform --version |
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
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: sampleapp | |
spec: | |
selector: | |
matchLabels: | |
app: sampleapp | |
replicas: 1 | |
template: |
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 yum remove packages-microsoft-prod-1.0-1.el7.noarch | |
sudo yum clean all | |
sudo rm -rf /var/cache/yum | |
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm | |
sudo yum install blobfuse -y |
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
# After updating Azure VM DNS via Portal or Terraform you need to ensure they are applied | |
# DNS check CentOS | |
# Get connection name | |
nmcli device | |
# Check connection specific DNS | |
nmcli -f IP4.DNS connection show "Wired connection 1" | |
# Restart NetworkManager (required for connection to pick up new DNS servers) | |
sudo systemctl restart NetworkManager | |
# DNS check Ubuntu |
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 add an ssh key from putty to authorized_keys | |
ssh-keygen -i -f ssh2.pub > openssh.pub |
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
# https://www.linuxtechi.com/extend-lvm-partitions/ | |
df -h /home/ | |
sudo lvextend -L +31.50G /dev/mapper/rootvg-homelv | |
sudo resize2fs /dev/mapper/rootvg-homelv |
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
# Make sure to run Connect-AzAccount first | |
$Subscription = "SUBSCRIPTION_NAME" | |
$Location = "REGION_NAME" | |
$ResourceGroup = "RESOURCE_GROUP_NAME" | |
Set-AzContext -SubscriptionName $Subscription | Out-Null | |
$TotalCores = $null | |
$TotalWorkers = (Get-AzVM -ResourceGroupName $ResourceGroup -Status | Where-Object { ( | |
$_.ProvisioningState -eq "Succeeded" ) }) | |
foreach ($Worker in $TotalWorkers) { |
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
cat <<EOF > ~/.bash_aliases | |
# To set permanent bash aliases create/change ~/.bash_aliases | |
# And refer to .bash_aliases in .bashrc | |
alias k='kubectl' | |
alias kc='k config view --minify | grep name' | |
alias kdp='k describe pod' | |
alias kd='k describe pod' | |
alias ke='k explain' | |
alias kf='k create -f' | |
alias kg='k get pods --show-labels' |
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
# https://docs.microsoft.com/en-us/azure/virtual-machines/linux/resize-os-disk-gpt-partition | |
# LVM Linux (RHEL/CentOS) | |
# Confirm partition type (MBR/GPT) | |
parted | |
# Check available space | |
sudo pvs | |
# Identify LV for / - e.g. sda2 rootvg-rootlv | |
lsblk -f | |
# Check available space within VG | |
vgdisplay rootvg |
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
# Check WT version | |
wt --version |