sacloud / libsacloud

[Deprecated] Library for SAKURA Cloud API with Go
Apache License 2.0
18 stars 13 forks source link

News: データベースアプライアンスの冗長化オプション機能の正式提供を開始しました #870

Closed sacloud-bot closed 2 years ago

sacloud-bot commented 2 years ago

データベースアプライアンスの冗長化オプション機能の正式提供を開始しました
https://ift.tt/UoR70pNT8

yamamoto-febc commented 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の参照条件:

yamamoto-febc commented 2 years ago

Note: 冗長化オプションを有効にすると

従来リードレプリカ作成時にはプランIDに特殊な処理(メイン側のプランIDに1を足す)をしていたが、冗長化オプション有効時には考慮不要。

yamamoto-febc commented 2 years ago

冗長化プランでバックアップを有効にする際のパラメータ例

{
  "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.BackupConnectが追加されている。

yamamoto-febc commented 2 years ago

実装方法について ディスカッション: https://github.com/sacloud/libsacloud/discussions/874 で検討した上でPRする。