Skip to content

Commit

Permalink
chore: update ebextensions for downloading latest seqrepo instance (#292
Browse files Browse the repository at this point in the history
)

* use 2024-02-20 SeqRepo instance
  • Loading branch information
korikuzma authored Jul 29, 2024
1 parent 38a35ee commit 39ea1a3
Showing 1 changed file with 14 additions and 38 deletions.
52 changes: 14 additions & 38 deletions .ebextensions/02_data_downloads.config
Original file line number Diff line number Diff line change
@@ -1,46 +1,22 @@
commands:
01_install_postgresql_devel:
command: "yum install -y python-devel postgresql-devel"
02_install_aws_cli:
01_install_aws_cli:
command: "yum install -y awscli"
03_install_p7zip:
command: "yum install -y p7zip"
04_export_eb_env_var:
02_export_eb_env_var:
command: "export $(cat /opt/elasticbeanstalk/deployment/env | xargs)"

container_commands:
01_cool_seq_tool_permissions:
test: test -d "/var/app/venv/staging-LQM1lest/lib/python3.11/site-packages/cool_seq_tool"
command: "chmod -R 777 /var/app/venv/staging-LQM1lest/lib/python3.11/site-packages/cool_seq_tool/data"
01_s3_download:
test: test ! -d "/usr/local/share/seqrepo/2024-02-20"
command: "aws s3 cp s3://${AWS_BUCKET_NAME}/${AWS_SEQREPO_OBJECT} /usr/local/share/seqrepo.tar.gz --region us-east-2"

02_seqrepo_download:
test: test ! -d "/usr/local/share/seqrepo"
command: "aws s3 cp s3://${AWS_BUCKET_NAME}/${AWS_SEQREPO_OBJECT} /usr/local/share/seqrepo.zip --region us-east-2"
02_extract_seqrepo:
test: test -f "/usr/local/share/seqrepo.tar.gz"
command: "mkdir -p /usr/local/share/seqrepo/2024-02-20 && tar -xzvf /usr/local/share/seqrepo.tar.gz -C /usr/local/share/seqrepo/2024-02-20"

03_p7zip_seqrepo:
test: test -f "/usr/local/share/seqrepo.zip"
command: "7za x /usr/local/share/seqrepo.zip -o/usr/local/share -y"
03_seqrepo_zip_permission:
test: test -f "/usr/local/share/seqrepo.tar.gz"
command: "chmod +wr /usr/local/share/seqrepo.tar.gz"

04_seqrepo_permission:
test: test -d "/usr/local/share/seqrepo"
command: "chmod -R 777 /usr/local/share/seqrepo"

05_macosx_permission:
test: test -d "/usr/local/share/__MACOSX"
command: "chmod -R +wr /usr/local/share/__MACOSX"

06_seqrepo_zip_permission:
test: test -f "/usr/local/share/seqrepo.zip"
command: "chmod +wr /usr/local/share/seqrepo.zip"

07_remove_macosx:
test: test -d "/usr/local/share/__MACOSX"
command: "rm -R /usr/local/share/__MACOSX"

08_remove_seqrepo_zip:
test: test -f "/usr/local/share/seqrepo.zip"
command: "rm /usr/local/share/seqrepo.zip"

09_data_permission:
test: test -d "/usr/local/share/seqrepo"
command: "chmod -R +wrx /usr/local/share/seqrepo"
04_remove_seqrepo_zip:
test: test -f "/usr/local/share/seqrepo.tar.gz"
command: "rm /usr/local/share/seqrepo.tar.gz"

0 comments on commit 39ea1a3

Please sign in to comment.