forked from tetherless-world/whyis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·48 lines (39 loc) · 1.9 KB
/
install.sh
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
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
WHYIS_FORK="${WHYIS_FORK:-tetherless-world}"
WHYIS_BRANCH="${WHYIS_BRANCH:release}"
curl -s -O https://apt.puppetlabs.com/puppet-release-xenial.deb
sudo dpkg -i puppet-release-xenial.deb
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
echo "Installing puppet..."
sudo apt-get install -y puppet-agent libaugeas0
#echo "Installing virtualenv..."
#sudo apt-get install -y python-virtualenv
export PATH=/opt/puppetlabs/bin/:$PATH
sudo /opt/puppetlabs/bin/puppet module install puppet-python
sudo /opt/puppetlabs/bin/puppet module install puppetlabs-vcsrepo
sudo /opt/puppetlabs/bin/puppet module install puppetlabs-apt
sudo /opt/puppetlabs/bin/puppet module install richardc-datacat
sudo /opt/puppetlabs/bin/puppet module install puppetlabs-java
sudo /opt/puppetlabs/bin/puppet module install puppet-nodejs --version 9.0.0
if [ -f /vagrant/manifests/install.pp ]; then
cp /vagrant/manifests/install.pp /tmp/install_whyis.pp
else
curl -skL "https://raw.githubusercontent.com/${WHYIS_FORK}/whyis/$WHYIS_BRANCH/puppet/manifests/install.pp" > /tmp/install_whyis.pp
fi
echo "Whyis branch: $WHYIS_BRANCH"
sudo FACTER_WHYIS_BRANCH=$WHYIS_BRANCH /opt/puppetlabs/bin/puppet apply /tmp/install_whyis.pp
echo ""
echo "Please configure Whyis at /apps/whyis/config.py to ensure correct customization."
echo "Whyis is now running at http://localhost/ if you installed locally, and on http://192.168.33.36 if you are using Vagrant."
echo "Follow the instructions for 'Configure Whyis' at http://tetherless-world.github.io/whyis/install."
echo ""
echo "To run whyis in development mode, run the following to start it:"
echo ""
echo " > sudo su - whyis"
echo " > cd /apps/whyis"
echo " > source venv/bin/activate"
echo " > python manage.py runserver"
echo ""
echo "Follow the instructions for 'Configure Whyis' at http://tetherless-world.github.io/whyis/install."