diff --git a/scripts/ubuntu/dev/cleanup-tmp b/scripts/ubuntu/dev/cleanup-tmp new file mode 100755 index 0000000..4d4f878 --- /dev/null +++ b/scripts/ubuntu/dev/cleanup-tmp @@ -0,0 +1,4 @@ +#!/bin/bash + +find /tmp -maxdepth 1 -cmin +60 -type d -regex ".*rust_.*\|.*Temp-.*\|.*pymp.*\|.*config-util.*-cache" -exec rm -r {} \; + diff --git a/scripts/ubuntu/dev/deploy.sh b/scripts/ubuntu/dev/deploy.sh index 3a1cd53..fbc9f7a 100755 --- a/scripts/ubuntu/dev/deploy.sh +++ b/scripts/ubuntu/dev/deploy.sh @@ -107,6 +107,8 @@ pip3 install --upgrade rcsb.utils.multiproc # Copy the isrd software library cp /home/isrddev/protein-database/scripts/ubuntu/dev/pdb-software-lib.sh /usr/local/sbin/ +cp /home/isrddev/protein-database/scripts/ubuntu/dev/cleanup-tmp /etc/cron.daily/ +cp /home/isrddev/protein-database/scripts/ubuntu/dev/dev-checkout.sh /root/ # Create the scratch directory mkdir -p /var/scratch/dev @@ -132,6 +134,13 @@ chown -R pdbihm:pdbihm /home/pdbihm chown -R pdbihm:pdbihm /var/scratch chown -R pdbihm:root /mnt/vdb1/pdbihm +# Apply the tags +/root/dev-checkout.sh + +# Install pdb_dev +cd /home/isrddev/protein-database +pip3 install --upgrade . + # Install and start the backend service cp /home/isrddev/protein-database/scripts/ubuntu/dev/pdb_dev_processing_worker.service /etc/systemd/system/ cp /home/isrddev/protein-database/scripts/ubuntu/dev/pdb_staging_processing_worker.service /etc/systemd/system/ diff --git a/scripts/ubuntu/dev/dev-checkout.sh b/scripts/ubuntu/dev/dev-checkout.sh new file mode 100755 index 0000000..72df14e --- /dev/null +++ b/scripts/ubuntu/dev/dev-checkout.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. /usr/local/sbin/pdb-software-lib.sh + +job_tasks=( + "derivapy_pull_checkout" + "pdb_www_pull_checkout" + "python_ihm_pull_checkout 1.0" + "derivapy_install" + "pdb_processing_install" + "python_ihm_install" + "python_ihm_validation origin/dev_2.0" +) + +cron_run "hourly-update" "${job_tasks[@]}" + diff --git a/scripts/ubuntu/dev/dev-update b/scripts/ubuntu/dev/dev-update index 8f2fb9f..7872b7b 100755 --- a/scripts/ubuntu/dev/dev-update +++ b/scripts/ubuntu/dev/dev-update @@ -10,8 +10,8 @@ job_tasks=( "pdb_processing_install" "python_ihm_install" "python_ihm_validation origin/dev_2.0" - "require service pdb_dev_processing_worker start" - "require service pdb_staging_processing_worker start" + "require service pdb_dev_processing_worker restart" + "require service pdb_staging_processing_worker restart" ) cron_run "hourly-update" "${job_tasks[@]}" diff --git a/scripts/ubuntu/www/cleanup-tmp b/scripts/ubuntu/www/cleanup-tmp new file mode 100755 index 0000000..4d4f878 --- /dev/null +++ b/scripts/ubuntu/www/cleanup-tmp @@ -0,0 +1,4 @@ +#!/bin/bash + +find /tmp -maxdepth 1 -cmin +60 -type d -regex ".*rust_.*\|.*Temp-.*\|.*pymp.*\|.*config-util.*-cache" -exec rm -r {} \; + diff --git a/scripts/ubuntu/www/deploy.sh b/scripts/ubuntu/www/deploy.sh index 379b1f1..27d029f 100755 --- a/scripts/ubuntu/www/deploy.sh +++ b/scripts/ubuntu/www/deploy.sh @@ -94,6 +94,8 @@ pip3 install --upgrade rcsb.utils.multiproc cp /home/isrddev/protein-database/scripts/ubuntu/www/pdb-software-lib.sh /usr/local/sbin/ cp /home/isrddev/protein-database/scripts/ubuntu/www/www-update.sh /root/ cp /home/isrddev/protein-database/scripts/ubuntu/www/ihm_validation_checkout.sh /root/ +cp /home/isrddev/protein-database/scripts/ubuntu/www/www-checkout.sh /root/ +cp /home/isrddev/protein-database/scripts/ubuntu/www/cleanup-tmp /etc/cron.daily/ # Create the scratch directory mkdir -p /var/scratch/www @@ -120,7 +122,11 @@ chown -R pdbihm:root /mnt/vdb1/pdbihm # Apply the tags /root/ihm_validation_checkout.sh -/root/www-update.sh +/root/www-checkout.sh + +# Install pdb_dev +cd /home/isrddev/protein-database +pip3 install --upgrade . # Install and start the backend service cp /home/isrddev/protein-database/scripts/ubuntu/www/pdb_www_processing_worker.service /etc/systemd/system/ diff --git a/scripts/ubuntu/www/www-checkout.sh b/scripts/ubuntu/www/www-checkout.sh new file mode 100755 index 0000000..8df65d3 --- /dev/null +++ b/scripts/ubuntu/www/www-checkout.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. /usr/local/sbin/pdb-software-lib.sh + +job_tasks=( + "derivapy_pull_checkout pdb-20240321.1" + "pdb_www_pull_checkout pdb-20240321.1" + "python_ihm_pull_checkout 1.0" + "derivapy_install" + "pdb_processing_install" + "python_ihm_install" + "python_ihm_validation 20240315" +) + +cron_run "hourly-update" "${job_tasks[@]}" +