3.4.4. Gluster Storage インスタンスのデプロイ
Microsoft Azure の個別の Gluster Storage インスタンスをクラスターに設定できます。まず、準備したイメージからインスタンスを作成してから、データディスクを割り当てる必要があります。
インスタンスの作成時に、以下の 2 つの方法を使用してインスタンスにアクセスできます。
- SSH 鍵を使用した認証
- パスワードを使用した認証
- Red Hat Gluster Storage 仮想マシンを作成します。注記このコマンドの実行時に vnic-name、public-ip-name、および public-ip-domain-name が作成されます。使用する名前を入力し、コマンドの実行時に作成されます。-Q オプションの直前の手順でイメージの URL をコピーアンドペーストします。-G オプションは ssh キーを生成します。表示される詳細で key-pem ファイルへのパスを書き留めておきます。Azure 仮想マシンへの ssh へのパスが必要です。重要Microsoft Azure 仮想マシン名には、文字、数字、ピリオド、およびハイフンを含めることができます。名前はハイフンで起動したり終了したり、数字を完全に構成したり、512 文字以下にする必要があります。詳細は、Microsoft の「『 Recommended naming conventions for Azure resources』」を参照してください。https://docs.microsoft.com/en-us/azure/guidance/guidance-naming-conventions
SSH 鍵を使用した認証
- 以下のコマンドを入力して、Red Hat Gluster Storage インスタンスを作成し、SSH 鍵を使用して認証します。
azure vm create -g [resource-group] -l [azure-region] -f [vnic-name] -y [os-type] -Q [image-url] -G -z [vm-size] -i [public-ip-name] -o [storage-account-name] -R [storage-container-name] -m [public-ip-allocation-method] -w [public-ip-domain-name] -t [public-ip-idletimeout] -F [vnet-name] -j [vnet-subnet-name] -u [admin-name] -n [virtual-machine-name]以下に例を示します。# azure vm create -g rhgsarm -l eastus -f rhgsimage72vnic -y Linux -Q https://rhgsstorage.blob.core.windows.net:443/rhgscontainer/rhgsimage72.vhd -G -z Standard_A2 -i rhgs72_pub -o rhgsstorage -R rhgscontainer -m dynamic -w rhgs72 -t 10 -F rhgsvnet1 -j rhgssubnet1 -u clouduser -n rhgs72 info: Executing command vm create + Looking up the VM "rhgs72" info: You can use /root/.azure/ssh/rhgs72-key.pem private key for SSH authentication. info: Verifying the public key SSH file: /root/.azure/ssh/rhgs72-cert.pem info: Using the VM Size "Standard_A2" info: The [OS, Data] Disk or image configuration requires storage account + Looking up the storage account rhgsstorage info: Using "https://rhgsstorage.blob.core.windows.net:443/rhgscontainer/rhgsimage72.vhd" as the user image. + Looking up the NIC "rhgsimage72vnic" info: Found an existing NIC "rhgsimage" info: Found an IP configuration with virtual network subnet id "/subscriptions/2586c64b-38b4-4527-a140-012d49dfc02c/resourceGroups/rhgsarm/providers/Microsoft.Network/virtualNetworks/rhgsvnet1/subnets/rhgssubnet1" in the NIC "rhgsimage72vnic" info: This NIC IP configuration is already configured with the provided public ip "rhgs72_pub" info: The storage URI 'https://rhgsstorage.blob.core.windows.net/' will be used for boot diagnostics settings, and it can be overwritten by the parameter input of '--boot-diagnostics-storage-uri'. + Creating VM "rhgs72" info: vm create command OK - SSH セッションを開始し、管理者名と公開鍵ファイルを使用して、実行中の仮想マシンに接続します。
# ssh -i [path-to-key-pem] [admin-name@public-ip-address]以下に例を示します。# ssh -i /root/.azure/ssh/rhgs72-key.pem clouduser@rhgs72.east.cloudapp.azure.com
パスワードを使用した認証
- 以下のコマンドを入力して、Red Hat Gluster Storage インスタンスを作成し、SSH パスワードを使用して認証します。プロンプトが表示されたら、パスワードを入力する必要があります。
# azure vm create -g [resource-group] -l [azure-region] -f [vnic-name] -y [os-type] -Q [image-url] -z [vm-size] -i [public-ip-name] -o [storage-account-name] -R [storage-container-name] -m [public-ip-allocation-method] -w [public-ip-domain-name] -t [public-ip-idletimeout] -F [vnet-name] -j [vnet- subnet-name] -u [admin-name] -n [virtual-machine-name]以下に例を示します。# azure vm create -g rhgsarm732 -l eastus -f rhgs732vnic -y Linux -Q https://rhgsstorage732.blob.core.windows.net/rhgscontainer732/rhgsimage732.vhd -z Standard_A2 -i rhgs732_pub -o rhgsstorage732 -R rhgscontainer732 -m dynamic -w rhgs7322 -t 10 -F rhgsvnet732 -j rhgssubnet732 -u clouduser -n rhgs732-2 info: Executing command vm create + Looking up the VM "rhgs732-2" Enter password for clouduser: ********** Confirm password: ********** info: Using the VM Size "Standard_A2" info: The [OS, Data] Disk or image configuration requires storage account + Looking up the storage account rhgsstorage732 info: Using "https://rhgsstorage732.blob.core.windows.net/rhgscontainer732/rhgsimage732.vhd" as the user image. + Looking up the NIC "rhgs732vnic" info: Found an existing NIC "rhgs732vnic" info: Found an IP configuration with virtual network subnet id "/subscriptions/2586c64b-38b4-4527-a140-012d49dfc02c/resourceGroups/rhgsarm732/providers/Microsoft.Network/virtualNetworks/rhgsvnet732/subnets/rhgssubnet732" in the NIC "rhgs732vnic" info: This NIC IP configuration is already configured with the provided public ip "rhgs732_pub" info: The storage URI 'https://rhgsstorage732.blob.core.windows.net/' will be used for boot diagnostics settings, and it can be overwritten by the parameter input of '--boot-diagnostics-storage-uri'. +i reating VM "rhgs732-2" info: vm create command OK - SSH セッションを開始し、管理者名とインスタンスの作成時に使用されるパスワードを使用して、実行中の仮想マシンに接続します。
# ssh [admin-name@public-ip-address]以下に例を示します。# ssh clouduser@rhgs72.east.cloudapp.azure.com
- 新規作成された仮想マシンにデータディスクを追加します。
# azure vm disk attach-new resource-group vm-name size-in-gb以下に例を示します。# azure vm disk attach-new rhgsarm rhgs72 1023 info: Executing command vm disk attach-new + Looking up the VM "rhgs72" info: New data disk location: https://rhgsstorage.blob.core.windows.net/rhgscontainer/rhgs72-20170220-121452858.vhd + Updating VM "rhgs72" info: vm disk attach-new command OK - インスタンスを作成し、すべてのインスタンスにディスクを割り当てる上記のステップを実行します。
- インスタンスが適切に作成されたことを確認します。
# azure vm list -g [resource group]For example,# azure vm list rhgsarm info: Executing command vm list + Getting virtual machines data: ResourceGroupName Name ProvisioningState PowerState Location Size data: ----------------- -------- ----------------- -------------- -------- ----------- data: rhgsarm rhgs72 Succeeded VM deallocated eastus Standard_A2 data: rhgsarm rhgs72-1 Succeeded VM deallocated eastus Standard_A2 info: vm list command OK# azure vm show -g rhgsarm rhgs72 info: Executing command vm show + Looking up the VM "rhgs72" + Looking up the NIC "rhgsimage72vnic" + Looking up the public ip "rhgs72_pub" Id :/subscriptions/2586c64b-38b4-4527-a140-012d49dfc02c/resourceGroups/rhgsarm/providers/Microsoft.Compute/virtualMachines/rhgs72data: ProvisioningState :Succeeded data: Name :rhgs72 data: Location :eastus data: Type :Microsoft.Compute/virtualMachines data: data: Hardware Profile: data: Size :Standard_A2 data: data: Storage Profile: data: data: OS Disk: data: OSType :Linux data: Name :clib438d5640249ac7c-os-1486533879443 data: Caching :ReadWrite data: CreateOption :FromImage data: Vhd: data: Uri :https://rhgsstorage.blob.core.windows.net/rhgscontainer/clib438d5640249ac7c-os-1486533879443.vhd data: data: OS Profile: data: Computer Name :rhgs72 data: User Name :clouduser data: Secrets :[] data: Linux Configuration: data: Disable Password Auth :true data: data: Network Profile: data: Network Interfaces: data: Network Interface #1: data: Primary :true data: MAC Address :00-0D-3A-13-36-A0 data: Provisioning State :Succeeded data: Name :rhgsimage72vnic data: Location :eastus data: Public IP address :40.121.209.95 data: FQDN :rhgs72.eastus.cloudapp.azure.com data: data: Diagnostics Profile: data: BootDiagnostics Enabled :true data: BootDiagnostics StorageUri:https://rhgsstorage.blob.core.windows.net/ data: data: Diagnostics Instance View: info: vm show command OK
- Microsoft Azure の可用性セットは、保持するインスタンスに対するフォールトトレランスのレベルを提供し、システム障害や予定されている停止から保護します。これは、同じ可用性セット内のインスタンスが異なる障害や、Microsoft Azure データセンター内のアップグレードドメインをデプロイすることで実現されます。
- Gluster Storage がブリック間でデータを複製する場合は、レプリカセットを特定の可用性セットに関連付けます。レプリケーション設計で可用性セットを使用すると、Microsoft Azure インフラストラクチャー内のインシデントはレプリカセットのすべてのメンバーを同時に影響を受けることができません。