Mercurial > hg > cc > azure
view workers/bin/installInTemplate.sh @ 52:471ac1962bda
final merge
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Mon, 17 Dec 2018 11:29:05 +0000 |
parents | db75ec542c66 |
children |
line wrap: on
line source
#!/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 gcc python3-dev curl -s -o get-pip.py -L https://bootstrap.pypa.io/get-pip.py sudo python3 get-pip.py rm get-pip.py sudo pip3 install regex sudo pip3 install dateparser 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" |\ sudo tee /etc/apt/sources.list.d/azure-cli.list sudo apt-get -y --force-yes install apt-transport-https sudo apt-get -y update sudo apt-get -y install azure-cli 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