Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit e24ac11

Browse files
committed
Merge branch 'master' into release
2 parents 166120a + 9c73fad commit e24ac11

File tree

8 files changed

+60
-5
lines changed

8 files changed

+60
-5
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ TEMPLATE_ROOT_URL=https://<dist-bucketname>.s3-<region>.amazonaws.com/test/templ
4343
aws cloudformation create-stack \
4444
--region <region> \
4545
--stack-name <stackname> \
46-
--template-url $TEMPLATE_ROOT_URL/gwfcore-root.template.yaml \
46+
--template-url $TEMPLATE_ROOT_URL/gwfcore/gwfcore-root.template.yaml \
4747
--capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND \
4848
--parameters \
4949
ParameterKey=VpcId,ParameterValue=<vpc-id> \
5050
ParameterKey=SubnetIds,ParameterValue=\"<subnet-id-1>,<subnet-id-2>,...\" \
5151
ParameterKey=ArtifactBucketName,ParameterValue=<dist-bucketname> \
52-
ParameterKey=TemplateRootUrl,ParameterValue=$TEMPLATE_ROOT_URL
52+
ParameterKey=TemplateRootUrl,ParameterValue=$TEMPLATE_ROOT_URL \
53+
ParameterKey=S3BucketName,ParameterValue=<store-buketname> \
54+
ParameterKey=ExistingBucket,ParameterValue=false
5355

5456
```
5557

docs/orchestration/cromwell/cromwell-overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ This value can also be supplied as a Java command line variable.
210210

211211
### Accessing the Cromwell server
212212

213-
The Cromwell EC2 instance may be accessed using the [AWS Session Manager](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/session-manager.html). Please note that by default this will log you in as user `ec2-user` in the directory `/usr/bin`. You may prefer to become the ec2-user with the command `sudo su - ec2-user` which will switch you to that user's home directory.
213+
The Cromwell EC2 instance may be accessed using the [AWS Session Manager](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/session-manager.html) via console or in the terminal with the command `aws ssm start-session --target <instance-id>`.
214+
215+
Please note that by default this will log you in as user `ec2-user` in the directory `/usr/bin`. You may prefer to become the ec2-user with the command `sudo su - ec2-user` which will switch you to that user's home directory.
214216

215217
### Stop / Start / Restart the Cromwell service
216218

src/containers/nextflow/nextflow.aws.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cat ./nextflow.config
5252

5353
# stage in session cache
5454
# .nextflow directory holds all session information for the current and past runs.
55-
# it should be `sync`'d with an s3 uri, so that runs from previous sessions can be
55+
# it should be `sync`'d with an s3 uri, so that runs from previous sessions can be
5656
# resumed
5757
echo "== Restoring Session Cache =="
5858
aws s3 sync --no-progress $NF_LOGSDIR/.nextflow .nextflow

src/ecs-additions/awscli-shim.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# This shim is for using the AWS ClI v2 with containers that do not have full glibc
4+
# it makes the shared libraries the AWS CLI v2 findable via LD_LIBRARY_PATH
5+
#
6+
# expect to be installed as /opt/aws-cli/bin/aws
7+
# expect to actually call /opt/aws-cli/dist/aws
8+
# expect that /opt/aws-cli is mapped to containers
9+
10+
BIN_DIR=`dirname $0`
11+
DIST_DIR=`dirname $BIN_DIR`/dist
12+
AWS=$DIST_DIR/aws
13+
14+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIST_DIR
15+
16+
$AWS $@
17+

src/ecs-additions/ecs-additions-common.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@
33
# add fetch and run batch helper script
44
chmod a+x /opt/ecs-additions/fetch_and_run.sh
55
cp /opt/ecs-additions/fetch_and_run.sh /usr/local/bin
6+
7+
# add awscli-shim
8+
mv /opt/aws-cli/bin /opt/aws-cli/dist
9+
chmod a+x /opt/ecs-additions/awscli-shim.sh
10+
mkdir /opt/aws-cli/bin
11+
cp /opt/ecs-additions/awscli-shim.sh /opt/aws-cli/bin/aws
12+

src/ecs-additions/fetch_and_run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# See below for usage instructions.
1717

1818
#PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
19+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/aws-cli/v2/current/dist
1920
BASENAME="${0##*/}"
2021
AWS="/usr/local/aws-cli/v2/current/bin/aws"
2122

src/templates/cromwell/cromwell-resources.template.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,20 @@ Resources:
382382
owner: "ec2-user"
383383
group: "ec2-user"
384384

385+
"/home/ec2-user/get_cromwell_tools.sh":
386+
content: |
387+
#!/bin/bash
388+
url=$(curl --silent --retry 5 --retry-connrefused https://api.github.com/repos/broadinstitute/cromwell/releases/latest | jq -r .assets[1].browser_download_url)
389+
curl --retry 5 --retry-connrefused -LO $url
390+
391+
curl --retry 5 --retry-connrefused -LO https://raw.githubusercontent.com/broadinstitute/cromshell/master/cromshell
392+
chmod +x cromshell
393+
sudo mv cromshell /usr/local/bin/
394+
395+
mode: "000755"
396+
owner: "ec2-user"
397+
group: "ec2-user"
398+
385399
"/home/ec2-user/cromwell.conf":
386400
content: !Sub
387401
- |
@@ -605,6 +619,16 @@ Resources:
605619
02_start_cromwell:
606620
cwd: "/home/ec2-user"
607621
command: "sudo -u ec2-user /usr/local/bin/supervisord"
622+
623+
config4:
624+
commands:
625+
00_get_cromwell_tools:
626+
cwd: "/home/ec2-user/"
627+
command: "./get_cromwell_tools.sh"
628+
629+
01_chown_womtool:
630+
cwd: "/home/ec2-user/"
631+
command: "chown ec2-user:ec2-user womtool*.jar"
608632

609633
Properties:
610634
ImageId: !Ref LatestAmazonLinuxAMI
@@ -623,7 +647,7 @@ Resources:
623647
#!/bin/bash -x
624648
yum -y update
625649
yum install -y aws-cfn-bootstrap
626-
yum install -y jq awslogs python3 java
650+
yum install -y jq awslogs python3 java mailx
627651

628652
amazon-linux-extras install -y nginx1
629653
pip3 install supervisor

src/templates/gwfcore/gwfcore-batch.template.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ Resources:
194194
Type: MANAGED
195195
State: ENABLED
196196
ComputeResources:
197+
Ec2Configuration:
198+
- ImageType: ECS_AL2
197199
AllocationStrategy: BEST_FIT
198200
LaunchTemplate:
199201
LaunchTemplateId: !Ref LaunchTemplateId

0 commit comments

Comments
 (0)