Switch to unified view

a/vagrant/allura_setup.sh b/vagrant/allura_setup.sh
...
...
3
# Install Solr
3
# Install Solr
4
cd /home/vagrant/src
4
cd /home/vagrant/src
5
if [ ! -d apache-solr-1.4.1 ]
5
if [ ! -d apache-solr-1.4.1 ]
6
then
6
then
7
    echo "Installing Solr..."
7
    echo "Installing Solr..."
8
    wget -q http://apache.mirrors.tds.net/lucene/solr/1.4.1/apache-solr-1.4.1.tgz
8
    wget -nv http://archive.apache.org/dist/lucene/solr/1.4.1/apache-solr-1.4.1.tgz
9
    tar xf apache-solr-1.4.1.tgz && rm -f apache-solr-1.4.1.tgz
9
    tar xf apache-solr-1.4.1.tgz && rm -f apache-solr-1.4.1.tgz
10
    cd apache-solr-1.4.1/example/
10
    cd apache-solr-1.4.1/example/
11
    mkdir -p /home/vagrant/src/forge/solr_config/conf
11
    mkdir -p /home/vagrant/src/allura/solr_config/conf
12
    cp solr/conf/solrconfig.xml /home/vagrant/src/forge/solr_config/conf/
12
    cp solr/conf/solrconfig.xml /home/vagrant/src/allura/solr_config/conf/
13
    chown -R vagrant:vagrant /home/vagrant/src/apache-solr* /home/vagrant/src/forge/solr_config/conf/
13
    chown -R vagrant:vagrant /home/vagrant/src/apache-solr* /home/vagrant/src/allura/solr_config/conf/
14
fi
14
fi
15
15
16
# Create log dir
16
# Create log dir
17
if [ ! -d /var/log/allura ]
17
if [ ! -d /var/log/allura ]
18
then
18
then
...
...
31
# Create .bash_profile with venv activation
31
# Create .bash_profile with venv activation
32
if [ ! -f /home/vagrant/.bash_profile ]
32
if [ ! -f /home/vagrant/.bash_profile ]
33
then
33
then
34
    echo "Creating ~/.bash_profile ..."
34
    echo "Creating ~/.bash_profile ..."
35
    cp /home/vagrant/.profile /home/vagrant/.bash_profile
35
    cp /home/vagrant/.profile /home/vagrant/.bash_profile
36
    echo -e "\n# Activate Allura virtualenv\n. /home/vagrant/anvil/bin/activate && cd /home/vagrant/src/forge" >> /home/vagrant/.bash_profile
36
    echo -e "\n# Activate Allura virtualenv\n. /home/vagrant/anvil/bin/activate && cd /home/vagrant/src/allura" >> /home/vagrant/.bash_profile
37
    chown vagrant:vagrant /home/vagrant/.bash_profile
37
    chown vagrant:vagrant /home/vagrant/.bash_profile
38
fi
38
fi
39
39
40
# Setup Allura python packages
40
# Setup Allura python packages
41
cd /home/vagrant/src/forge
41
cd /home/vagrant/src/allura
42
sudo -u vagrant bash -c '. /home/vagrant/anvil/bin/activate; ./rebuild-all.bash'
42
sudo -u vagrant bash -c '. /home/vagrant/anvil/bin/activate; ./rebuild-all.bash'
43
43
44
echo "Purging unneeded packages..."
44
echo "Purging unneeded packages..."
45
aptitude clean
45
aptitude clean
46
aptitude -y -q purge ri
46
aptitude -y -q purge ri
47
aptitude -y -q purge installation-report landscape-common wireless-tools wpasupplicant
47
aptitude -y -q purge installation-report landscape-client landscape-common wireless-tools wpasupplicant
48
aptitude -y -q purge python-dbus libnl1 python-smartpm linux-headers-server python-twisted-core libiw30 language-selector-common
48
aptitude -y -q purge python-dbus libnl1 python-smartpm linux-headers-server python-twisted-core libiw30 language-selector-common
49
aptitude -y -q purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam accountsservice libaccountsservice0
49
aptitude -y -q purge cloud-init juju python-twisted python-twisted-bin libdbus-glib-1-2 python-pexpect python-serial python-gobject python-pam accountsservice libaccountsservice0
50
50
51
echo "Zeroing free space to aid VM compression..."
51
echo "Zeroing free space to aid VM compression..."
52
cat /dev/zero > zero.fill;
52
cat /dev/zero > zero.fill;
53
echo "Errors about 'No space left' are ok; carrying on..."
53
echo "Errors about 'No space left' are ok; carrying on..."
54
sync;sleep 1;sync;rm -f zero.fill
54
sync;sleep 1;sync;rm -f zero.fill