Mercurial > hg > cc > azure
diff workers/bin/installInTemplate.sh @ 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 | 9631fca89cc6 |
children | db75ec542c66 |
line wrap: on
line diff
--- 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