Skip to content

Commit

Permalink
Updated the ubuntu deploy scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
serbanvoinea committed Mar 27, 2024
1 parent 42ff7d3 commit cc808e1
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 3 deletions.
4 changes: 4 additions & 0 deletions scripts/ubuntu/dev/cleanup-tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

find /tmp -maxdepth 1 -cmin +60 -type d -regex ".*rust_.*\|.*Temp-.*\|.*pymp.*\|.*config-util.*-cache" -exec rm -r {} \;

9 changes: 9 additions & 0 deletions scripts/ubuntu/dev/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand Down
16 changes: 16 additions & 0 deletions scripts/ubuntu/dev/dev-checkout.sh
Original file line number Diff line number Diff line change
@@ -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[@]}"

4 changes: 2 additions & 2 deletions scripts/ubuntu/dev/dev-update
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"
Expand Down
4 changes: 4 additions & 0 deletions scripts/ubuntu/www/cleanup-tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

find /tmp -maxdepth 1 -cmin +60 -type d -regex ".*rust_.*\|.*Temp-.*\|.*pymp.*\|.*config-util.*-cache" -exec rm -r {} \;

8 changes: 7 additions & 1 deletion scripts/ubuntu/www/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand Down
16 changes: 16 additions & 0 deletions scripts/ubuntu/www/www-checkout.sh
Original file line number Diff line number Diff line change
@@ -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[@]}"

0 comments on commit cc808e1

Please sign in to comment.