OpenStack stein安装(六)nova on compute
admin
2023-03-13 04:01:06
0
Install and configure components
  1. Install the packages:
    # yum install openstack-nova-compute
  2. Edit the /etc/nova/nova.conf file and complete the following actions:

    ○ In the [DEFAULT] section, enable only the compute and metadata APIs:
        [DEFAULT]
        # ...
        enabled_apis = osapi_compute,metadata
    
    ○ In the [DEFAULT] section, configure RabbitMQ message queue access:
        [DEFAULT]
        # …
        transport_url=rabbit://openstack:openstack123@dbs.flex.net
    
    ○ In the [api] and [keystone_authtoken] sections, configure Identity service access::
        [api]
        # ...
        auth_strategy = keystone
    
        [keystone_authtoken]
        # ...
        auth_url = http://stack.flex.net:5000/v3
        memcached_servers = dbs.flex.net:11211
        auth_type = password
        project_domain_name = Default
        user_domain_name = Default
        project_name = service
        username = nova
        password = nova123
        注意: 注释或移除在掉在[keystone_authtoken]区域中的其它的选项
    
    ○ In the [DEFAULT] section, configure the my_ip option:
        [DEFAULT]
        # ...
        my_ip = 192.168.205.187
    注意:使用管理接口的IP在你的计算节点上.
    
    ○ In the [DEFAULT] section, enable support for the Networking service:
        [DEFAULT]
        # ...
        use_neutron = true
        firewall_driver = nova.virt.firewall.NoopFirewallDriver
    注意:缺省的,计算节点使用一内部的防火墙驱动,因为网络服务包含了一个防火墙驱动,你必须禁用防火墙驱动并使用nova.virt.firewall.NoopFirewallDriver firewall driver
    
    ○ In the [vnc] section, enable and configure remote console access:
        [vnc]
        # ...
        enabled = true
        server_listen = 0.0.0.0
        server_proxyclient_address = $my_ip
        novncproxy_base_url = http://stack.flex.net:6080/vnc_auto.html
    
        服务器组件监听所有IP地址,代理组件只监听计算节点的管理接口IP地址。基本URL指示可以使用web浏览器访问此计算节点上实例的远程控制台的位置。
    注意:如果要访问远程控制台的web浏览器驻留在无法解析控制器主机名的主机上,则必须使用控制器节点的管理接口IP地址替换控制器。
    
    ○ In the [glance] section, configure the location of the Image service API:
        [glance]
        # ...
        api_servers = http://stack.flex.net:9292
    
    ○ In the [oslo_concurrency] section, configure the lock path:
        [oslo_concurrency]
        # ...
        lock_path = /var/lib/nova/tmp
    
    ○ In the [placement] section, configure the Placement API:
        [placement]
        # ...
        region_name = RegionOne
        project_domain_name = Default
        project_name = service
        auth_type = password
        user_domain_name = Default
        auth_url = http://stack.flex.net:5000/v3
        username = placement
        password = placement123
    Finalize installation
  3. Determine whether your compute node supports hardware acceleration for virtual machines:

    $ egrep -c '(vmx|svm)' /proc/cpuinfo
    
    如果这个命令返回1或大于1的值,你的计算节点支持硬件加速,通常不需要额外的配置,通常如果你的计算节点使用的是Vmware Workstation虚拟机,你可以充许virtuallze Intel VT-x/EPT or AMD-V/RVI这样打开虚拟化设置
    
    如果这个命令返回一个0值,你的计算节点不支持硬件加速,并且你必须配置libvirt使用QEMU取代KVM, 编辑文件/etc/nova/nova.conf文件如下:
    [libvirt]
    # ...
    virt_type = qemu
  4. Start the Compute service including its dependencies and configure them to start automatically when the system boots:

    # systemctl enable libvirtd.service openstack-nova-compute.service
    # systemctl start libvirtd.service openstack-nova-compute.service
    
    注意:如果nova-compute服务无法启动,请检查/var/log/nova/nova- computer .log。controller:5672上的错误消息AMQP服务器不可访问,这可能表明控制器节点上的防火墙正在阻止对端口5672的访问。将防火墙配置为打开控制器节点上的端口5672并在计算节点上重新启动nova-compute服务。
    Add the compute node to the cell database
  5. Source the admin credentials to enable admin-only CLI commands, then confirm there are compute hosts in the database:

    $ . admin-openrc
    
    $ openstack compute service list --service nova-compute
    +----+-------+--------------+------+-------+---------+----------------------------+
    | ID | Host  | Binary       | Zone | State | Status  | Updated At                 |
    +----+-------+--------------+------+-------+---------+----------------------------+
    | 1  | node1 | nova-compute | nova | up    | enabled | 2017-04-14T15:30:44.000000 |
    +----+-------+--------------+------+-------+---------+----------------------------+
  6. Discover compute hosts:

    # su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
    
    Found 2 cell mappings.
    Skipping cell0 since it does not contain hosts.
    Getting compute nodes from cell 'cell1': ad5a5985-a719-4567-98d8-8d148aaae4bc
    Found 1 computes in cell: ad5a5985-a719-4567-98d8-8d148aaae4bc
    Checking host mapping for compute host 'compute': fe58ddc1-1d65-4f87-9456-bc040dc106b3
    Creating host mapping for compute host 'compute': fe58ddc1-1d65-4f87-9456-bc040dc106b3
    注意:当你添加新的计算节点,你必须运行nova-manage cell_v2 discover_hosts在控制器上注册新的计算节点,替代方法为你可以在/etc/nova/nova.conf中设置一个适当的间间隔自动发现计算节点:
    [scheduler]
    discover_hosts_in_cells_interval = 300
    Verify operation

    Verify operation of the Compute service.
    Note: Perform these commands on the controller node.

  7. Source the admin credentials to gain access to admin-only CLI commands:
    $ . admin-openrc
  8. List service components to verify successful launch and registration of each process:

    $ openstack compute service list
    
    +----+--------------------+------------+----------+---------+-------+----------------------------+
    | Id | Binary             | Host       | Zone     | Status  | State | Updated At                 |
    +----+--------------------+------------+----------+---------+-------+----------------------------+
    |  1 | nova-scheduler     | controller | internal | enabled | up    | 2016-02-09T23:11:15.000000 |
    |  2 | nova-conductor     | controller | internal | enabled | up    | 2016-02-09T23:11:16.000000 |
    |  3 | nova-compute       | compute1   | nova     | enabled | up    | 2016-02-09T23:11:20.000000 |
    +----+--------------------+------------+----------+---------+-------+----------------------------+
    
    Note: This output should indicate two service components enabled on the controller node and one service component enabled on the compute node.
  9. List API endpoints in the Identity service to verify connectivity with the Identity service:
    $ openstack catalog list
    +-----------+-----------+---------------------------------------------+
    | Name      | Type      | Endpoints                                   |
    +-----------+-----------+---------------------------------------------+
    | placement | placement | RegionOne                                   |
    |           |           |   admin: http://stack.flex.net:8778         |
    |           |           | RegionOne                                   |
    |           |           |   internal: http://stack.flex.net:8778      |
    |           |           | RegionOne                                   |
    |           |           |   public: http://stack.flex.net:8778        |
    |           |           |                                             |
    | glance    | image     | RegionOne                                   |
    |           |           |   admin: http://stack.flex.net:9292         |
    |           |           | RegionOne                                   |
    |           |           |   public: http://stack.flex.net:9292        |
    |           |           | RegionOne                                   |
    |           |           |   internal: http://stack.flex.net:9292      |
    |           |           |                                             |
    | nova      | compute   | RegionOne                                   |
    |           |           |   public: http://stack.flex.net:8774/v2.1   |
    |           |           | RegionOne                                   |
    |           |           |   internal: http://stack.flex.net:8774/v2.1 |
    |           |           | RegionOne                                   |
    |           |           |   admin: http://stack.flex.net:8774/v2.1    |
    |           |           |                                             |
    | keystone  | identity  | RegionOne                                   |
    |           |           |   public: http://stack.flex.net:5000/v3/    |
    |           |           | RegionOne                                   |
    |           |           |   admin: http://stack.flex.net:5000/v3/     |
    |           |           | RegionOne                                   |
    |           |           |   internal: http://stack.flex.net:5000/v3/  |
    |           |           |                                             |
    +-----------+-----------+---------------------------------------------+
  10. List images in the Image service to verify connectivity with the Image service:

    $ openstack image list
    
    +--------------------------------------+-------------+-------------+
    | ID                                   | Name        | Status      |
    +--------------------------------------+-------------+-------------+
    | 9a76d9f9-9620-4f2e-8c69-6c5691fae163 | cirros      | active      |
    +--------------------------------------+-------------+-------------+
  11. Check the cells and placement API are working successfully and that other necessary prerequisites are in place:

    # nova-status upgrade check
    
    +--------------------------------------------------------------------+
    | Upgrade Check Results                                              |
    +--------------------------------------------------------------------+
    | Check: Cells v2                                                    |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Placement API                                               |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Ironic Flavor Migration                                     |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Request Spec Migration                                      |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Console Auths                                               |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+

