Skip to content

Commit b1d3766

Browse files
authored
Merge pull request #76 from ravigurram8/topic-release-3
1.11.5 fetures updates
2 parents 34fd7b7 + d2699ea commit b1d3766

6 files changed

Lines changed: 201 additions & 19 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ Fore more details on requesting a certificate, follow this [link](https://docs.a
8080

8181
*Create a listener on port 443 *
8282

83-
aws elbv2 create-listener --load-balancer-arn arn:aws:elasticloadbalancing:region:aws_account_id:loadbalancer/app/research-gw-alb/e5ba62739c16e642 --protocol HTTPS --port 443 --certificates CertificateArn=arn:aws:acm:us-east-1:aws_account_id:certificate/480cdfa8-bac6-4b99-977f-5f18441de49e --ssl-policy ELBSecurityPolicy-2016-08 --default-actions Type=forward, TargetGroupArn=arn:aws:elasticloadbalancing:region:aws_account_id:targetgroup/tg-research-gw/209a844cd01825a4 --region us-east-1
83+
aws elbv2 create-listener --load-balancer-arn arn:aws:elasticloadbalancing:region:aws_account_id:loadbalancer/app/research-gw-alb/e5ba62739c16e642 --protocol HTTPS --port 443 --certificates CertificateArn=arn:aws:acm:us-east-1:aws_account_id:certificate/480cdfa8-bac6-4b99-977f-5f18441de49e --ssl-policy ELBSecurityPolicy-2016-08 --default-actions Type=forward,TargetGroupArn=arn:aws:elasticloadbalancing:region:aws_account_id:targetgroup/tg-research-gw/209a844cd01825a4 --region us-east-1
8484

8585
*Create a listener on port 80 *
8686

8787
Note: This is only recommended for test setups and some of the features like secure links for resources will not work.
8888

89-
aws elbv2 create-listener arn:aws:elasticloadbalancing:region:aws_account_id:loadbalancer/app/research-gw-alb/e5ba62739c16e642 --protocol HTTPS --port 80 --default-actions Type=forward, TargetGroupArn=arn:aws:elasticloadbalancing:region:aws_account_id:targetgroup/tg-research-gw/209a844cd01825a4 --region us-east-1
89+
aws elbv2 create-listener --load-balancer-arn arn:aws:elasticloadbalancing:region:aws_account_id:loadbalancer/app/research-gw-alb/e5ba62739c16e642 --protocol HTTP --port 80 --default-actions Type=forward,TargetGroupArn=arn:aws:elasticloadbalancing:region:aws_account_id:targetgroup/tg-research-gw/209a844cd01825a4
9090

9191
<!-- trunk-ignore(markdownlint/MD036) -->
9292
*Set up Route 53 for your domain/sub-domain*

cft-templates/ec2-ubuntu.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
Metadata:
2+
License: Apache-2.0
3+
AWSTemplateFormatVersion: '2010-09-09'
4+
Description: 'AWS CloudFormation Template to create an EC2 instance
5+
**WARNING** This template creates an Amazon EC2 instance.
6+
You will be billed for the AWS resources used if you create a stack from this template.'
7+
8+
Parameters:
9+
Namespace:
10+
Type: String
11+
Description: An environment name that will be prefixed to resource names
12+
S3Mounts:
13+
Type: String
14+
Description: A JSON array of objects with name, bucket, and prefix properties used to mount data
15+
IamPolicyDocument:
16+
Type: String
17+
Description: The IAM policy to be associated with the launched workstation
18+
EnvironmentInstanceFiles:
19+
Type: String
20+
Description: >-
21+
An S3 URI (starting with "s3://") that specifies the location of files to be copied to
22+
the environment instance, including any bootstrap scripts
23+
InstanceType:
24+
Description: Choose the instance type for this instance. e.g. t2.small
25+
Type: String
26+
Default: t2.small
27+
AllowedValues: [t2.nano, t2.micro, t2.small, t2.medium]
28+
ConstraintDescription: must be a valid EC2 instance type.
29+
KeyPair:
30+
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance. If no key pairs exist, please create one from the button next to the dropdown. Please contact your Administrator if you are unable to create one.
31+
Type: AWS::EC2::KeyPair::KeyName
32+
ConstraintDescription: must be the name of an existing EC2 KeyPair.
33+
AllowedSSHLocation:
34+
Description: The IP address range that can be used to SSH to the EC2 instances
35+
Type: String
36+
MinLength: '9'
37+
MaxLength: '18'
38+
Default: 0.0.0.0/0
39+
AllowedPattern: (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})
40+
ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x.
41+
LatestAmiId:
42+
Description: Enter an AMI-Id e.g. ami-12345. The AMI should exist in the same region as the project. Leave the default string to use the latest Canonical Ubuntu 20.04 image.
43+
Type: String
44+
Default: '/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id'
45+
46+
Conditions:
47+
IamPolicyEmpty: !Equals [!Ref IamPolicyDocument, '{}']
48+
UserProvidedAMI: !Equals [ 'ami', !Select [0, !Split ["-", !Ref LatestAmiId]]]
49+
50+
Resources:
51+
IAMRole:
52+
Type: 'AWS::IAM::Role'
53+
Properties:
54+
RoleName: !Join ['-', [Ref: Namespace, 'ec2-role']]
55+
Path: '/'
56+
AssumeRolePolicyDocument:
57+
Version: '2012-10-17'
58+
Statement:
59+
- Effect: 'Allow'
60+
Principal:
61+
Service:
62+
- 'ec2.amazonaws.com'
63+
Action:
64+
- 'sts:AssumeRole'
65+
Policies:
66+
- !If
67+
- IamPolicyEmpty
68+
- !Ref 'AWS::NoValue'
69+
- PolicyName: !Join ['-', [Ref: Namespace, 's3-studydata-policy']]
70+
PolicyDocument: !Ref IamPolicyDocument
71+
72+
InstanceProfile:
73+
Type: 'AWS::IAM::InstanceProfile'
74+
Properties:
75+
InstanceProfileName: !Join ['-', [Ref: Namespace, 'ec2-profile']]
76+
Path: '/'
77+
Roles:
78+
- Ref: IAMRole
79+
80+
EC2Instance:
81+
Type: AWS::EC2::Instance
82+
Properties:
83+
UserData:
84+
Fn::Base64: !Sub |
85+
#!/usr/bin/env bash
86+
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
87+
apt update
88+
apt install -y awscli jq
89+
# Download and execute bootstrap script
90+
aws s3 cp "${EnvironmentInstanceFiles}/get_bootstrap_ubuntu.sh" "/tmp"
91+
chmod 500 "/tmp/get_bootstrap_ubuntu.sh"
92+
/tmp/get_bootstrap_ubuntu.sh "${EnvironmentInstanceFiles}" '${S3Mounts}'
93+
94+
# Signal result to CloudFormation
95+
/opt/aws/bin/cfn-signal -e $? --stack "${AWS::StackName}" --resource "EC2Instance" --region "${AWS::Region}"
96+
InstanceType: !Ref 'InstanceType'
97+
SecurityGroups: [!Ref 'InstanceSecurityGroup']
98+
KeyName: !Ref 'KeyPair'
99+
ImageId: !If [ UserProvidedAMI,!Ref LatestAmiId,'{{resolve:ssm:/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id}}']
100+
IamInstanceProfile: !Ref InstanceProfile
101+
Tags:
102+
- Key: Name
103+
Value: !Join ['-', [Ref: Namespace, 'ec2-linux']]
104+
- Key: Description
105+
Value: EC2 workspace instance
106+
107+
InstanceSecurityGroup:
108+
Type: AWS::EC2::SecurityGroup
109+
Properties:
110+
GroupDescription: Enable SSH access
111+
SecurityGroupIngress:
112+
- IpProtocol: tcp
113+
FromPort: '22'
114+
ToPort: '22'
115+
CidrIp: !Ref 'AllowedSSHLocation'
116+
117+
Outputs:
118+
InstanceId:
119+
Description: InstanceId of the newly created EC2 instance
120+
Value: !Ref 'EC2Instance'
121+
InstanceIPAddress:
122+
Description: IP address of the newly created EC2 instance
123+
Value: !GetAtt [EC2Instance, PublicIp]
124+
InstanceDNSName:
125+
Description: DNS name of the newly created EC2 instance
126+
Value: !GetAtt [EC2Instance, PublicDnsName]

