Skip to content

Commit c3cd51a

Browse files
committed
Merge branch 'topic-release' into main
2 parents 0f7aaa1 + dc40862 commit c3cd51a

20 files changed

Lines changed: 599 additions & 197 deletions

README.md

Lines changed: 166 additions & 66 deletions
Large diffs are not rendered by default.

cft-templates/Rstudio.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ Parameters:
2323
AllowedValues:
2424
- t2.medium
2525
- t2.large
26-
- t2.xlarge
27-
- m4.xlarge
28-
- c4.xlarge
29-
- r4.xlarge
30-
- r4.xlarge
31-
- p2.xlarge
26+
- t3.medium
27+
- t3.large
3228

3329
ConstraintDescription: Valid instance type in the t2 families
3430
Default: t2.medium
@@ -86,14 +82,10 @@ Resources:
8682
ToPort: 22
8783
IpProtocol: tcp
8884
- CidrIp: "0.0.0.0/0"
89-
FromPort: 80
90-
ToPort: 80
85+
FromPort: 443
86+
ToPort: 443
9187
IpProtocol: tcp
92-
- CidrIp: "0.0.0.0/0"
93-
FromPort: 8787
94-
ToPort: 8787
95-
IpProtocol: tcp
96-
GroupDescription: RStudio and Shiny Security Group
88+
GroupDescription: RStudio Security Group
9789

9890
RstudioEC2Instance:
9991
Type: AWS::EC2::Instance
@@ -121,11 +113,13 @@ Resources:
121113
#add user(s)
122114
sudo useradd -m -s /bin/bash ${InitialUser}
123115
sudo echo ${InitialUser}:${InitialPassword} | chpasswd
116+
#Add user to the sudo group
117+
sudo usermod -a -G wheel ${InitialUser}
124118

125119
#Download and execute bootstrap script
126120
aws s3 cp "${EnvironmentInstanceFiles}/get_bootstrap.sh" "/tmp"
127121
chmod 500 "/tmp/get_bootstrap.sh"
128-
/tmp/get_bootstrap.sh "${EnvironmentInstanceFiles}" '${S3Mounts}'
122+
/tmp/get_bootstrap.sh "${EnvironmentInstanceFiles}" '${S3Mounts}' "${InitialUser}"
129123

130124
/opt/aws/bin/cfn-signal --exit-code 0 --resource RstudioEC2Instance --region ${AWS::Region} --stack ${AWS::StackName}
131125

@@ -138,4 +132,4 @@ Outputs:
138132
InstanceId:
139133
Value: !Ref 'RstudioEC2Instance'
140134
ApplicationPort:
141-
Value: '8787'
135+
Value: '443'

config/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"accountCleanupEventTriggerURL": "http://sp2_cc-3102:3002/accountCleanupEvent",
9797
"paramChangeUpdateURL": "http://sp2_cc-3102:3002/researchProducts/productParams",
9898
"credentialManagementURL": "http://sp2_cc-3102:3002/authentication",
99+
"projectSyncURL": "http://sp2_cc-3102:3002/sync-product",
99100
"researchGatewayAPIToken": "REPLACE_WITH_API_TOKEN",
100101
"nsUseSecretsManager": true,
101102
"thresholdPercentage": 80,

