Skip to content

Commit 5deed5c

Browse files
author
Dougal Ballantyne
committed
Fix: EBS encryption for /shared
1 parent 1c38c85 commit 5deed5c

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66
=====
77

88
* feature:``cfncluster``: Added option to encrypt ephemeral drives with in-memory keys
9+
* feature:``cfncluster``: Support for EBS encryption on /shared volume
910
* feature:``cfncluster``: Detect all ephemeral drives, stripe and mount as /scratch
1011
* feature:``cfncluster``: Support for placement groups
1112
* feature:``cfncluster``: Support for cluster placement logic. Can either be cluster or compute.

cli/cfncluster/cfnconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def __init__(self, args):
160160

161161
# Dictionary list of all EBS options
162162
self.__ebs_options = dict(ebs_snapshot_id='EBSSnapshotId', volume_type='VolumeType', volume_size='VolumeSize',
163-
volume_iops='VolumeIOPS')
163+
volume_iops='VolumeIOPS', encrypted='EBSEncryption')
164164

165165
try:
166166
if self.__ebs_section:

cli/cfncluster/examples/config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ availability_zones =
133133
#volume_size = 200
134134
# Number of IOPS for io1 type volumes
135135
#volume_iops = 200
136+
# Use encrypted volume (should not be used with snapshots)
137+
# (defaults to false for default template)
138+
#encrypted = false
136139

137140
## Scaling settings
138141
#[scaling custom]

cloudformation/cfncluster.cfn.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,16 @@
309309
"Description" : "Postinstall script args passed to the postinstall script.",
310310
"Type" : "String",
311311
"Default" : "NONE"
312+
},
313+
"EBSEncryption" : {
314+
"Description" : "Boolean flag to use EBS encryption for /shared volume. (Not to be used for snapshots)",
315+
"Type" : "String",
316+
"Default" : "false",
317+
"ConstraintDescription" : "true/false",
318+
"AllowedValues" : [
319+
"true",
320+
"false"
321+
]
312322
}
313323
},
314324
"Conditions" : {
@@ -434,6 +444,14 @@
434444
},
435445
"cluster"
436446
]
447+
},
448+
"UseEBSEncryption" : {
449+
"Fn::Equals" : [
450+
{
451+
"Ref" : "EBSEncryption"
452+
},
453+
"true"
454+
]
437455
}
438456
},
439457
"Mappings" : {
@@ -1671,6 +1689,17 @@
16711689
"Ref" : "AWS::NoValue"
16721690
}
16731691
]
1692+
},
1693+
"Encrypted" : {
1694+
"Fn::If" : [
1695+
"UseEBSEncryption",
1696+
{
1697+
"Ref" : "EBSEncryption"
1698+
},
1699+
{
1700+
"Ref" : "AWS::NoValue"
1701+
}
1702+
]
16741703
}
16751704
}
16761705
}

0 commit comments

Comments
 (0)