changeset 5:580221a17890

comment out a lot not needed for vmss
author Henry S. Thompson <ht@markup.co.uk>
date Fri, 28 Sep 2018 17:15:05 +0000
parents 56d8823c68e0
children a3b30e707e83
files master/bin/makeWorker.sh master/bin/setupTemplate.sh workers/bin/installInTemplate.sh workers/bin/setupTemplate.sh
diffstat 4 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/master/bin/makeWorker.sh	Fri Sep 28 15:18:07 2018 +0000
+++ b/master/bin/makeWorker.sh	Fri Sep 28 17:15:05 2018 +0000
@@ -1,5 +1,7 @@
-#!/usr/bin/bash
+#!/bin/bash
 # Usage . makeWorker.sh name
+# Misnamed -- it assumes you've already done
+# az vm create -n [name] -g cc --image Debian --size Standard_...
 # Source this to get the worker name set to its IP address
 name=$1
 ip=$(az vm list-ip-addresses -g cc -n $name|egrep -o '"ipAddress": ".*"' | cut -f 2 -d ' ' | tr -d \")
--- a/master/bin/setupTemplate.sh	Fri Sep 28 15:18:07 2018 +0000
+++ b/master/bin/setupTemplate.sh	Fri Sep 28 17:15:05 2018 +0000
@@ -1,6 +1,7 @@
-#!/usr/bin/bash
+#!/bin/bash
 ip=$1
-ssh -o StrictHostKeyChecking=no $ip </var/cc/workers/bin/setupTemplate.sh
-ssh $ip "sudo su -c 'cd ~/.ssh && cat >authorized_keys' cc" < /var/cc/ak
-ssh $ip </var/cc/workers/bin/installInTemplate.sh | tee /dev/stderr | tail -1 | sudo tee -a ~cc/.ssh/authorized_keys >/dev/null 
-( cd ~ && tar -czf - .azure ) | ssh cc@$ip "tar -xzf -"
+#ssh -o StrictHostKeyChecking=no $ip </var/cc/workers/bin/setupTemplate.sh
+# Not necessary as will happen automatically in vmss setup if/when run from cc
+# ssh -o StrictHostKeyChecking=no $ip "sudo su -c 'cd ~/.ssh && cat >authorized_keys' cc" < /var/cc/ak
+ssh -o StrictHostKeyChecking=no $ip </var/cc/workers/bin/installInTemplate.sh # | tee /dev/stderr | tail -1 | sudo tee -a ~cc/.ssh/authorized_keys >/dev/null 
+#( cd ~ && tar -czf - .azure ) | ssh cc@$ip "tar -xzf -"
--- a/workers/bin/installInTemplate.sh	Fri Sep 28 15:18:07 2018 +0000
+++ b/workers/bin/installInTemplate.sh	Fri Sep 28 17:15:05 2018 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/bash
+#!/bin/bash
 sudo apt-get -y install python3 parallel psmisc jq mercurial curl
 curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
 echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jessie main" |\
@@ -6,4 +6,4 @@
 sudo apt-get -y --force-yes install apt-transport-https
 sudo apt-get -y update
 sudo apt-get -y install azure-cli
-sudo cat ~cc/.ssh/id_rsa.pub
+#sudo cat ~cc/.ssh/id_rsa.pub
--- a/workers/bin/setupTemplate.sh	Fri Sep 28 15:18:07 2018 +0000
+++ b/workers/bin/setupTemplate.sh	Fri Sep 28 17:15:05 2018 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/bash
+#!/bin/bash
 sudo adduser --disabled-password --GECOS "CC worker" cc
 sudo su cc
 cd ~cc