forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
redis-instance.yml
169 lines (169 loc) · 5.06 KB
/
redis-instance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: 'Alibaba Cloud ROS Sample Template: Create a Redis instance of a VPC network
type.'
zh-cn: 阿里云资源编排示例模板:创建一台VPC网络类型的Redis实例。
Parameters:
ZoneId:
Type: String
Label:
en: Zone ID
zh-cn: 可用区
Description:
en: Before you create an instance, confirm that the Availability Zone supports
the specifications of Redis resources.
zh-cn: 创建实例前,请确认可用区是否支持Redis资源的规格。
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
InstanceClass:
Type: String
Label:
en: Instance Type
zh-cn: 实例规格
Description:
en: Instance specifications, please refer to:<a href='https://www.alibabacloud.com/help/en/doc-detail/26350.html'
target='_blank'><b><font color='blue'>View specifications</font></b></a>
zh-cn: 实例规格,请参考:<a href='https://help.aliyun.com/document_detail/26350.html'
target='_blank'><b><font color='blue'>查看规格信息</font></b></a>
InstanceName:
Type: String
Label:
en: Instance Name
zh-cn: 实例名称
Description:
en: The instance name, [2, 128] English or Chinese characters, must start with
a letter or Chinese in size, can contain numbers, '_' or '.', '-'.
zh-cn: 实例名称,[2,128]英文或中文字符,必须以字母或中文开头,可以包含数字、下划线或“.”、“-”。
Default: DefaultRedis
EvictionPolicy:
Type: String
Label:
en: Eviction Policy
zh-cn: 数据逐出策略
Description:
en: 'Cache data eviction strategy: volatile-lru(Most recently used expired data),
volatile-ttl(Being expiring data), volatile-random(Any expired data), allkeys-lru(Least
recently used data), allkeys-random(Arbitrarily select data)、no-enviction(Do
not delete any data)'
zh-cn: 缓存数据逐出策略:volatile lru(最近使用的过期数据)、volatile ttl(正在过期数据)、volatile random(任何过期数据)、allkeys
lru(最近使用的最少数据)、allkeys random(任意选择数据)、no enviction(不要删除任何数据)
Default: noeviction
AllowedValues:
- noeviction
- allkeys-lru
- volatile-lru
- allkeys-random
- volatile-random
- volatile-ttl
Password:
Type: String
Label:
en: Instance Password
zh-cn: 实例密码
Description:
en: 'Length 8-32 characters, can contain size letters, Numbers and special symbols,
including:! @ # $ % ^ & * ( ) _ + - ='
zh-cn: 长度8-32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*()_+-=)
ConstraintDescription:
en: '8-32 characters, can contain size letters, Numbers and special symbols,
including:! @ # $ % ^ & * ( ) _ + - ='
zh-cn: 8-32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*()_+-=)
MinLength: '8'
MaxLength: '32'
NoEcho: true
EngineVersion:
Type: String
Label:
en: Engine Version
zh-cn: 数据库版本
Resources:
EcsVpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock: 192.168.0.0/16
Metadata:
ALIYUN::ROS::Designer:
id: 47aaecc4-284b-4c8b-a95b-658a02e703d7
EcsVSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: EcsVpc
CidrBlock: 192.168.10.0/24
DependsOn: EcsVpc
Metadata:
ALIYUN::ROS::Designer:
id: 310a29ec-fec6-46b6-a91c-d4b17f60ec39
RedisInstance:
Type: ALIYUN::REDIS::Instance
Properties:
EngineVersion:
Ref: EngineVersion
ZoneId:
Ref: ZoneId
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
EvictionPolicy:
Ref: EvictionPolicy
InstanceClass:
Ref: InstanceClass
InstanceName:
Ref: InstanceName
Password:
Ref: Password
DependsOn: EcsVSwitch
Metadata:
ALIYUN::ROS::Designer:
id: b6a58ec1-4f18-400c-ba63-50402f945e8d
Outputs:
InstanceId:
Value:
Fn::GetAtt:
- RedisInstance
- InstanceId
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ZoneId
- InstanceClass
- InstanceName
- EvictionPolicy
- EngineVersion
- Password
Label:
default: REDIS
TemplateTags:
- acs:example:数据库:创建Redis实例
ALIYUN::ROS::Designer:
310a29ec-fec6-46b6-a91c-d4b17f60ec39:
embeds:
- b6a58ec1-4f18-400c-ba63-50402f945e8d
position:
x: 263
y: 75
size:
height: 140
width: 120
z: 1
47aaecc4-284b-4c8b-a95b-658a02e703d7:
embeds:
- 310a29ec-fec6-46b6-a91c-d4b17f60ec39
position:
x: 193
y: 13
size:
height: 258
width: 265
z: 0
b6a58ec1-4f18-400c-ba63-50402f945e8d:
position:
x: 294
y: 123
size:
height: 60
width: 60
z: 2