cft-templates/nextflow-advanced.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ Resources:
505505
LaunchTemplateId: !Ref EC2LaunchTemplate
506506
Version: $Latest
507507
InstanceRole: !GetAtt BatchInstanceProfile.Arn
508-
InstanceTypes: [c5, c5a, c5ad, c5d, i3, m5, r5, c6i ]
508+
InstanceTypes:
509+
- !Ref WorkerNodeInstanceType
509510
MinvCpus: !Ref ComputeEnvMinvCpus
510511
MaxvCpus: !Ref ComputeEnvMaxvCpus
511512
SecurityGroupIds:
@@ -608,14 +609,7 @@ Resources:
608609
process.executor = 'awsbatch'
609610
process.queue = '${DefaultQueue}'
610611
workDir = 's3://${S3Bucket}/${AWS::StackName}'
611-
process.errorStrategy = {
612-
sleep( Math.pow( 2, task.attempt ) * 150 as long )
613-
return 'retry'
614-
}
615-
process.maxRetries = 5
616612
aws.batch.cliPath = '/home/ec2-user/miniconda/bin/aws'
617-
aws.batch.maxParallelTransfers = 5
618-
aws.batch.maxTransferAttempts = 5
619613
}
620614
}
621615

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
- sp2net
1919

2020
cc-3102:
21-
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.11.3_b1152
21+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.11.5_b1192
2222
secrets:
2323
- source: sp2prod-config.json
2424
target: /rlc/cc/server/app/config/config.json
@@ -42,7 +42,7 @@ services:
4242
command: /bin/bash start.sh
4343

