Skip to content

Instantly share code, notes, and snippets.

@bvcelari
Created December 2, 2017 22:52
Show Gist options
  • Save bvcelari/eec3c104c485a25a8a79efef4e044645 to your computer and use it in GitHub Desktop.
Save bvcelari/eec3c104c485a25a8a79efef4e044645 to your computer and use it in GitHub Desktop.
#pre-requisites...
apt-get install -y openssh-server vim git virtualenv
#####required for docker states... should not be needed, but there is something broken in the salt repo...
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
######## Should work from the state, but does not :/
#Install salt
wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
#get docker provisioning states and compile script
mkdir /opt/DockerHost/
cd /opt/DockerHost/
git clone https://github.com/bvcelari/docker-formula.git
git clone https://github.com/bvcelari/pillar.git
mkdir /opt/DockerHost/compileparity/
cd compileparity/
wget https://gist.githubusercontent.com/bvcelari/754b62a3079f05c47e51753409f5b26e/raw/3abb8bea6e19f157f5ba525e964e25b77ba843c8/build_parity.sh
cd /opt/DockerHost/
virtualenv .
source bin/activate
cd docker-formula
pip install -r requirements.txt
#install salt master and minion... many ways to do this... this it's just fast
apt-get update
apt-get install -y salt-master
apt-get install -y salt-minion
#Minion Configuration
echo "file_client: local
file_roots:
base:
- /opt/DockerHost/docker-formula
pillar_roots:
base:
- /opt/DockerHost/pillar
" > /etc/salt/minion
service salt-master stop
service salt-minion restart
#stupid... nameserver it's 127.0.0.1... and was failing... shit of network....
echo "nameserver 8.8.8.8" > /etc/resolv.conf
salt-call state.apply pillar='{"rust_version": "stable", "parity_version": "stable"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment