Skip to content

Commit 6536d96

Browse files
committed
FEAT: Change cf templates to use vcs for bootstrap
1 parent ac57069 commit 6536d96

File tree

4 files changed

+50
-4
lines changed

4 files changed

+50
-4
lines changed

cloud/aws-emr/bootstrap/install-hail.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ while [ $# -gt 0 ]; do
2525
shift
2626
SPARK_VERSION=$1
2727
;;
28+
--path-prefix)
29+
# not used by this script
30+
shift
31+
;;
2832
-*)
2933
error_msg "unrecognized option: $1"
3034
;;

cloud/aws-emr/bootstrap/install-jupyter-noNotebook.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ while [ $# -gt 0 ]; do
2929
shift
3030
NotebookPath=$1
3131
;;
32+
--path-prefix)
33+
# Passed in by default, but not used here
34+
shift
35+
;;
3236
-*)
3337
error_msg "unrecognized option: $1"
3438
;;

cloud/aws-emr/cf-templates/VariantSpark_Hail_EMR_Notebook.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
AWSTemplateFormatVersion: '2010-09-09'
33
Description: Variant Spark CF template to spin EMR clusters with Jupyter Notebook.
4+
Mappings:
5+
Constants:
6+
GitHub:
7+
Repo: "https://github.com/bhosking/VariantSpark"
8+
Version: "bootstrap-vcs"
49
Parameters:
510
# Hardware Group
611
MasterNodePricing:
@@ -115,19 +120,33 @@ Resources:
115120
- Name: Install Jupyter
116121
ScriptBootstrapAction:
117122
Args:
123+
- "--path-prefix"
124+
- !Sub
125+
- "${repo}/raw/${version}"
126+
- {repo: !FindInMap [Constants, GitHub, Repo], version: !FindInMap [Constants, GitHub, Version]}
127+
- "--bootstrap-file"
128+
- "/cloud/aws-emr/bootstrap/install-jupyter.sh"
129+
- "--"
118130
- "--notebookPath"
119131
- Ref: NotebookDir
120-
Path: "s3://variant-spark/HailJupyter/install-jupyter.sh"
132+
Path: "s3://variant-spark/s3-bootstrap.sh"
121133
- Name: Install Hail
122134
ScriptBootstrapAction:
123135
Args:
136+
- "--path-prefix"
137+
- !Sub
138+
- "${repo}/raw/${version}"
139+
- {repo: !FindInMap [Constants, GitHub, Repo], version: !FindInMap [Constants, GitHub, Version]}
140+
- "--bootstrap-file"
141+
- "/cloud/aws-emr/bootstrap/install-hail.sh"
142+
- "--"
124143
- "--input-path"
125144
- "s3://variant-spark/HailJupyter/hail/0.1_2.2.1"
126145
- "--hail-version"
127146
- "0.1"
128147
- "--spark-version"
129148
- "2.2.1"
130-
Path: "s3://variant-spark/HailJupyter/install-hail.sh"
149+
Path: "s3://variant-spark/s3-bootstrap.sh"
131150
Configurations:
132151
- Classification: emrfs-site
133152
ConfigurationProperties:

cloud/aws-emr/cf-templates/VariantSpark_Hail_EMR_Step.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
AWSTemplateFormatVersion: '2010-09-09'
33
Description: Variant Spark CF template to spin EMR cluster to process a single VariantSpark job.
4+
Mappings:
5+
Constants:
6+
GitHub:
7+
Repo: "https://github.com/bhosking/VariantSpark"
8+
Version: "bootstrap-vcs"
49
Parameters:
510
# Random-Forest Parameters Group
611
NumTree:
@@ -183,17 +188,31 @@ Resources:
183188
BootstrapActions:
184189
- Name: Install Jupyter
185190
ScriptBootstrapAction:
186-
Path: "s3://variant-spark/HailJupyter/install-jupyter-noNotebook.sh"
191+
- "--path-prefix"
192+
- !Sub
193+
- "${repo}/raw/${version}"
194+
- {repo: !FindInMap [Constants, GitHub, Repo], version: !FindInMap [Constants, GitHub, Version]}
195+
- "--bootstrap-file"
196+
- "/cloud/aws-emr/bootstrap/install-jupyter-noNotebook.sh"
197+
- "--"
198+
Path: "s3://variant-spark/s3-bootstrap.sh"
187199
- Name: Install Hail
188200
ScriptBootstrapAction:
189201
Args:
202+
- "--path-prefix"
203+
- !Sub
204+
- "${repo}/raw/${version}"
205+
- {repo: !FindInMap [Constants, GitHub, Repo], version: !FindInMap [Constants, GitHub, Version]}
206+
- "--bootstrap-file"
207+
- "/cloud/aws-emr/bootstrap/install-hail.sh"
208+
- "--"
190209
- "--input-path"
191210
- "s3://variant-spark/HailJupyter/hail/0.1_2.2.1"
192211
- "--hail-version"
193212
- "0.1"
194213
- "--spark-version"
195214
- "2.2.1"
196-
Path: "s3://variant-spark/HailJupyter/install-hail.sh"
215+
Path: "s3://variant-spark/s3-bootstrap.sh"
197216
Configurations:
198217
- Classification: emrfs-site
199218
ConfigurationProperties:

0 commit comments

Comments
 (0)