Skip to content

Commit

Permalink
Add LoneStar2020 and Climate2030
Browse files Browse the repository at this point in the history
This adds two new competitions.

As discussed in #10 we need to move this logic out of the provisioning
script and into a more generic script, but in the mean time this will
do.
  • Loading branch information
slifty committed Mar 31, 2021
1 parent 60f393a commit d24f952
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ apt-get -qq install -y ansible

echo "Install ETL software packages"
apt-get -qq install -y subversion git gpg unzip python3-pip acl
apt-get -qq install -y xlsx2csv

echo "Install web server tools"
apt-get -qq install -y apache2
Expand Down Expand Up @@ -149,4 +150,36 @@ then
./deploy -g "$DECRYPTION_PASSPHRASE" /home/vagrant/data/decrypted
fi

# Install the Climte2030 competition
echo "INSTALL Climate2030 competition"
export MEDIAWIKI_INSTALL_DIRECTORY=/var/www/html/competitions/Climate2030
cd /home/vagrant/torque-sites/competitions/Climate2030/ansible
envsubst < inv/local/group_vars/all.tmpl > inv/local/group_vars/all
ansible-playbook Climate2030.yml -i inv/local
if [ ETL_ENABLED ]
then
export WIKI_URL='http://127.0.0.1/Climate2030'
cd $OTS_DIR/clients/lever-for-change/torque-sites/Climate2030/data
$OTS_DIR/utils/get-bigdata -c
cd /home/vagrant/torque-sites/competitions/Climate2030/etl
envsubst < config.py.tmpl > config.py
./deploy -g "$DECRYPTION_PASSPHRASE" /home/vagrant/data/decrypted
fi

# Install the LoneStar2020 competition
echo "INSTALL LoneStar2020 competition"
export MEDIAWIKI_INSTALL_DIRECTORY=/var/www/html/competitions/LoneStar2020
cd /home/vagrant/torque-sites/competitions/LoneStar2020/ansible
envsubst < inv/local/group_vars/all.tmpl > inv/local/group_vars/all
ansible-playbook LoneStar2020.yml -i inv/local
if [ ETL_ENABLED ]
then
export WIKI_URL='http://127.0.0.1/LoneStar2020'
cd $OTS_DIR/clients/lever-for-change/torque-sites/LoneStar2020/data
$OTS_DIR/utils/get-bigdata -c
cd /home/vagrant/torque-sites/competitions/LoneStar2020/etl
envsubst < config.py.tmpl > config.py
./deploy -g "$DECRYPTION_PASSPHRASE" /home/vagrant/data/decrypted
fi

echo "ALL DONE"

0 comments on commit d24f952

Please sign in to comment.