Как Вы добавляете машину к МААСУ с питанием IPMI с помощью CLI

Я хочу добавить новую машину к МААСУ для ввода в действие и развертывания с помощью CLI МААСА. Что команда CLI МААСА состоит в том, чтобы добавить новую машину, которая поддерживает параметры питания IPMI?

0
задан 27 July 2017 в 10:32

1 ответ

Вот пример того, как добавить машину:

maas maasadmin machines create \
    hostname=<hostname> \
    fqdn=<hostname>.maas \
    mac_addresses=<mac_used_for_dhcp> \
    architecture=amd64 \
    power_type=ipmi \
    power_parameters_power_driver=LAN_2_0 \
    power_parameters_power_user=<ipmi_user> \
    power_parameters_power_pass=<ipmi_password> \
    power_parameters_power_address=<mgmt_ip_address>

Исходные данные:

имя хоста: независимо от того, что Вы хотите маркировать свою новую машину.

mac_address: MAC-адрес адаптера на новой машине, которая получит адрес DHCP и затем уйдет назад в МААС для изображения PXE.

ipmi_user/password: учетная запись пользователя на плате контроллера Вашей машины (например, Dell iDRAC)

mgmt_ip_address: IP-адрес платы контроллера Вашей машины (например, Dell iDRAC)

Следующее вытягивают от исходного кода API МААСА для создания новой машины.

   """Create a new Machine.

    Adding a server to a MAAS puts it on a path that will wipe its disks
    and re-install its operating system, in the event that it PXE boots.
    In anonymous enlistment (and when the enlistment is done by a
    non-admin), the machine is held in the "New" state for approval by a
    MAAS admin.

    The minimum data required is:
    architecture=<arch string> (e.g. "i386/generic")
    mac_addresses=<value> (e.g. "aa:bb:cc:dd:ee:ff")

    :param architecture: A string containing the architecture type of
        the machine. (For example, "i386", or "amd64".) To determine the
        supported architectures, use the boot-resources endpoint.
    :type architecture: unicode

    :param min_hwe_kernel: A string containing the minimum kernel version
        allowed to be ran on this machine.
    :type min_hwe_kernel: unicode

    :param subarchitecture: A string containing the subarchitecture type
        of the machine. (For example, "generic" or "hwe-t".) To determine
        the supported subarchitectures, use the boot-resources endpoint.
    :type subarchitecture: unicode

    :param mac_addresses: One or more MAC addresses for the machine. To
        specify more than one MAC address, the parameter must be specified
        twice. (such as "machines new mac_addresses=01:02:03:04:05:06
        mac_addresses=02:03:04:05:06:07")
    :type mac_addresses: unicode

    :param hostname: A hostname. If not given, one will be generated.
    :type hostname: unicode

    :param domain: The domain of the machine. If not given the default
        domain is used.
    :type domain: unicode

    :param power_type: A power management type, if applicable (e.g.
        "virsh", "ipmi").
    :type power_type:unicode

    :param power_parameters_{param}: The parameter(s) for the power_type.
        Note that this is dynamic as the available parameters depend on
        the selected value of the Machine's power_type. `Power types`_
        section for a list of the available power parameters for each
        power type.
    :type power_parameters_{param1}: unicode
    """
2
ответ дан 2 November 2019 в 21:23

Другие вопросы по тегам:

Похожие вопросы: