From 70b3701882302cc1b09e3c532e74a46a156c035b Mon Sep 17 00:00:00 2001 From: Imer Muhovic Date: Fri, 9 Aug 2019 12:26:07 +0200 Subject: [PATCH 1/2] Changed isaac dockerfile base image, as isaac build was failing with original version. Changed the mount point for the AMI, as it was mounting the wrong location, causing the ami ec2 instance to stall on boot. Changed the ecr registry region to use the default aws account region, as it had us-east-1 hardcoded --- pipeline/nested_templates/batch_jobs_template_cfn.yml | 8 ++++---- tools/isaac/docker/Dockerfile | 2 +- tools/template_cfn.yml | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pipeline/nested_templates/batch_jobs_template_cfn.yml b/pipeline/nested_templates/batch_jobs_template_cfn.yml index 65d2852..3ef171a 100644 --- a/pipeline/nested_templates/batch_jobs_template_cfn.yml +++ b/pipeline/nested_templates/batch_jobs_template_cfn.yml @@ -29,7 +29,7 @@ Resources: ReferenceS3Path: "s3://aws-batch-genomics-shared/secondary-analysis/reference/isaac/" WorkingDir: "/scratch" ContainerProperties: - Image: !Sub "${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/isaac" + Image: !Sub "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/isaac" Vcpus: 32 Memory: 80000 JobRoleArn: @@ -69,7 +69,7 @@ Resources: VCFS3Path: !Sub "s3://${JobResultsBucket}/${DefaultSampleName}/vcf" WorkingDir: "/scratch" ContainerProperties: - Image: !Sub "${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/strelka" + Image: !Sub "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/strelka" Vcpus: 32 Memory: 32000 JobRoleArn: @@ -109,7 +109,7 @@ Resources: CommandArgs: " -t hg38 " WorkingDir: "/scratch" ContainerProperties: - Image: !Sub "${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/snpeff" + Image: !Sub "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/snpeff" Vcpus: 4 Memory: 10000 JobRoleArn: @@ -145,7 +145,7 @@ Resources: BAMStatsS3Path: !Sub "s3://${JobResultsBucket}/${DefaultSampleName}/bam/sorted.bam.stats" WorkingDir: "/scratch" ContainerProperties: - Image: !Sub "${AWS::AccountId}.dkr.ecr.us-east-1.amazonaws.com/samtools-stats" + Image: !Sub "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/samtools-stats" Vcpus: 4 Memory: 40000 JobRoleArn: diff --git a/tools/isaac/docker/Dockerfile b/tools/isaac/docker/Dockerfile index 770bcd2..da61711 100644 --- a/tools/isaac/docker/Dockerfile +++ b/tools/isaac/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2.7 +FROM python:2.7-stretch ARG VERSION="03.17.03.01" diff --git a/tools/template_cfn.yml b/tools/template_cfn.yml index dc39e61..27fa384 100644 --- a/tools/template_cfn.yml +++ b/tools/template_cfn.yml @@ -157,7 +157,7 @@ Resources: "Volume": { "type": "String", "description": "Volume to mount.", - "default": "/dev/nvme1n1" + "default": "/dev/sdb" }, "TargetAmiName": { "type": "String", @@ -281,11 +281,11 @@ Resources: "set -e", "yum -y update", "yum -y install parted", - "parted /dev/nvme1n1 mklabel gpt -s", - "parted /dev/nvme1n1 mkpart primary 0% 100% -s", - "mkfs -t ext4 -F /dev/nvme1n1", + "parted {{Volume}} mklabel gpt -s", + "parted {{Volume}} mkpart primary 0% 100% -s", + "mkfs -t ext4 -F {{Volume}}", "mkdir /docker_scratch", - "echo -e '/dev/nvme1n1\t/docker_scratch\text4\tdefaults\t0\t0' | sudo tee -a /etc/fstab", + "echo -e '{{Volume}}\t/docker_scratch\text4\tdefaults\t0\t0' | sudo tee -a /etc/fstab", "mount -a" ] } From 1dd66fa36ce270108f7c3cca2e19038a8fcf6f47 Mon Sep 17 00:00:00 2001 From: Imer Muhovic Date: Fri, 20 Sep 2019 11:19:47 +0200 Subject: [PATCH 2/2] Corrected the template filepaths. Were pointing non-existent files. --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index 5dc4676..f1b1a6b 100755 --- a/update.sh +++ b/update.sh @@ -11,7 +11,7 @@ cd .. # Update Zone Stack -aws cloudformation update-stack --stack-name batch-genomics-zone --template-body file://zone_template_cfn.yml --capabilities CAPABILITY_NAMED_IAM --output text;aws cloudformation wait stack-create-complete --stack-name batch-genomics-zone +aws cloudformation update-stack --stack-name batch-genomics-zone --template-body file://template_cfn.yml --capabilities CAPABILITY_NAMED_IAM --output text;aws cloudformation wait stack-create-complete --stack-name batch-genomics-zone cd tools @@ -26,6 +26,6 @@ cd pipeline IMAGE_ID=$(aws cloudformation describe-stacks --stack-name batch-genomics-pipeline --query 'Stacks[].Outputs[?OutputKey==`ImageId`].OutputValue' --output text) -aws cloudformation update-stack --stack-name batch-genomics-pipeline --template-body file://pipeline/template_cfn.yml --capabilities CAPABILITY_NAMED_IAM --output text --parameters ParameterKey=TemplatesBucket,ParameterValue=${TEMPLATES_BUCKET} ParameterKey=ImageId,ParameterValue=${IMAGE_ID};aws cloudformation wait stack-update-complete --stack-name batch-genomics-pipeline +aws cloudformation update-stack --stack-name batch-genomics-pipeline --template-body file://template_cfn.yml --capabilities CAPABILITY_NAMED_IAM --output text --parameters ParameterKey=TemplatesBucket,ParameterValue=${TEMPLATES_BUCKET} ParameterKey=ImageId,ParameterValue=${IMAGE_ID};aws cloudformation wait stack-update-complete --stack-name batch-genomics-pipeline cd .. \ No newline at end of file