Mercurial > hg > cc > azure
changeset 23:cc065b2a2543
more tweaks wrt getting H4 going
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Wed, 31 Oct 2018 21:42:34 +0000 |
parents | 60d4042dab26 |
children | b4e3beb2227e |
files | master/bin/setupTemplate.sh workers/bin/installInTemplate.sh |
diffstat | 2 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 </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 $ip "tar -xzf -" +ssh -o StrictHostKeyChecking=no $ip "sudo su -c 'cd ~/.ssh && cat >authorized_keys' cc" < /var/cc/ak
--- 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