相关内容

热门资讯

为190元“仅退款”榴莲千里讨... 极目新闻记者 王鹏因为一笔190元的恶意“仅退款”订单,卖家自掏5000余元,驱车1600公里赴山东...
“AI智能回答”误称律师“被判... 据澎湃新闻报道,南京执业律师李小亮发现,在百度手机App、百度网站搜索其个人姓名+职务时,百度“AI...
年初铺的草皮五一咋又铲除?自然... 江西省上饶市的周先生近日向华商报大风新闻反映:今年五一假期时,他注意到上饶市广丰区北河滨路芦林街道源...
浏阳烟花厂爆炸事故4名重症患者... 截至今天(9日)上午11时,浏阳烟花厂爆炸事故在院患者42人,原5名重症患者中4人已转为轻症;在院患...
中东战火不断,为何全球股市不跌... 最近与一位美国学者交流,他讲到一个颇有意味的场景:在华尔街一场交流中,包括他在内的3位国际问题研究专...
景区回应“母亲节穿旗袍免费入园... 近日,南京天生桥景区推出的母亲节当天女士穿旗袍免费入园活动引发争议,有人认为母亲节女士穿旗袍活动,策...
一本正经胡说八道,谁为AI幻觉... AI幻觉频发,误导用户、毁损名誉的责任,该由谁来承担?南京律师李小亮在百度上搜索自己的信息,结果百度...
老人在直播间疯狂刷火箭 周佳欣、郑凯丹、朱娅、蒋婉、黄铃、王佳、李婉晴/文64岁的王雅达又往直播间里刷了一枚“火箭”。屏幕上...
汉坦病毒阳性乘客在乌斯怀亚港登... 自世卫组织(WHO)5月6日公布荷兰泛海探险公司(Oceanwide Expeditions)旗下极...
冰箱不制冷的原因有哪几种 冰箱的电压在正常的情况下,压缩机没有正常的运转,而且有噪声和旋转的声音,压缩机一旦出现故障,冰箱就会...