Skip to content

Commit 01ebe6c

Browse files
author
Visakh Muraleedharan
committed
s3fs mount issue fix
1 parent 94c7546 commit 01ebe6c

File tree

2 files changed

+44
-126
lines changed

2 files changed

+44
-126
lines changed

releases/R2022a/NeuroTemplateR2022a.json

+22-63
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@
139139
"Statement": [
140140
{
141141
"Effect": "Allow",
142-
"Action": [
143-
"s3:GetObject"
144-
],
142+
"Action": ["s3:GetObject"],
145143
"Resource": {
146144
"Fn::Join": [
147145
"",
@@ -461,16 +459,16 @@
461459
"Ref": "AWS::Region"
462460
},
463461
"\n",
464-
"sudo apt-get update\n",
465-
"sudo apt-get install s3fs\n",
462+
"sudo apt-get update -y\n",
463+
"sudo apt-get install s3fs -y\n",
466464
"mkdir -p /home/ubuntu/Documents/MATLAB\n",
467465
"sudo chown ubuntu:ubuntu /home/ubuntu/Documents/MATLAB\n",
468466
"cd /home/ubuntu/Documents/MATLAB\n",
469467
"sudo git clone https://github.com/NeurodataWithoutBorders/matnwb.git\n",
470-
"sudo chown ubuntu:ubuntu /home/ubuntu/matnwb\n",
471-
"cd /home/ubuntu\n",
472-
"mkdir -m a=rwx s3-dandi\n",
473-
"s3fs -o public_bucket=1 -o umask=0022 dandiarchive ~/s3-dandi"
468+
"sudo chown -R ubuntu:ubuntu /home/ubuntu/Documents/MATLAB/matnwb\n",
469+
"mkdir /home/ubuntu/s3-dandi\n",
470+
"sudo chown ubuntu:ubuntu /home/ubuntu/s3-dandi\n",
471+
"su -c 's3fs -o public_bucket=1 dandiarchive /home/ubuntu/s3-dandi' ubuntu\n"
474472
]
475473
]
476474
}
@@ -541,9 +539,7 @@
541539
"name": "runCommands",
542540
"inputs": {
543541
"timeoutSeconds": "60",
544-
"runCommand": [
545-
"{{ commands }}"
546-
]
542+
"runCommand": ["{{ commands }}"]
547543
}
548544
}
549545
]
@@ -586,10 +582,7 @@
586582
"Runtime": "python3.8",
587583
"Timeout": "60",
588584
"Role": {
589-
"Fn::GetAtt": [
590-
"AutoShutdownLambdaRole",
591-
"Arn"
592-
]
585+
"Fn::GetAtt": ["AutoShutdownLambdaRole", "Arn"]
593586
}
594587
}
595588
},
@@ -696,10 +689,7 @@
696689
"Targets": [
697690
{
698691
"Arn": {
699-
"Fn::GetAtt": [
700-
"AutoShutdownLambda",
701-
"Arn"
702-
]
692+
"Fn::GetAtt": ["AutoShutdownLambda", "Arn"]
703693
},
704694
"Id": "TargetFunctionV1"
705695
}
@@ -715,10 +705,7 @@
715705
"Action": "lambda:InvokeFunction",
716706
"Principal": "events.amazonaws.com",
717707
"SourceArn": {
718-
"Fn::GetAtt": [
719-
"AutoShutdownScheduledRule",
720-
"Arn"
721-
]
708+
"Fn::GetAtt": ["AutoShutdownScheduledRule", "Arn"]
722709
}
723710
}
724711
},
@@ -754,19 +741,13 @@
754741
"Description": "Specify the access protocol to access this instance",
755742
"Default": "RDP",
756743
"Type": "String",
757-
"AllowedValues": [
758-
"NICE DCV",
759-
"RDP"
760-
]
744+
"AllowedValues": ["NICE DCV", "RDP"]
761745
},
762746
"UseElasticIpAddress": {
763747
"Description": "Choose whether you want to keep the same public IP address for the instance",
764748
"Default": "No",
765749
"Type": "String",
766-
"AllowedValues": [
767-
"Yes",
768-
"No"
769-
]
750+
"AllowedValues": ["Yes", "No"]
770751
},
771752
"RootVolumeSize": {
772753
"Description": "Specify the size in GB of the root volume",
@@ -831,10 +812,7 @@
831812
"EnableCloudWatch": {
832813
"Description": "Choose whether you want to enable cloudwatch logging for the MATLAB instance",
833814
"Type": "String",
834-
"AllowedValues": [
835-
"Yes",
836-
"No"
837-
],
815+
"AllowedValues": ["Yes", "No"],
838816
"Default": "No"
839817
},
840818
"AutoShutdown": {
@@ -899,10 +877,7 @@
899877
"Assert": {
900878
"Fn::EachMemberEquals": [
901879
{
902-
"Fn::ValueOfAll": [
903-
"AWS::EC2::Subnet::Id",
904-
"VpcId"
905-
]
880+
"Fn::ValueOfAll": ["AWS::EC2::Subnet::Id", "VpcId"]
906881
},
907882
{
908883
"Ref": "VPC"
@@ -1095,10 +1070,7 @@
10951070
[
10961071
"https://",
10971072
{
1098-
"Fn::GetAtt": [
1099-
"MATLABEC2Instance",
1100-
"PublicDnsName"
1101-
]
1073+
"Fn::GetAtt": ["MATLABEC2Instance", "PublicDnsName"]
11021074
},
11031075
":8443/#console"
11041076
]
@@ -1109,10 +1081,7 @@
11091081
"Condition": "UseXRDP",
11101082
"Description": "Public DNSName of the newly created EC2 instance",
11111083
"Value": {
1112-
"Fn::GetAtt": [
1113-
"MATLABEC2Instance",
1114-
"PublicDnsName"
1115-
]
1084+
"Fn::GetAtt": ["MATLABEC2Instance", "PublicDnsName"]
11161085
}
11171086
}
11181087
},
@@ -1147,35 +1116,25 @@
11471116
"Label": {
11481117
"default": "Network Configuration"
11491118
},
1150-
"Parameters": [
1151-
"VPC",
1152-
"Subnet",
1153-
"AdditionalSecurityGroup"
1154-
]
1119+
"Parameters": ["VPC", "Subnet", "AdditionalSecurityGroup"]
11551120
},
11561121
{
11571122
"Label": {
11581123
"default": "License Configuration"
11591124
},
1160-
"Parameters": [
1161-
"LicenseManager"
1162-
]
1125+
"Parameters": ["LicenseManager"]
11631126
},
11641127
{
11651128
"Label": {
11661129
"default": "Logging Configuration"
11671130
},
1168-
"Parameters": [
1169-
"EnableCloudWatch"
1170-
]
1131+
"Parameters": ["EnableCloudWatch"]
11711132
},
11721133
{
11731134
"Label": {
11741135
"default": "Autoshutdown Configuration"
11751136
},
1176-
"Parameters": [
1177-
"AutoShutdown"
1178-
]
1137+
"Parameters": ["AutoShutdown"]
11791138
}
11801139
],
11811140
"ParameterLabels": {
@@ -1227,4 +1186,4 @@
12271186
}
12281187
}
12291188
}
1230-
}
1189+
}

