vinfra cluster ha create
Create a HA configuration:
usage: vinfra cluster ha create --virtual-ip <network:ip> --nodes <nodes> [--force]
--virtual-ip <network:ip>
HA configuration mapping in the format:
network
: network to include in the HA configuration (must include at least one of these traffic types: Internal management, Admin panel, Self-service panel, or Compute API).ip
: virtual IP address that will be used in the HA configuration.
Specify this option multiple times to create a HA configuration for multiple networks.
--nodes <nodes>
--force
Example:
# vinfra cluster ha create --virtual-ip Private:10.37.130.200 \ --virtual-ip Public:10.94.129.79 --nodes 94d58604-6f30-4339-8578-adb7903b7277,\ f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4,7d7d37b8-4c06-4f1a-b3a6-4b54257d70ce +---------+--------------------------------------+ | Field | Value | +---------+--------------------------------------+ | task_id | 80a00e55-335d-4d41-bac4-5fee4791d423 | +---------+--------------------------------------+
This command creates a task to create a management node HA cluster from nodes with the IDs 94d58604-6f30-4339-8578-adb7903b7277
, f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4
, and 7d7d37b8-4c06-4f1a-b3a6-4b54257d70ce
.
The command must specify the network with the traffic type Internal management
as well as one with the traffic type Admin panel
.
After the HA cluster has been created, the admin panel will only be accessible at the provided public IP address. Log in to said address via SSH to continue managing Virtuozzo Hybrid Infrastructure with the vinfra
CLI tool. You may also need to set the VINFRA_PASSWORD
environment variable again, because you will access different HA cluster nodes on each log in where it may not have been set.
Task outcome:
# vinfra task show 80a00e55-335d-4d41-bac4-5fee4791d423 +---------+-------------------------------------------------------+ | Field | Value | +---------+-------------------------------------------------------+ | details | | | name | backend.presentation.ha.tasks.CreateHaConfigTask | | result | compute_task_id: c5125024-5472-4420-b8b6-e03971ab952c | | | ha_cluster_location: | | | - https://10.94.129.79:8888 | | | nodes: | | | - id: 94d58604-6f30-4339-8578-adb7903b7277 | | | ipaddr: 10.37.130.118 | | | is_primary: false | | | - id: f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4 | | | ipaddr: 10.37.130.134 | | | is_primary: true | | | - id: 7d7d37b8-4c06-4f1a-b3a6-4b54257d70ce | | | ipaddr: 10.37.130.246 | | | is_primary: false | | | primary_node_location: https://10.94.62.243:8888 | | | virtual_ips: | | | - ip: 10.94.129.79 | | | roles_set: 5f0adc1d-c10f-46c1-b7b8-dd1aacab613b | | | - ip: 10.37.130.200 | | | roles_set: 5a0401b5-9b42-4d8b-8372-71c747230033 | | state | success | | task_id | 80a00e55-335d-4d41-bac4-5fee4791d423 | +---------+-------------------------------------------------------+