Compare languages | Cloud provider — VMware Cloud Director: подготовка окружения.

Список необходимых ресурсов VCD

List of required VCD resources

  • Organization
  • VirtualDataCenter
  • vApp
  • StoragePolicy
  • SizingPolicy
  • Network
  • EdgeRouter
  • Catalog
  • Organization
  • VirtualDataCenter
  • vApp
  • StoragePolicy
  • SizingPolicy
  • Network
  • EdgeRouter
  • Catalog

Organization, VirtualDataCenter, StoragePolicy, SizingPolicy, EdgeRouter и Catalog должны быть предоставлены вашим поставщиком услуг VMware Cloud Director. Также в тенанте нужно выдать следующие права на изменение параметров ВМ (используйте инструкцию):

Organization, VirtualDataCenter, StoragePolicy, SizingPolicy, EdgeRouter, and Catalog must be provided by your VMware Cloud Director service provider. Also, in the tenant, you will need to grant the following rights to able to modify the VM parameters (refer to the instruction):

  • guestinfo.metadata
  • guestinfo.metadata.encoding
  • guestinfo.userdata
  • guestinfo.userdata.encoding
  • disk.enableUUID
  • guestinfo.hostname
  • guestinfo.metadata
  • guestinfo.metadata.encoding
  • guestinfo.userdata
  • guestinfo.userdata.encoding
  • disk.enableUUID
  • guestinfo.hostname

Network (внутренняя сеть) может быть настроена вашим поставщиком услуг VMware Cloud Director, либо вы можете настроить ее самостоятельно. Далее рассматривается настройка внутренней сети самостоятельно.

Network (internal network) can be configured by your VMware Cloud Director service provider, or you can configure it yourself. Next, we consider setting up the internal network yourself.

Добавление сети

Adding a network

Перейдите во вкладку Networking и нажмите на кнопку NEW:

Go to the Networking tab and click on the NEW button:

Добавление сети, шаг 1

Adding a network, step 1

Выберите необходимый Data Center:

Select the Data Center:

Добавление сети, шаг 2

Adding a network, step 2

Network type должен быть Routed:

Note that Network type must be Routed:

Добавление сети, шаг 3

Adding a network, step 3

Присоедините EdgeRouter к сети:

Connect the EdgeRouter to the network:

Добавление сети, шаг 4

Adding a network, step 4

Установите имя сети и CIDR:

Set the network name and CIDR:

Добавление сети, шаг 5

Adding a network, step 5

Не добавляйте Static IP Pools, т.к. будет использоваться DHCP:

Do not add Static IP Pools, because DHCP will be used:

Добавление сети, шаг 6

Adding a network, step 6

Укажите адреса DNS-серверов:

Specify the DNS server addresses:

Добавление сети, шаг 7

Adding a network, step 7

Настройка DHCP

Configuring DHCP

Для динамического заказа узлов необходимо включить DHCP-сервер для внутренней сети.

To provision nodes dynamically, you have to enable the DHCP server for the internal network.

Рекомендуем выделить начало диапазона адресов сети на системные нагрузки (control plane, frontend-узлы, системные узлы), а остальное выделить на DHCP-пул. Например, для сети по маске /24 будет достаточно выделения 20 адресов под системные нагрузки.

We recommend allocating the beginning of the network address range to system consumers (control plane, frontend nodes, system nodes) and the rest to the DHCP pool. For example, for a /24 mask network it would be enough to allocate 20 addresses to system consumers.

Перейдите во вкладку Networking и откройте созданную сеть:

Click the Networking tab and open the network you created:

DHCP, шаг 1

DHCP, step 1

В открытом окне откройте вкладку IP Management -> DHCP -> Activate:

In the window that opens, select the IP Management -> DHCP -> Activate tab:

DHCP, шаг 2

DHCP, step 2

Во вкладке General settings настройте параметры аналогично примеру:

In the General settings tab, set the parameters as shown in the example:

DHCP, шаг 3

DHCP, step 3

