-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-spec-v57-x1.toml
More file actions
88 lines (70 loc) · 1.68 KB
/
app-spec-v57-x1.toml
File metadata and controls
88 lines (70 loc) · 1.68 KB
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
kind = "AppSpec"
roles = [101, 100]
type_tags = ["database"]
[meta]
id = "sysinner-mysql-x1"
name = "MySQL x1"
version = "1.0"
[[packages]]
name = "mysql57"
version = "5.7"
[[packages]]
name = "mysql-keeper"
version = "0.10"
[[executors]]
name = "sysinner-mysql-x1"
exec_start = """
if pidof mysql-keeper; then
exit 0
fi
mkdir -p /opt/mysql/mysql57/
rsync -av {{.inpack_prefix_mysql57}}/* /opt/mysql/mysql57/
mkdir -p /opt/mysql/keeper
rsync -av {{.inpack_prefix_mysql_keeper}}/* /opt/mysql/keeper/
/opt/mysql/keeper/bin/mysql-keeper -log_dir=/opt/mysql/keeper/log -minloglevel=1 -logtolevels=true > /dev/null 2>&1 &
"""
exec_stop = "killall mysql-keeper\nkillall mysql57d"
priority = 4
[executors.plan]
on_tick = 60
[[service_ports]]
name = "mysql"
box_port = 3306
[configurator]
name = "cfg/sysinner-mysql"
[[configurator.fields]]
name = "db_name"
title = "Database Name"
type = 1
default = "dbaction"
auto_fill = "defval"
[[configurator.fields]]
name = "db_auth"
title = "Database Password"
type = 1
auto_fill = "hexstr_32"
[[configurator.fields]]
name = "db_user"
title = "Database User"
type = 1
default = "dbuser"
auto_fill = "defval"
[[configurator.fields]]
name = "memory_usage_limit"
title = "Memory Usage In Percentage"
prompt = "Range in 10 ~ 100"
type = 1
default = "20"
description = "will allocating 10% ~ 100% Memory Size to this Instance"
[exp_res]
cpu_min = 2
mem_min = 128
vol_min = 1
[exp_deploy]
rep_min = 1
rep_max = 1
sys_state = 1
network_mode = 1
[[urls]]
name = "gdoc"
url = "https://www.sysinner.cn/gdoc/view/app-guide/mysql/v57-x1.md"