4444
scheduler-3102:
45-
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.11.3_b1152
45+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.11.5_b1192
4646
secrets:
4747
- source: sp2prod-config.json
4848
target: /rlc/cc/server/app/config/config.json
@@ -62,7 +62,7 @@ services:
6262
command: node ./app/scheduler/app.js
6363

6464
notificationsink:
65-
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/notificationsink:1.11.2_b2
65+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/notificationsink:1.11.4_b1
6666
secrets:
6767
- source: sp2prod-config.json
6868
target: /opt/app/config/config.json

dump/standardcatalogitems.json

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,67 @@
390390
"permission_required": {}
391391
}
392392
},
393+
{
394+
"_id": {
395+
"$oid": "610166d6bbe50a00122a5139"
396+
},
397+
"name" : "Ubuntu 20 04 on Amazon EC2",
398+
"description" : "Use Ubuntu 20.04, on Amazon Elastic Compute Cloud (Amazon EC2).",
399+
"fileName" : "ec2-ubuntu.yml",
400+
"tags" : [
401+
{
402+
"Key" : "EstimatedTimeToProvision",
403+
"Value" : "10 Minutes"
404+
},
405+
{
406+
"Key" : "DetailsLink",
407+
"Value" : "https://researchgateway.readthedocs.io/en/latest/linux.html"
408+
},
409+
{
410+
"Key" : "Service",
411+
"Value" : "EC2"
412+
},
413+
{
414+
"Key" : "TypeOfProduct",
415+
"Value" : "Research"
416+
}
417+
],
418+
"owner" : "RL",
419+
"portfolio" : "RGPortfolio",
420+
"availableRegions" : [ ],
421+
"assignedOU" : [ ],
422+
"metaData" : {
423+
"pre_provisioning" : [
424+
{
425+
"code" : "CFT_PARAMS",
426+
"params" : [
427+
{
428+
"name" : "EnvironmentInstanceFiles",
429+
"type" : "RL::SC::PARAM::HD"
430+
},
431+
{
432+
"name" : "IamPolicyDocument",
433+
"type" : "RL::SC::PARAM::HD"
434+
},
435+
{
436+
"name" : "S3Mounts",
437+
"type" : "RL::SC::PARAM::HD"
438+
},
439+
{
440+
"name" : "Namespace",
441+
"type" : "RL::SC::PARAM::HD"
442+
}
443+
]
444+
}
445+
],
446+
"post_provisioning" : [ ],
447+
"checks_before_assigning_product" : [ ],
448+
"checks_after_assigning_product" : [ ],
449+
"permission_required" : {
450+
451+
}
452+
}
453+
},
393454
{
394455
"_id": {
395456
"$oid": "611b96eb4548787205d67866"
@@ -509,10 +570,11 @@
509570
}
510571
],
511572
"checks_after_assigning_product": [],
512-
"permission_required": {},
513-
"cost_resource": true,
514-
"aws_batch": true
515-
}
573+
"permission_required": {
574+
},
575+
"cost_resource" : true,
576+
"aws_batch" : true
577+
}
516578
},
517579
{
518580
"_id": {

provisioners/provision-ecr.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash -xe
22
sudo docker login -u AWS -p $(aws ecr get-login-password --region us-east-2) 045938549113.dkr.ecr.us-east-2.amazonaws.com
3-
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.11.3_b1152
3+
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.11.5_b1192
44
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/nginx:latest
5-
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/notificationsink:1.11.2_b2
5+
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/notificationsink:1.11.4_b1

0 commit comments

Comments
 (0)