Добавьте пул:

Next, add a pool:

DHCP, шаг 3

DHCP, step 3

Установите адреса DNS-серверов:

Set the DNS server addresses:

DHCP, шаг 3

DHCP, step 3

Добавление vApp

Adding a vApp

Перейдите во вкладку Data Centers -> vApps -> NEW -> New vApp:

Switch to the Data Centers -> vApps -> NEW -> New vApp tab:

Добавление vApp, шаг 1

Adding a vApp, step 1

Установите имя и включите vApp:

Set a name and enable the vApp:

Добавление vApp, шаг 2

Adding a vApp, step 2

Добавление сети к vApp

Adding a network to the vApp

После создания vApp, необходимо присоединить к ней созданную внутреннюю сеть.

Once the vApp is created, you have to connect the created internal network to it.

Перейдите во вкладку Data Centers -> vApps, откройте необходимый vApp:

Switch to the Data Centers -> vApps tab and open the target vApp:

Добавление сети к vApp, шаг 1

Adding a network to the vApp, step 1

Перейдите во вкладку Networks и нажмите на кнопку NEW:

Go to the Networks tab and click on the NEW button:

Добавление сети к vApp, шаг 2

Adding a network to the vApp, step 2

В появившемся окне выберите тип Direct и выберите сеть:

In the window that opens, click the Direct type and select the network:

Добавление сети к vApp, шаг 3

Adding a network to the vApp, step 3

Входящий трафик

Incoming traffic

Входящий трафик необходимо направить на edge router (порты 80, 443) при помощи правил DNAT на выделенный адрес во внутренней сети. Этот адрес поднимается при помощи MetalLB в L2 режиме на выделенных frontend-узлах.

Incoming traffic should be routed to the edge router (ports 80, 443) using DNAT rules to be forwarded to a dedicated address on the internal network.
This address can be created by running MetalLB in L2 mode for dedicated frontend nodes.

Настройка правила DNAT на edge gateway

Configuring DNAT rules on the edge gateway

Перейдите во вкладку Networking -> Edge Gateways, откройте edge gateway:

Navigate to the Networking -> Edge Gateways tab, open the edge gateway:

Настройка правил DNAT на edge gateway, шаг 1

Configuring DNAT rules on the edge gateway, step 1

Перейдите во вкладку Services -> NAT:

Switch to the Services -> NAT tab:

Настройка правил DNAT на edge gateway, шаг 2

Configuring DNAT rules on the edge gateway, step 2

Добавьте следующие правила:

Add the following rules:

Настройка правил DNAT на edge gateway, шаг 3

Configuring DNAT rules on the edge gateway, step 3

Первые два правила используются для входящего трафика, а третье — для доступа по SSH к узлу с control plane (без этого правила установка будет невозможна).

The first two rules are used for incoming traffic, while the third rule is used for SSH access to the control plane host (without this rule the installation will not be possible).

Настройка firewall

Configuring a firewall

После настройки DNAT необходимо настроить firewall. Сначала необходимо настроить наборы IP-адресов (IP sets).

Once DNAT is configured, you have to set up the firewall. First, configure the IP sets.

Перейдите во вкладку Security -> IP Sets:

Switch to the Security -> IP Sets tab:

Настройка firewall на edge gateway, шаг 1

Configuring the edge gateway firewall, step 1

Создайте следующий набор IP (тут подразумевается, что адрес MetalLB будет .10 а адрес узла с control plane — .2):

Create the following set of IPs (the MetalLB address here is .10 and the control plane node address is .2):

Настройка firewall на edge gateway, шаг 1

Configuring the edge gateway firewall, step 1

Настройка firewall на edge gateway, шаг 1

Configuring the edge gateway firewall, step 1

Настройка firewall на edge gateway, шаг 1

Configuring the edge gateway firewall, step 1

Добавьте следующие правила firewall:

Add the following firewall rules:

Настройка firewall на edge gateway, шаг 1

Configuring the edge gateway firewall, step 1

Шаблон виртуальной машины

