Mercurial > hg > cc > azure
annotate workers/bin/installInTemplate.sh @ 43:c2b72d29a3ee
update to use _timedWhich.py
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Fri, 30 Nov 2018 18:37:40 +0000 |
parents | db75ec542c66 |
children |
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 |
28 | 5 sudo apt-get -y install python3 parallel psmisc jq mercurial curl gcc python3-dev |
6 curl -s -o get-pip.py -L https://bootstrap.pypa.io/get-pip.py | |
7 sudo python3 get-pip.py | |
8 rm get-pip.py | |
9 sudo pip3 install regex | |
10 sudo pip3 install dateparser | |
4 | 11 curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - |
12 echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jessie main" |\ | |
13 sudo tee /etc/apt/sources.list.d/azure-cli.list | |
14 sudo apt-get -y --force-yes install apt-transport-https | |
15 sudo apt-get -y update | |
16 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
|
17 if [ ! -d ~cc/.ssh ] |
9631fca89cc6
F2-related stuff, and new experiment
Henry S. Thompson <ht@markup.co.uk>
parents:
14
diff
changeset
|
18 then |
23
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
19 if [ ! -d ~cc ] |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
20 then |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
21 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
|
22 fi |
18
9631fca89cc6
F2-related stuff, and new experiment
Henry S. Thompson <ht@markup.co.uk>
parents:
14
diff
changeset
|
23 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
|
24 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
|
25 sudo su -c 'mkdir bin' cc |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
26 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
|
27 case $- in\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
28 *l*) ;;\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
29 *) export PATH=/home/cc/bin:$PATH ;;\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
30 esac\ |
cc065b2a2543
more tweaks wrt getting H4 going
Henry S. Thompson <ht@markup.co.uk>
parents:
18
diff
changeset
|
31 "' cc |
18
9631fca89cc6
F2-related stuff, and new experiment
Henry S. Thompson <ht@markup.co.uk>
parents:
14
diff
changeset
|
32 fi |
14 | 33 sudo cat ~cc/.ssh/id_rsa.pub |