forked from mysql/mysql-docker
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdesired_state.jsonc
137 lines (133 loc) · 5.33 KB
/
desired_state.jsonc
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
{
/*
Increment the Id for every new desired state, otherwise it will be ignored.
This also works as a reference to "RunningSince" fields - these can never be
higher than the Id.
*/
"Id": 1,
"RonDBRunning": true,
// A logical clock to perform rolling restarts of RonDB; it can never be higher than the Id
"RonDBRunningSince": 1,
// Make sure to adjust RonDBDownloadLink when changing this
"RonDBVersion": "22.10.3",
/*
The url nginx/hopsworks_proxy is a reverse proxy to repo.hops.works,
which is where Hopsworks hosts RonDB builds:
*/
"RonDBDownloadLink": "http://nginx/hopsworks_proxy/master/rondb-22.10.3-linux-glibc2.28-arm64_v8.tar.gz",
// A logical clock to perform rolling restarts of the ndb-agent; it can never be higher than the Id
"NdbAgentRunningSince": 1,
/*
Version 0.999 is an imaginary version which is identical to the current
build and is stored on the nginx server. It can be used to test rolling
software upgrades of the ndb-agent. The other available version is 1.0.
Make sure to also adjust NdbAgentDownloadLink when changing NdbAgentVersion.
*/
"NdbAgentVersion": "0.999",
"NdbAgentDownloadLink": "http://nginx/local/ndb-agent-0.999.tgz",
"OnDemandBackups": [
/*
This is an example of a backup that is saved on a Docker volume.
As this is the first desired state, this backup will be run right
away and therefore almost be empty.
If it is removed in a following desired state, the backup will be
deleted.
The same backup can be referenced in the field "RestoreFromBackup".
*/
{
"Id": 123,
"SinkType": "docker",
"SinkParameters": {
"TestParameter": "test-value"
}
}
],
/*
This backup has to exist before it can be set here. This field can only be
set if RonDBRunning has never been set to true before. Therefore, a cluster
can never restore its own backup.
Make sure that this backup is also referenced in OnDemandBackups.
"RestoreFromBackup": {
"Id": 123,
"SinkType": "docker",
"SinkParameters": {
"TestParameter": "test-value"
}
},
*/
/*
RonDB-native configuration parameter to avoid data nodes from allocating all
the memory in their containers. Some memory will also be needed for the ndb-agent.
*/
"TotalMemoryConfig": "2400M",
/*
These are the parameters that determine how many data nodes we will have running.
Number of running data node container = ActiveReplicationFactor * NumNodeGroups
*/
"ActiveReplicationFactor": 1, // Can be changed to add replicas to every node group
"MaxReplicationFactor": 3, // Immutable
"NumNodeGroups": 1, // Immutable
/*
Immutable fields. They are RonDB-native parameters that create slots
in the config.ini. We set a number to allow scaling up/down when the
cluster is running. If they are not used, they are deactivated.
*/
"NumTotalMysqldSlots": 10,
"NumTotalApiSlots": 16,
/*
Immutable fields. Whenever new MySQLd/Api Vms are requested, these number
of slots will be allocated to them.
*/
"NumMysqldSlotsPerVm": 4,
"NumApiSlotsPerVm": 4,
/*
Sometimes, new desired states cannot be reached without allowing
temporary VMs. E.g.: upgrading the RonDB version with a replication
factor of 1.
*/
"AllowRequestingTemporaryVms": true,
/*
The flask server will claim that the new containers it spawns
are in the given Region / Availability Zone. The ndb-agent
will distribute each service evenly across availability zone.
E.g.: one replica per AZ
*/
"Region": "europe-1",
"AvailabilityZones": [
"soedermalm"
],
/*
The flask server supports the VmType:
mini, medium, large, xlarge, xxlarge
These have differences in container memory limits.
Only increase the VmType; reducing beyond the defaults may crash
the programs running on the corresponding container.
*/
"VmTypeMgmds": "mini",
"VmTypeApis": "medium",
"VmTypeMysqlds": "large",
"VmTypeNdbds": "xlarge",
// Use this to scale MGMds, MySQL servers & Api containers:
"NumManagedMgmdVms": 1,
"NumManagedMysqldVms": 1,
"NumManagedApiVms": 1,
/*
The flask server does not have variable storage size containers implemented
and so it will simply claim that the spawned containers have a given storage
size. Also, the storage is always attached to containers and there is no logic
implemented to support shared network disks / volumes. Therefore, when
changing these fields for a live cluster, the containers will be replaced.
*/
"BlockStorageGiBPerMgmdVm": 4,
"BlockStorageGiBPerNdbdVm": 30,
"BlockStorageGiBPerMysqldVm": 50,
"BlockStorageGiBPerApiVm": 10,
/*
These are immutable fields that will be fixed in RonDB's config.ini.
Take these into account when adding ExternallyManagedNodes on a running
cluster.
*/
"DefaultMgmdPort": 1186,
"DefaultNdbdPort": 11860,
"DefaultMysqldPort": 3306
}