From d24f9522a9f80554b7edb837785a6d508fae8977 Mon Sep 17 00:00:00 2001 From: Dan Schultz Date: Wed, 31 Mar 2021 13:40:39 -0400 Subject: [PATCH] Add LoneStar2020 and Climate2030 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. --- configure.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/configure.sh b/configure.sh index b28b5ab..5a9628a 100644 --- a/configure.sh +++ b/configure.sh @@ -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 @@ -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"