config/nf-core-pipeline.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
"pipeline_git_url": "https://github.com/nf-core/ampliseq",
2525
"pipeline_container": "nfcore/ampliseq"
2626
},
27-
{
28-
"pipeline_name": "fetchngs",
29-
"pipeline_git_url": "https://github.com/nf-core/fetchngs",
30-
"pipeline_container": ""
31-
},
3227
{
3328
"pipeline_name": "mhcquant",
3429
"pipeline_git_url": "https://github.com/nf-core/mhcquant",

config/settings-config.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@
138138
"InstanceIPAddress",
139139
"InstanceId"
140140
]
141+
},
142+
{
143+
"menu": "Explore",
144+
"imageUrl": "../../assets/images/direction@2x.png",
145+
"outputsRequired": []
141146
}
142147
],
143148
"action": [
@@ -224,6 +229,11 @@
224229
"InstanceDNSName",
225230
"ApplicationPort"
226231
]
232+
},
233+
{
234+
"menu": "Explore",
235+
"imageUrl": "../../assets/images/direction@2x.png",
236+
"outputsRequired": []
227237
}
228238
],
229239
"action": [
@@ -305,19 +315,24 @@
305315
},
306316
{
307317
"menu": "Monitor Pipeline",
308-
"imageUrl": "../../assets/images/link@2x.png",
318+
"imageUrl": "../../assets/images/monitor_pipeline.png",
309319
"outputsRequired": [
310320
"InstanceIPAddress",
311321
"InstanceId"
312322
]
313323
},
314324
{
315325
"menu": "View Outputs",
316-
"imageUrl": "../../assets/images/link@2x.png",
326+
"imageUrl": "../../assets/images/view_outputs.png",
317327
"outputsRequired": [
318328
"InstanceIPAddress",
319329
"InstanceId"
320330
]
331+
},
332+
{
333+
"menu": "Explore",
334+
"imageUrl": "../../assets/images/direction@2x.png",
335+
"outputsRequired": []
321336
}
322337
],
323338
"action": [

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.10.0_b1001
21+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.10.2_b1057
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.10.0_b1001
45+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.10.2_b1057
4646
secrets:
4747
- source: sp2prod-config.json
4848
target: /rlc/cc/server/app/config/config.json
@@ -61,7 +61,7 @@ services:
6161
command: node ./app/scheduler/app.js
6262

6363
notificationsink:
64-
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/notificationsink:1.9.0_b2
64+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/notificationsink:1.10.2_b3
6565
secrets:
6666
- source: sp2prod-config.json
6767
target: /opt/app/config/config.json

dump/configs.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,24 @@
297297
"link": "https://youtu.be/zDksIb1n9zI?t=100"
298298
},
299299
"assignProducts": {
300-
"link": "https://youtu.be/zDksIb1n9zI?t=100"
300+
"link": "https://youtu.be/zDksIb1n9zI?t=126"
301301
},
302302
"users": {
303-
"link": "https://youtu.be/zDksIb1n9zI?t=100"
303+
"link": "https://youtu.be/zDksIb1n9zI?t=121"
304304
}
305305
}
306+
},
307+
{
308+
"_id": {
309+
"$oid": "6239b4f485c63a8c118d8e17"
310+
},
311+
"key": "projectCostControl",
312+
"value": {
313+
"isCostControlEnabled": true,
314+
"defaultAllowProjectActionsOverride": true,
315+
"projectPauseThresholdPercentage": 80,
316+
"projectStopThresholdPercentage": 90,
317+
"costControlReadMoreLink": "https://researchgateway.readthedocs.io/en/latest/"
318+
}
306319
}
307320
]