releases/R2022b/NeuroTemplateR2022b.json

+22-63
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@
155155
"Statement": [
156156
{
157157
"Effect": "Allow",
158-
"Action": [
159-
"s3:GetObject"
160-
],
158+
"Action": ["s3:GetObject"],
161159
"Resource": {
162160
"Fn::Join": [
163161
"",
@@ -455,16 +453,16 @@
455453
"Ref": "AWS::Region"
456454
},
457455
"\n",
458-
"sudo apt-get update\n",
459-
"sudo apt-get install s3fs\n",
456+
"sudo apt-get update -y\n",
457+
"sudo apt-get install s3fs -y\n",
460458
"mkdir -p /home/ubuntu/Documents/MATLAB\n",
461459
"sudo chown ubuntu:ubuntu /home/ubuntu/Documents/MATLAB\n",
462460
"cd /home/ubuntu/Documents/MATLAB\n",
463461
"sudo git clone https://github.com/NeurodataWithoutBorders/matnwb.git\n",
464-
"sudo chown ubuntu:ubuntu /home/ubuntu/matnwb\n",
465-
"cd /home/ubuntu\n",
466-
"mkdir -m a=rwx s3-dandi\n",
467-
"s3fs -o public_bucket=1 -o umask=0022 dandiarchive ~/s3-dandi"
462+
"sudo chown -R ubuntu:ubuntu /home/ubuntu/Documents/MATLAB/matnwb\n",
463+
"mkdir /home/ubuntu/s3-dandi\n",
464+
"sudo chown ubuntu:ubuntu /home/ubuntu/s3-dandi\n",
465+
"su -c 's3fs -o public_bucket=1 dandiarchive /home/ubuntu/s3-dandi' ubuntu\n"
468466
]
469467
]
470468
}
@@ -535,9 +533,7 @@
535533
"name": "runCommands",
536534
"inputs": {
537535
"timeoutSeconds": "60",
538-
"runCommand": [
539-
"{{ commands }}"
540-
]
536+
"runCommand": ["{{ commands }}"]
541537
}
542538
}
543539
]
@@ -580,10 +576,7 @@
580576
"Runtime": "python3.8",
581577
"Timeout": "60",
582578
"Role": {
583-
"Fn::GetAtt": [
584-
"AutoShutdownLambdaRole",
585-
"Arn"
586-
]
579+
"Fn::GetAtt": ["AutoShutdownLambdaRole", "Arn"]
587580
}
588581
}
589582
},
@@ -702,10 +695,7 @@
702695
"Targets": [
703696
{
704697
"Arn": {
705-
"Fn::GetAtt": [
706-
"AutoShutdownLambda",
707-
"Arn"
708-
]
698+
"Fn::GetAtt": ["AutoShutdownLambda", "Arn"]
709699
},
710700
"Id": "TargetFunctionV1"
711701
}
@@ -721,10 +711,7 @@
721711
"Action": "lambda:InvokeFunction",
722712
"Principal": "events.amazonaws.com",
723713
"SourceArn": {
724-
"Fn::GetAtt": [
725-
"AutoShutdownScheduledRule",
726-
"Arn"
727-
]
714+
"Fn::GetAtt": ["AutoShutdownScheduledRule", "Arn"]
728715
}
729716
}
730717
},
@@ -760,19 +747,13 @@
760747
"Description": "Access protocol to connect to this instance",
761748
"Default": "RDP",
762749
"Type": "String",
763-
"AllowedValues": [
764-
"NICE DCV",
765-
"RDP"
766-
]
750+
"AllowedValues": ["NICE DCV", "RDP"]
767751
},
768752
"UseElasticIpAddress": {
769753
"Description": "Flag indicating whether you want to keep the same public IP address for the instance",
770754
"Default": "No",
771755
"Type": "String",
772-
"AllowedValues": [
773-
"Yes",
774-
"No"
775-
]
756+
"AllowedValues": ["Yes", "No"]
776757
},
777758
"RootVolumeSize": {
778759
"Description": "Size in GB of the root volume",
@@ -844,10 +825,7 @@
844825
"EnableCloudWatch": {
845826
"Description": "Flag indicating whether cloudwatch logging for the MATLAB instance is enabled.",
846827
"Type": "String",
847-
"AllowedValues": [
848-
"Yes",
849-
"No"
850-
],
828+
"AllowedValues": ["Yes", "No"],
851829
"Default": "No"
852830
},
853831
"AutoShutdown": {
@@ -912,10 +890,7 @@
912890
"Assert": {
913891
"Fn::EachMemberEquals": [
914892
{
915-
"Fn::ValueOfAll": [
916-
"AWS::EC2::Subnet::Id",
917-
"VpcId"
918-
]
893+
"Fn::ValueOfAll": ["AWS::EC2::Subnet::Id", "VpcId"]
919894
},
920895
{
921896
"Ref": "VPC"
@@ -1123,10 +1098,7 @@
11231098
[
11241099
"https://",
11251100
{
1126-
"Fn::GetAtt": [
1127-
"MATLABEC2Instance",
1128-
"PublicDnsName"
1129-
]
1101+
"Fn::GetAtt": ["MATLABEC2Instance", "PublicDnsName"]
11301102
},
11311103
":8443/#console"
11321104
]
@@ -1137,10 +1109,7 @@
11371109
"Condition": "UseXRDP",
11381110
"Description": "Public DNSName of the newly created EC2 instance",
11391111
"Value": {
1140-
"Fn::GetAtt": [
1141-
"MATLABEC2Instance",
1142-
"PublicDnsName"
1143-
]
1112+
"Fn::GetAtt": ["MATLABEC2Instance", "PublicDnsName"]
11441113
}
11451114
}
11461115
},
@@ -1176,35 +1145,25 @@
11761145
"Label": {
11771146
"default": "Network Configuration"
11781147
},
1179-
"Parameters": [
1180-
"VPC",
1181-
"Subnet",
1182-
"AdditionalSecurityGroup"
1183-
]
1148+
"Parameters": ["VPC", "Subnet", "AdditionalSecurityGroup"]
11841149
},
11851150
{
11861151
"Label": {
11871152
"default": "License Configuration"
11881153
},
1189-
"Parameters": [
1190-
"LicenseManager"
1191-
]
1154+
"Parameters": ["LicenseManager"]
11921155
},
11931156
{
11941157
"Label": {
11951158
"default": "Logging Configuration"
11961159
},
1197-
"Parameters": [
1198-
"EnableCloudWatch"
1199-
]
1160+
"Parameters": ["EnableCloudWatch"]
12001161
},
12011162
{
12021163
"Label": {
12031164
"default": "Autoshutdown Configuration"
12041165
},
1205-
"Parameters": [
1206-
"AutoShutdown"
1207-
]
1166+
"Parameters": ["AutoShutdown"]
12081167
}
12091168
],
12101169
"ParameterLabels": {
@@ -1259,4 +1218,4 @@
12591218
}
12601219
}
12611220
}
1262-
}
1221+
}

0 commit comments

Comments
 (0)