# HG changeset patch # User Henry S. Thompson # Date 1541022154 0 # Node ID cc065b2a25436409f3e787ed7e2e61bd721ddad1 # Parent 60d4042dab261a798e013de75455da2eb9f7abcf more tweaks wrt getting H4 going diff -r 60d4042dab26 -r cc065b2a2543 master/bin/setupTemplate.sh --- a/master/bin/setupTemplate.sh Mon Oct 22 10:04:12 2018 +0000 +++ b/master/bin/setupTemplate.sh Wed Oct 31 21:42:34 2018 +0000 @@ -1,7 +1,5 @@ #!/bin/bash ip=$1 -#ssh -o StrictHostKeyChecking=no $ip authorized_keys' cc" < /var/cc/ak ssh -o StrictHostKeyChecking=no $ip /dev/null ( cd ~ && tar -czf - .azure ) | ssh $ip "tar -xzf -" +ssh -o StrictHostKeyChecking=no $ip "sudo su -c 'cd ~/.ssh && cat >authorized_keys' cc" < /var/cc/ak diff -r 60d4042dab26 -r cc065b2a2543 workers/bin/installInTemplate.sh --- a/workers/bin/installInTemplate.sh Mon Oct 22 10:04:12 2018 +0000 +++ b/workers/bin/installInTemplate.sh Wed Oct 31 21:42:34 2018 +0000 @@ -1,4 +1,7 @@ #!/bin/bash +sudo mkdir /var/data +sudo mount -t tmpfs -o size=8g tmpfs /var/data +sudo chmod og+w /var/data 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,9 +9,20 @@ sudo apt-get -y --force-yes install apt-transport-https sudo apt-get -y update sudo apt-get -y install azure-cli -sudo adduser --disabled-password -GECOS "CC master" cc if [ ! -d ~cc/.ssh ] then + if [ ! -d ~cc ] + then + sudo adduser --disabled-password --GECOS "CC master" cc + fi sudo su -c 'ssh-keygen -t rsa -N "" -f /home/cc/.ssh/id_rsa' cc + echo "$1" >> /home/cc/.ssh/authorized_keys + sudo su -c 'mkdir bin' cc + sudo su -c 'sed "5i # Unless login (in which case .profile will have done this), add ~/bin to PATH\ + case $- in\ + *l*) ;;\ + *) export PATH=/home/cc/bin:$PATH ;;\ + esac\ +"' cc fi sudo cat ~cc/.ssh/id_rsa.pub