Skip to content

Commit 6ab2b6f

Browse files
authored
Update elasticache redis versions (#44)
* Elasticache test * Update elasticache redis versions Update accepted versions for redis (as of 2019-09-24).
1 parent dd84782 commit 6ab2b6f

3 files changed

Lines changed: 163 additions & 2 deletions

File tree

stacker_blueprints/elasticache/redis.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ def engine(self):
77

88
def get_engine_versions(self):
99
return ["2.6.13", "2.8.19", "2.8.21", "2.8.22", "2.8.23", "2.8.24",
10-
"2.8.6", "3.2.4"]
10+
"2.8.6", "3.2.4", "3.2.6", "4.0.10", "5.0.0", "5.0.3", "5.0.4",
11+
"5.0.5"]
1112

1213
def get_parameter_group_family(self):
13-
return ["redis2.6", "redis2.8", "redis3.2"]
14+
return ["redis2.6", "redis2.8", "redis3.2", "redis4.0", "redis5.0"]
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"Outputs": {
3+
"ClusterId": {
4+
"Value": {
5+
"Ref": "ReplicationGroup"
6+
}
7+
},
8+
"ClusterPort": {
9+
"Value": {
10+
"Fn::GetAtt": [
11+
"ReplicationGroup",
12+
"PrimaryEndPoint.Port"
13+
]
14+
}
15+
},
16+
"PrimaryAddress": {
17+
"Value": {
18+
"Fn::GetAtt": [
19+
"ReplicationGroup",
20+
"PrimaryEndPoint.Address"
21+
]
22+
}
23+
},
24+
"PrimaryCname": {
25+
"Value": {
26+
"Ref": "ReplicationGroupDnsRecord"
27+
}
28+
},
29+
"ReadAddresses": {
30+
"Value": {
31+
"Fn::Join": [
32+
",",
33+
{
34+
"Fn::GetAtt": [
35+
"ReplicationGroup",
36+
"ReadEndPoint.Addresses.List"
37+
]
38+
}
39+
]
40+
}
41+
},
42+
"SecurityGroup": {
43+
"Value": {
44+
"Ref": "SecurityGroup"
45+
}
46+
}
47+
},
48+
"Resources": {
49+
"ParameterGroup": {
50+
"Properties": {
51+
"CacheParameterGroupFamily": "redis5.0",
52+
"Description": "redis_cluster",
53+
"Properties": {}
54+
},
55+
"Type": "AWS::ElastiCache::ParameterGroup"
56+
},
57+
"ReplicationGroup": {
58+
"Properties": {
59+
"AutoMinorVersionUpgrade": "true",
60+
"AutomaticFailoverEnabled": "true",
61+
"CacheNodeType": "cache.r5.24xlarge",
62+
"CacheParameterGroupName": {
63+
"Ref": "ParameterGroup"
64+
},
65+
"CacheSubnetGroupName": {
66+
"Ref": "SubnetGroup"
67+
},
68+
"Engine": "redis",
69+
"EngineVersion": "5.0.5",
70+
"NotificationTopicArn": {
71+
"Ref": "AWS::NoValue"
72+
},
73+
"NumCacheClusters": 2,
74+
"Port": {
75+
"Ref": "AWS::NoValue"
76+
},
77+
"PreferredCacheClusterAZs": {
78+
"Ref": "AWS::NoValue"
79+
},
80+
"PreferredMaintenanceWindow": "Sun:11:00-Sun:12:00",
81+
"ReplicationGroupDescription": "redis_cluster",
82+
"SecurityGroupIds": [
83+
{
84+
"Ref": "SecurityGroup"
85+
}
86+
],
87+
"SnapshotArns": {
88+
"Ref": "AWS::NoValue"
89+
},
90+
"SnapshotRetentionLimit": {
91+
"Ref": "AWS::NoValue"
92+
},
93+
"SnapshotWindow": {
94+
"Ref": "AWS::NoValue"
95+
}
96+
},
97+
"Type": "AWS::ElastiCache::ReplicationGroup"
98+
},
99+
"ReplicationGroupDnsRecord": {
100+
"Properties": {
101+
"Comment": "ReplicationGroup CNAME Record",
102+
"HostedZoneId": "ABCDEFGHI0",
103+
"Name": {
104+
"Fn::Join": [
105+
".",
106+
[
107+
"redis-cluster",
108+
"empire"
109+
]
110+
]
111+
},
112+
"ResourceRecords": [
113+
{
114+
"Fn::GetAtt": [
115+
"ReplicationGroup",
116+
"PrimaryEndPoint.Address"
117+
]
118+
}
119+
],
120+
"TTL": "120",
121+
"Type": "CNAME"
122+
},
123+
"Type": "AWS::Route53::RecordSet"
124+
},
125+
"SecurityGroup": {
126+
"Properties": {
127+
"GroupDescription": "redis_cluster security group",
128+
"VpcId": "vpc-aaaabbbb"
129+
},
130+
"Type": "AWS::EC2::SecurityGroup"
131+
},
132+
"SubnetGroup": {
133+
"Properties": {
134+
"Description": "redis_cluster subnet group.",
135+
"SubnetIds": [
136+
"subnet-00000001",
137+
"subnet-00000002"
138+
]
139+
},
140+
"Type": "AWS::ElastiCache::SubnetGroup"
141+
}
142+
}
143+
}
144+

tests/test_elasticache.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace: test
2+
stacks:
3+
- name: redis_cluster
4+
class_path: stacker_blueprints.elasticache.redis.RedisReplicationGroup
5+
variables:
6+
VpcId: vpc-aaaabbbb
7+
Subnets: subnet-00000001,subnet-00000002
8+
AutoMinorVersionUpgrade: true
9+
CacheNodeType: cache.r5.24xlarge
10+
EngineVersion: 5.0.5
11+
NumCacheClusters: 2
12+
ParameterGroupFamily: redis5.0
13+
SnapshotRetentionLimit: 0
14+
InternalZoneId: ABCDEFGHI0
15+
InternalZoneName: empire
16+
InternalHostname: redis-cluster

0 commit comments

Comments
 (0)