4.8. 安装 director

完成以下步骤以安装 director 并执行一些基本安装后任务。

步骤

  1. 运行以下命令,以在 undercloud 上安装 director:

    [stack@director ~]$ openstack undercloud install

    此命令会启动 director 配置脚本。director 安装附加软件包,根据 undercloud.conf 中的配置配置其服务,并启动所有 RHOSP 服务容器。这个脚本会需要一些时间来完成。

    此脚本会生成两个文件:

    • undercloud-passwords.conf - director 服务的所有密码列表。
    • stackrc - 用来访问 director 命令行工具的一组初始变量。
  2. 确认 RHOSP 服务容器正在运行:

    [stack@director ~]$ sudo podman ps -a --format "{{.Names}} {{.Status}}"

    以下命令输出显示 RHOSP 服务容器正在运行(Up):

    memcached Up 3 hours (healthy)
    haproxy Up 3 hours
    rabbitmq Up 3 hours (healthy)
    mysql Up 3 hours (healthy)
    iscsid Up 3 hours (healthy)
    keystone Up 3 hours (healthy)
    keystone_cron Up 3 hours (healthy)
    neutron_api Up 3 hours (healthy)
    logrotate_crond Up 3 hours (healthy)
    neutron_dhcp Up 3 hours (healthy)
    neutron_l3_agent Up 3 hours (healthy)
    neutron_ovs_agent Up 3 hours (healthy)
    ironic_api Up 3 hours (healthy)
    ironic_conductor Up 3 hours (healthy)
    ironic_neutron_agent Up 3 hours (healthy)
    ironic_pxe_tftp Up 3 hours (healthy)
    ironic_pxe_http Up 3 hours (unhealthy)
    ironic_inspector Up 3 hours (healthy)
    ironic_inspector_dnsmasq Up 3 hours (healthy)
    neutron-dnsmasq-qdhcp-30d628e6-45e6-499d-8003-28c0bc066487 Up 3 hours
    ...
  3. 运行以下命令初始化 stack 用户来使用命令行工具:

    [stack@director ~]$ source ~/stackrc

    提示现在指示 OpenStack 命令对 undercloud 进行验证并执行;

    (undercloud) [stack@director ~]$

director 的安装已完成。您现在可以使用 director 命令行工具了。