Virtual machine template

Работоспособность провайдера подтверждена только для шаблонов виртуальных машин на базе Ubuntu 22.04.

The provider is confirmed to work with Ubuntu 22.04-based virtual machine templates only.

В примере используется OVA-файл, предоставляемый Ubuntu, с двумя исправлениями. Исправления необходимы для корректного заказа CloudPermanent-узлов и для возможности подключать диски, созданные CSI.

The example below uses the OVA file provided by Ubuntu, updated to include two fixes. Those fixes are essential for CloudPermanent nodes to be provisioned correctly and to be able to mount CSI-created disks.

Подготовка шаблона из OVA-файла

Making a template from an OVA file

Скачайте OVA-файл:

Download the OVA file:

Настройка шаблона, шаг 1

Setting up the template, step 1

Перейдите на вкладку Libraries -> Catalogs -> Каталог организации:

Switch to the Libraries -> Catalogs -> Organization Catalog tab:

Настройка шаблона, шаг 2

Setting up the template, step 2

Выберите скаченный шаблон и загрузите его в каталог:

Select the template you downloaded and add it to the catalog:

Настройка шаблона, шаг 3

Setting up the template, step 3

Настройка шаблона, шаг 4

Setting up the template, step 4

Настройка шаблона, шаг 5

Setting up the template, step 5

Создайте виртуальную машину из шаблона:

Create a virtual machine from the template:

Настройка шаблона, шаг 6

Setting up the template, step 6

Настройка шаблона, шаг 7

Setting up the template, step 7

Укажите пароль по умолчанию и публичный ключ. Это необходимо для того, чтобы войти в консоль виртуальной машины.

Enter the default password and public key. You will need them to log in to the VM console.

Настройка шаблона, шаг 8

Setting up the template, step 8

Для того чтобы получить возможность подключения к виртуальной машине, выполните следующие шаги:

  1. Запустите виртуальную машину
  2. Дождитесь получение IP-адреса
  3. Пробросьте порт 22 до виртуальной машины:

Follow these steps to be able to connect to the virtual machine:

  1. Start the virtual machine
  2. Wait for the IP address to be set
  3. Forward port 22 to the virtual machine:

Настройка шаблона, шаг 9

Setting up the template, step 9

Войдите на виртуальную машину по SSH и выполните следующие команды:

Log on to the virtual machine over SSH and run the following commands:

shell echo -e ‘\n[deployPkg]\nwait-cloudinit-timeout=1800\n’ » /etc/vmware-tools/tools.conf passwd -d ubuntu passwd -d root rm /home/ubuntu/.ssh/authorized_keys history -c shutdown -P now

shell echo -e ‘\n[deployPkg]\nwait-cloudinit-timeout=1800\n’ » /etc/vmware-tools/tools.conf passwd -d ubuntu passwd -d root rm /home/ubuntu/.ssh/authorized_keys history -c shutdown -P now

Выключите виртуальную машину и создайте шаблон виртуальной машины:

Shut down the virtual machine and create a virtual machine template:

Настройка шаблона, шаг 10

Setting up the template, step 10

Настройка шаблона, шаг 11

Setting up the template, step 11

После создания шаблона виртуальной машины, обратитесь к поставщику услуг VMware Cloud Director с просьбой включить для шаблона параметр disk.enableUUID.

After creating a virtual machine template, ask your VMware Cloud Director service provider to enable the disk.enableUUID parameter for the template.

Использование хранилища

Using the storage

  • VCD поддерживает CSI, диски создаются как VCD Independent Disks.
  • Guest property disk.EnableUUID должно быть разрешено для используемых шаблонов виртуальных машин.
  • Deckhouse Kubernetes Platform поддерживает изменение размера дисков с версии v1.59.1.
  • VCD supports CSI; disks are created as VCD Independent Disks.
  • The disk.EnableUUID guest property must be set for the virtual machine templates in use.
  • Deckhouse Kubernetes Platform supports disk resizing as of v1.59.1.