zoukankan      html  css  js  c++  java
  • 6. Configure Compute services

    Controller Node:
    1. sudo apt-get install nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient
     
    2. sudo vi /etc/nova/nova.conf
    [database]
    connection = mysql://nova:NOVA_DBPASS@controller/nova
    [DEFAULT]
    ...
    rpc_backend = rabbit
    rabbit_host = controller
    rabbit_password = RABBIT_PASS
    [DEFAULT]
    ...
    my_ip = 10.0.0.11 (controller_node_ip)
    vncserver_listen = 10.0.0.11 (controller_node_ip)
    vncserver_proxyclient_address = 10.0.0.11 (controller_node_ip)
     
    3. sudo rm /var/lib/nova/nova.sqlite
     
    4. 创建数据库
    mysql -u root -p
    CREATE DATABASE nova;
    GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'NOVA_DBPASS';
    GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'NOVA_DBPASS';
     
    5. sudo -s /bin/sh -c "nova-manage db sync" nova
     
    6. 创建用户
    keystone user-create --name=nova --pass=NOVA_PASS --email=nova@example.com
    keystone user-role-add --user=nova --tenant=service --role=admin
     
    7. sudo vi /etc/nova/nova.conf
    [DEFAULT]
    ...
    auth_strategy = keystone
    [keystone_authtoken]
    ...
    auth_uri = http://controller:5000
    auth_host = controller
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = nova
    admin_password = NOVA_PASS
     
    8. 
    keystone service-create --name=nova --type=compute --description="OpenStack Compute" 
    keystone endpoint-create
      --service-id=$(keystone service-list | awk '/ compute / {print $2}')
      --publicurl=http://controller:8774/v2/%(tenant_id)s
      --internalurl=http://controller:8774/v2/%(tenant_id)s
      --adminurl=http://controller:8774/v2/%(tenant_id)s
     
    9. 重启服务
    sudo service nova-api restart
    sudo service nova-cert restart
    sudo service nova-consoleauth restart
    sudo service nova-scheduler restart
    sudo service nova-conductor restart
    sudo service nova-novncproxy restart
     
    10. nova image-list
     
    Compute Node:
    1. sudo apt-get install nova-compute-kvm
     
    2. sudo vi /etc/nova/nova.conf
    [DEFAULT]
    ...
    auth_strategy = keystone
    ...
    rpc_backend = rabbit
    rabbit_host = controller
    rabbit_password = RABBIT_PASS
    ...
    my_ip = 10.0.0.31 (Compute Node IP)
    vnc_enabled = True
    vncserver_listen = 0.0.0.0
    vncserver_proxyclient_address = 10.0.0.31  (Compute Node IP)
    novncproxy_base_url = http://controller:6080/vnc_auto.html
    ...
    glance_host = controller
     
    [database]
    # The SQLAlchemy connection string used to connect to the database
    connection = mysql://nova:NOVA_DBPASS@controller/nova
     
    [keystone_authtoken]
    auth_uri = http://controller:5000
    auth_host = controller
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = service
    admin_user = nova
    admin_password = NOVA_PASS
     
    3. 检测服务器是否支持虚拟化
    egrep -c '(vmx|svm)' /proc/cpuinfo
    若结果不为零,则继续进行下一步;若为零,需将/etc/nova/nova-compute.conf里的virt_type置为qemu
     
    4. sudo rm /var/lib/nova/nova.sqlite
     
    5. sudo service nova-compute restart
  • 相关阅读:
    Computer Networking: Computer networks and the Internet
    编译pqxx源码configure时遇到codecs.py LookupError的解决方法
    DBMS-存储和文件结构
    DBMS-关系数据库的设计:范式、函数依赖、分解算法、多值依赖
    WebPack填坑笔记
    VsCode常用快捷键
    用户 在地址栏输入网址 经历了那些
    正向代理和反向代理
    检测浏览器(BOM)以及地址栏网址的API
    js变量按照存储方式区分,有哪些类型,并表述其特点
  • 原文地址:https://www.cnblogs.com/IvanChen/p/4489389.html
Copyright © 2011-2022 走看看