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

Commit f2de6e2

Browse files
authored
Merge pull request #126 from henriqueribeiro/add_cromwell_tools
Add cromwell tools
2 parents 0f22f14 + 394b0c9 commit f2de6e2

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
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/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

0 commit comments

Comments
 (0)