dump/standardcatalogitems.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,125 @@
2929
"availableRegions": [],
3030
"assignedOU": []
3131
},
32+
{
33+
"_id": {
34+
"$oid": "60504955135663522b880ade"
35+
},
36+
"name": "Docker on Amazon EC2 Linux",
37+
"description": "Use Docker, a popular container orchestration software, on Amazon Elastic Compute Cloud (Amazon EC2).",
38+
"fileName": "ec2-linux-docker.yml",
39+
"tags": [
40+
{
41+
"Key": "EstimatedTimeToProvision",
42+
"Value": "10 Minutes"
43+
},
44+
{
45+
"Key": "DetailsLink",
46+
"Value": "https://researchgateway.readthedocs.io/en/latest/linux.html"
47+
},
48+
{
49+
"Key": "Service",
50+
"Value": "EC2"
51+
},
52+
{
53+
"Key": "TypeOfProduct",
54+
"Value": "Research"
55+
}
56+
],
57+
"owner": "RL",
58+
"portfolio": "RGPortfolio",
59+
"availableRegions": [],
60+
"assignedOU": [],
61+
"metaData": {
62+
"pre_provisioning": [
63+
{
64+
"code": "CFT_PARAMS",
65+
"params": [
66+
{
67+
"name": "EnvironmentInstanceFiles",
68+
"type": "RL::SC::PARAM::HD"
69+
},
70+
{
71+
"name": "IamPolicyDocument",
72+
"type": "RL::SC::PARAM::HD"
73+
},
74+
{
75+
"name": "S3Mounts",
76+
"type": "RL::SC::PARAM::HD"
77+
},
78+
{
79+
"name": "Namespace",
80+
"type": "RL::SC::PARAM::HD"
81+
}
82+
]
83+
}
84+
],
85+
"post_provisioning": [],
86+
"checks_before_assigning_product": [],
87+
"checks_after_assigning_product": [],
88+
"permission_required": {}
89+
}
90+
},
91+
{
92+
"_id": {
93+
"$oid": "60504955135663522b880edb"
94+
},
95+
"name": "MySQL",
96+
"description": "MySQL container on Docker EC2",
97+
"fileName": "ec2-linux-docker-mysql.yml",
98+
"tags": [
99+
{
100+
"Key": "EstimatedTimeToProvision",
101+
"Value": "10 Minutes"
102+
},
103+
{
104+
"Key": "DetailsLink",
105+
"Value": "https://researchgateway.readthedocs.io/en/latest/linux.html"
106+
},
107+
{
108+
"Key": "Service",
109+
"Value": "EC2"
110+
},
111+
{
112+
"Key": "TypeOfProduct",
113+
"Value": "Research"
114+
}
115+
],
116+
"owner": "RL",
117+
"portfolio": "RGPortfolio",
118+
"availableRegions": [],
119+
"assignedOU": [],
120+
"metaData": {
121+
"pre_provisioning": [
122+
{
123+
"code": "CFT_PARAMS",
124+
"params": [
125+
{
126+
"name": "EnvironmentInstanceFiles",
127+
"type": "RL::SC::PARAM::HD"
128+
},
129+
{
130+
"name": "IamPolicyDocument",
131+
"type": "RL::SC::PARAM::HD"
132+
},
133+
{
134+
"name": "S3Mounts",
135+
"type": "RL::SC::PARAM::HD"
136+
},
137+
{
138+
"name": "Namespace",
139+
"type": "RL::SC::PARAM::HD"
140+
}
141+
]
142+
}
143+
],
144+
"post_provisioning": [],
145+
"checks_before_assigning_product": [],
146+
"checks_after_assigning_product": [],
147+
"permission_required": {}
148+
}
149+
},
150+
32151
{
33152
"_id": {
34153
"$oid": "60504955135663522b880cfd"

packer-rg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{
1313
"type": "amazon-ebs",
1414
"profile": "{{user `awsProfile`}}",
15-
"iam_instance_profile": "packer-role",
15+
"iam_instance_profile": "packer-role-test",
1616
"region": "{{user `awsRegion`}}",
1717
"vpc_id": "{{user `vpcId`}}",
1818
"subnet_id": "{{user `subnetId`}}",

products/RStudio/machine-images/config/infra/files/rstudio/check-idle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LAST_ACTIVE_TIME_FILENAME = '/tmp/last-active-rsession-time'
99
ACCESS_LOG_FILENAME = '/var/log/nginx/access.log'
1010

1111
# To disable auto-stop for RStudio, enter 0 as the value below for MAX_IDLE_MINUTES
12-
MAX_IDLE_MINUTES = 60
12+
MAX_IDLE_MINUTES = 15
1313

1414
if MAX_IDLE_MINUTES == 0:
1515
print('Auto-stop disabled. Exiting..')
@@ -26,7 +26,8 @@ def get_activity_count():
2626
for line in access_log:
2727
# nginx sometimes pings the RStudio instance
2828
# which does not indicate user activity
29-
if "POST /events/get_events" not in line:
29+
# Load balancer health check should also be not considered as an activity
30+
if "POST /events/get_events" not in line and "ELB-HealthChecker/2.0" not in line:
3031
non_ping_count += 1
3132
return (non_ping_count)
3233

0 commit comments

Comments
 (0)