Mercurial > hg > cc > azure
annotate 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 |
rev | line source |
---|---|
5
580221a17890
comment out a lot not needed for vmss
Henry S. Thompson <ht@markup.co.uk>
parents:
4
diff
changeset
|
1 #!/bin/bash |
23
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
2 sudo mkdir /var/data |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
3 sudo mount -t tmpfs -o size=8g tmpfs /var/data |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
4 sudo chmod og+w /var/data |
4 | 5 sudo apt-get -y install python3 parallel psmisc jq mercurial curl |
6 curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
7 echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jessie main" |\ | |
8 sudo tee /etc/apt/sources.list.d/azure-cli.list | |
9 sudo apt-get -y --force-yes install apt-transport-https | |
10 sudo apt-get -y update | |
11 sudo apt-get -y install azure-cli | |
18
9631fca89cc6
F2-related stuff, and new experiment
Henry S. Thompson <ht@markup.co.uk>
parents:
14
diff
changeset
|
12 if [ ! -d ~cc/.ssh ] |
9631fca89cc6
F2-related stuff, and new experiment
Henry S. Thompson <ht@markup.co.uk>
parents:
14
diff
changeset
|
13 then |
23
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
14 if [ ! -d ~cc ] |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
15 then |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
16 sudo adduser --disabled-password --GECOS "CC master" cc |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
17 fi |
18
9631fca89cc6
F2-related stuff, and new experiment
Henry S. Thompson <ht@markup.co.uk>
parents:
14
diff
changeset
|
18 sudo su -c 'ssh-keygen -t rsa -N "" -f /home/cc/.ssh/id_rsa' cc |
23
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
19 echo "$1" >> /home/cc/.ssh/authorized_keys |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
20 sudo su -c 'mkdir bin' cc |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
21 sudo su -c 'sed "5i # Unless login (in which case .profile will have done this), add ~/bin to PATH\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
22 case $- in\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
23 *l*) ;;\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
24 *) export PATH=/home/cc/bin:$PATH ;;\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
25 esac\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
26 "' cc |
18
9631fca89cc6
F2-related stuff, and new experiment
Henry S. Thompson <ht@markup.co.uk>
parents:
14
diff
changeset
|
27 fi |
14 | 28 sudo cat ~cc/.ssh/id_rsa.pub |