Skip to content

Commit 4587a76

Browse files
committed
Adding dedicated tenancy and KMS keys
1 parent d21a796 commit 4587a76

File tree

4 files changed

+70
-4
lines changed

4 files changed

+70
-4
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
CHANGELOG
33
=========
44

5+
develop
6+
=======
7+
* feature:``cfncluster``: Support for dedicated tenancy
8+
* feature:``cfncluster``: Support for customer provided KMS keys (EBS and ephemeral)
9+
510
0.0.20
611
======
712
* feature:``cfncluster``: Support for D2 instances

cli/cfncluster/cfnconfig.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ def __init__(self, args):
203203
encrypted_ephemeral=('EncryptedEphemeral',None),pre_install_args=('PreInstallArgs',None),
204204
post_install_args=('PostInstallArgs',None), s3_read_resource=('S3ReadResource',None),
205205
s3_read_write_resource=('S3ReadWriteResource',None),cwl_region=('CWLRegion',None),
206-
cwl_log_group=('CWLLogGroup',None),shared_dir=('SharedDir',None)
206+
cwl_log_group=('CWLLogGroup',None),shared_dir=('SharedDir',None),tenancy=('Tenancy',None),
207+
ephemeral_kms_key_id=('EphemeralKMSKeyId',None), cluster_ready=('ClusterReadyScript','URL')
207208
)
208209

209210
# Loop over all the cluster options and add define to parameters, raise Exception if defined but null
@@ -234,7 +235,7 @@ def __init__(self, args):
234235

235236
# Dictionary list of all EBS options
236237
self.__ebs_options = dict(ebs_snapshot_id=('EBSSnapshotId','EC2Snapshot'), volume_type=('VolumeType',None),
237-
volume_size=('VolumeSize',None),
238+
volume_size=('VolumeSize',None), ebs_kms_key_id=('EBSKMSKeyId', None),
238239
volume_iops=('VolumeIOPS',None), encrypted=('EBSEncryption',None))
239240

240241
try:

cli/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def read(fname):
2020
return open(os.path.join(os.path.dirname(__file__), fname)).read()
2121

2222
console_scripts = ['cfncluster = cfncluster.cli:main']
23-
version = "0.0.20"
23+
version = "0.0.99"
2424
requires = ['boto>=2.38']
2525

2626
if sys.version_info[:2] == (2, 6):

cloudformation/cfncluster.cfn.json

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,30 @@
358358
"Description" : "CloudWatch Logs LogGroup",
359359
"Type" : "String",
360360
"Default" : "NONE"
361+
},
362+
"Tenancy" : {
363+
"Description" : "Type of placement requird in cfncluster, it can either be cluster or compute.",
364+
"Type" : "String",
365+
"Default" : "default",
366+
"AllowedValues" : [
367+
"default",
368+
"dedicated"
369+
]
370+
},
371+
"EBSKMSKeyId" : {
372+
"Description" : "KMS ARN for customer created master key, will be used for EBS encryption",
373+
"Type" : "String",
374+
"Default" : "NONE"
375+
},
376+
"EphemeralKMSKeyId" : {
377+
"Description" : "KMS ARN for customer created master key, will be used for ephemeral encryption",
378+
"Type" : "String",
379+
"Default" : "NONE"
380+
},
381+
"ClusterReadyScript" : {
382+
"Description" : "Cluster ready script URL. This is only on the MasterServer, when the cluster reaches CREATE_COMPLETE.",
383+
"Type" : "String",
384+
"Default" : "NONE"
361385
}
362386
},
363387
"Conditions" : {
@@ -598,6 +622,25 @@
598622
]
599623
}
600624
]
625+
},
626+
"UseEBSKMSKey" : {
627+
"Fn::And" : [
628+
{
629+
"Fn::Not" : [
630+
{
631+
"Fn::Equals" : [
632+
{
633+
"Ref" : "EBSKMSKeyId"
634+
},
635+
"NONE"
636+
]
637+
}
638+
]
639+
},
640+
{
641+
"Condition" : "UseEBSEncryption"
642+
}
643+
]
601644
}
602645
},
603646
"Mappings" : {
@@ -1390,6 +1433,9 @@
13901433
"Ref" : "AWS::NoValue"
13911434
}
13921435
]
1436+
},
1437+
"Tenancy" : {
1438+
"Ref" : "Tenancy"
13931439
}
13941440
},
13951441
"Metadata" : {
@@ -1941,7 +1987,10 @@
19411987
}
19421988
]
19431989
},
1944-
"InstanceMonitoring" : "false"
1990+
"InstanceMonitoring" : "false",
1991+
"PlacementTenancy" : {
1992+
"Ref" : "Tenancy"
1993+
}
19451994
},
19461995
"Metadata" : {
19471996
"Comment" : "cfncluster Compute server",
@@ -2455,6 +2504,17 @@
24552504
"Ref" : "AWS::NoValue"
24562505
}
24572506
]
2507+
},
2508+
"KmsKeyId" : {
2509+
"Fn::If" : [
2510+
"UseEBSKMSKey",
2511+
{
2512+
"Ref" : "EBSKMSKeyId"
2513+
},
2514+
{
2515+
"Ref" : "AWS::NoValue"
2516+
}
2517+
]
24582518
}
24592519
}
24602520
},

0 commit comments

Comments
 (0)