Skip to content

Commit

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

close #538
  • Loading branch information
korikuzma authored Jul 16, 2024
1 parent aecbd08 commit 9f98df1
Showing 1 changed file with 14 additions and 36 deletions.
50 changes: 14 additions & 36 deletions .ebextensions/01_download_data.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,24 @@ commands:
command: "yum install -y python-devel postgresql-devel"
02_install_aws_cli:
command: "yum install -y awscli"
03_install_p7zip:
command: "yum install -y p7zip"
04_eb_packages:
03_eb_packages:
command: "/var/app/venv/staging-LQM1lest/bin/pip install uvloop websockets httptools typing-extensions"
05_export_eb_env_var:
04_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_s3_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"

9_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 9f98df1

Please sign in to comment.