From dbe2a1d8dadf100dfb6a83295fd67010b266d02f Mon Sep 17 00:00:00 2001
From: Recolic <git@me.recolic.net>
Date: Fri, 31 Jan 2025 15:32:55 -0800
Subject: [PATCH] .

---
 fish-config/config.fish | 3 ++-
 mymsbin/azvm-deploy.sh  | 1 +
 srv-deps/azv-plugin-slb | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fish-config/config.fish b/fish-config/config.fish
index 5756a0e..3b95ef3 100644
--- a/fish-config/config.fish
+++ b/fish-config/config.fish
@@ -12,7 +12,7 @@ set -gx EDITOR vim
 # Microsoft PAT and git-credentials
 if test $hostname = RECOLICMPC ; or test $hostname = RECOLICPC
     # Must use --no-config to avoid infinite loop
-    set -gx pat (env DONT_REGEN_EXPIRED_TOKEN=1 fish --no-config /usr/mymsbin/patnew.fish)
+    set -gx pat (env DONT_REGEN_EXPIRED_TOKEN=1 fish --no-config $HOME/ms-scripts/patnew.fish)
     and begin
         set -gx devops_header "Authorization: Basic "(printf ":%s" "$pat" | base64 -w0)
         echo "https://bensl:$pat@msazure.visualstudio.com" > ~/.git-credentials
@@ -36,6 +36,7 @@ set -gx PATH $GOPATH/bin $PATH
 type thefuck > /dev/null 2>&1 ; and thefuck --alias shit | source
 
 set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
+set -gx NugetMachineInstallRoot /mnt/windows_pkgs
 
 # fundle plugin 'tuvistavie/fish-ssh-agent'
 # if status --is-login
diff --git a/mymsbin/azvm-deploy.sh b/mymsbin/azvm-deploy.sh
index 3f39f8a..756104d 100755
--- a/mymsbin/azvm-deploy.sh
+++ b/mymsbin/azvm-deploy.sh
@@ -126,6 +126,7 @@ for cter in $(seq $vmcount); do
 
     # Clear these args for only 1st VM
     [ "$cter" -ge "$only_n_vms_in_tip" ] && vm_create_xtra_arg_first_n=()
+    [ "$cter" -ge "$only_n_vms_in_tip" ] && vmsize=Standard_E4_v4
 done
 
 call_if_any plugin_after_vm_creat
diff --git a/srv-deps/azv-plugin-slb b/srv-deps/azv-plugin-slb
index 5573454..fd9aa79 100755
--- a/srv-deps/azv-plugin-slb
+++ b/srv-deps/azv-plugin-slb
@@ -11,7 +11,8 @@ Extra Optional Args:
   outbound_ports_per_vm (default value = 1000)
 
 Note:
-  SLB will redirect public_ip:8888 to ANY RANDOM VM:22, so it's recommended to only create 1 VM, or manually create inbound-nat-rule on azure portal.
+  SLB will redirect public_ip:8888 to ANY RANDOM VM:22, so it's recommended to only create 1 VM.
+  inbound-nat-rule is not reliable even if manually created on azure portal.
 "
     # TODO: move this to other doc
     echo "-----BEGIN PGP MESSAGE-----
@@ -48,7 +49,7 @@ function plugin_after_vm_creat () {
     var_default_val outbound_ports_per_vm 1000
     debugexec az network lb create --resource-group $resgrp --name $LB_NAME --sku Standard --frontend-ip-name $FE_IP --backend-pool-name $BE_PL --vnet-name $vnetname || exit
     debugexec az network lb address-pool update -g $resgrp --lb-name $LB_NAME -n $BE_PL --vnet $vnetname --backend-addresses "[{name:addr1,ip-address:10.0.0.4}]" || exit
-    # TODO: The correct way to redirect PUBLIC:4022 to VM1:22. But azure-cli cannot associate nat-rule to machine. So it doesn't work.
+    # TODO: The correct way to redirect PUBLIC:4022 to VM1:22. But azure-cli cannot associate nat-rule to machine. Even if u manually created one on az portal, it will de-associate after some time.
     # debugexec az network lb inbound-nat-rule create --resource-group $resgrp --lb-name $LB_NAME  --name nat_rule_nt --protocol Tcp --frontend-port 4022 --backend-port 22 --frontend-ip-name $FE_IP || exit
     # Warning: outbound-rule + lb-rule = outbound internet access
     debugexec az network lb outbound-rule    create --resource-group $resgrp --lb-name $LB_NAME --name MyOutboundRule --protocol All --idle-timeout 4 --frontend-ip-configs $FE_IP --address-pool $BE_PL --outbound-ports $outbound_ports_per_vm || exit
-- 
GitLab