forked from saltstack/salt
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprovision.sh
More file actions
executable file
·38 lines (27 loc) · 978 Bytes
/
provision.sh
File metadata and controls
executable file
·38 lines (27 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -x
set -e
sudo apt-get update # without this it fails
sudo apt-get install -y git # to be able to clone salt sources
git clone https://github.com/saltstack/salt.git
cd salt
git fetch --tags
# install dependencies
sudo apt-get install -y build-essential libssl-dev python-dev python-m2crypto \
python-pip python-virtualenv swig virtualenvwrapper
# install dependencies for generating docs
sudo apt-get install -y python-sphinx
# create virtualenv
virtualenv --python=/usr/bin/python2.7 --system-site-packages .
source bin/activate
# install other dependencies
#pip install -r requirements.txt
pip install -r dev_requirements_python27.txt
pip install psutil
pip install -e .
mkdir -p etc/salt
cp conf/master etc/salt/master
cp conf/minion etc/salt/minion
sed -ri "s/^#user: .*$/user: `whoami`/" etc/salt/{master,minion}
sed -ri "s|^#root_dir: .*$|root_dir: $PWD|" etc/salt/{master,minion}
sed -ri "s/^#master: .*$/master: localhost/" etc/salt/minion