Closed sacloud-bot closed 2 years ago
冗長化オプションを有効にして作成する場合のリクエスト例:
{
"Appliance": {
"Class": "database",
"Name": "example",
"Remark": {
"Zone": {
"ID": 31001
},
"Network": {
"NetworkMaskLen": 24,
"DefaultRoute": "192.168.0.1"
},
"Servers": [
{
"IPAddress": "192.168.0.31"
},
{
"IPAddress": "192.168.0.32"
}
],
"DBConf": {
"Common": {...}
},
"Switch": {
"ID": "<switch-id>"
},
"Plan": {
"ID": <plan-id>
}
},
"Settings": {
"DBConf": {
"Common": {...},
"Interfaces": [
{},
{
"VirtualIPAddress": "192.168.0.30"
}
]
}
},
"Tags": [],
"Icon": {}
}
}
仮想/実IPアドレスの指定方法に注意。 また、従来はプランIDとしてディスクサイズを指定する方式だったが、冗長化オプションを有効にした場合は専用のプランIDが必要。
NFSと同じくNoteを参照するようにする。
Noteの参照条件:
sys-database
json
shared
Note: 冗長化オプションを有効にすると
従来リードレプリカ作成時にはプランIDに特殊な処理(メイン側のプランIDに1を足す)をしていたが、冗長化オプション有効時には考慮不要。
冗長化プランでバックアップを有効にする際のパラメータ例
{
"Appliance": {
"Settings": {
"DBConf": {...},
"Interfaces": [...],
"Backup": {
"Time": "00:00",
"Rotate": 8,
"DayOfWeek": [
"sun",
"mon",
"tue",
"wed",
"thu",
"fri",
"sat"
],
"Connect": "nfs://192.168.0.41/export"
}
}
}
}
}
Settings.DBConf.Backup
にConnect
が追加されている。
実装方法について ディスカッション: https://github.com/sacloud/libsacloud/discussions/874 で検討した上でPRする。
データベースアプライアンスの冗長化オプション機能の正式提供を開始しました
https://ift.tt/UoR70pNT8