配置ironic-conductor服务
![](/doc_center/source/zh/kunpengcpfs/ecosystemEnable/OpenStack/public_sys-resources/note_3.0-zh-cn.png)
以下所有操作在baremetal节点执行。
- 打开“/etc/ironic/ironic.conf”文件。
vi /etc/ironic/ironic.conf
- 配置HOST_IP为ironic-conductor主机的IP地址。
1 2
[DEFAULT] my_ip = <HOST_IP>
- 配置数据库的位置。
1 2 3 4
[database] # The SQLAlchemy connection string used to connect to the # database (string value) connection = mysql+pymysql://ironic:PASSWORD@controller/ironic?charset=utf8
- 本文中ironic-conductor和ironic-api子服务部署在同一个节点,因此不用重复配置。如果分离部署,则需要参考ironic-api服务配置。
- 为方便理解,本文将涉及到的密码全部以“PASSWORD”代替,请用户根据实际情况进行修改。此处将PASSWORD修改为ironic数据库的密码。
- 配置ironic-conductor子服务使用RabbitMQ消息队列。
1 2
[DEFAULT] transport_url = rabbit://RPC_USER:RPC_PASSWORD@RPC_HOST:RPC_PORT/
- 本文中ironic-conductor和ironic-api子服务部署在同一个节点,因此不用重复配置。如果分离部署,则需要参考ironic-api服务配置使用RabbitMQ消息队列。
- 此处RPC_USER为RabbitMQ服务的OpenStack用户,RPC_PASSWORD为RabbitMQ服务用户对应的密码,RPC_HOST为RabbitMQ消息队列所在节点的管理IP地址,RPC_PORT为RabbitMQ服务的端口,配置RabbitMQ的详细操作步骤请参见安装RabbitMQ。本指导中为:transport_url = rabbit://openstack:123456@controller:5672/。
- 配置ironic-condutor使用JSON RPC与ironic-api之间的交互。在配置中启用它,并提供用于身份验证的关键凭证。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
[DEFAULT] rpc_transport = json-rpc [json_rpc] # Authentication type to load (string value) auth_type = password # Authentication URL (string value) auth_url = http://controller:5000/ # Username (string value) username = ironic # User's password (string value) password = PASSWORD # Project name to scope to (string value) project_name = service # Domain ID containing project (string value) project_domain_id = default # User's domain id (string value) user_domain_name = default
- 本文中ironic-conductor和ironic-api子服务部署在同一个节点,因此不用重复配置。如果分离部署,则需要参考ironic-api服务与ironic-conductor子服务交互配置。
- 为方便理解,本文将涉及到的密码全部以“PASSWORD”代替,请用户根据实际情况进行修改。此处将PASSWORD修改为创建裸金属服务数据库中ironic用户数据库的密码。
- 配置api_url地址。
1 2
[conductor] api_url = http://${IRONIC_API_IP}:${IRONIC_API_PORT}
- IRONIC_API_IP为ironic-api服务所在节点的服务IP地址,本文中为90.91.16.2。
- IRONIC_API_PORT为ironic-api服务监测端口号,默认为6385。
- 配置ironi-conductor子服务用于访问其他OpenStack服务的凭据。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
[neutron] auth_type = password auth_url = http://controller:5000/ username = ironic password = PASSWORD project_name = service project_domain_id = default user_domain_id = default cafile = /opt/stack/data/ca-bundle.pem region_name = RegionOne valid_interfaces = public [glance] region_name = RegionOne cafile = /opt/stack/data/ca-bundle.pem project_domain_id = default user_domain_id = default project_name = service password = PASSWORD username = ironic auth_url = http://controller:5000/v3/ auth_type = password [swift] region_name = RegionOne cafile = /opt/stack/data/ca-bundle.pem project_domain_id = default user_domain_id = default project_name = service password = PASSWORD username = ironic auth_url = http://controller/v3/ auth_type = password [cinder] region_name = RegionOne cafile = /opt/stack/data/ca-bundle.pem project_domain_id = default user_domain_id = default project_name = service password = PASSWORD username = ironic auth_url = http://controller:5000/v3/ auth_type = password [service_catalog] region_name = RegionOne cafile = /opt/stack/data/ca-bundle.pem project_domain_id = default user_domain_id = default project_name = service password = PASSWORD username = ironic auth_url = http://controller:5000/v3/ auth_type = password
- 设置ironic-conductor部署配置。
1 2 3 4 5 6 7 8 9 10 11 12
[agent] deploy_logs_collect = always deploy_logs_storage_backend = local deploy_logs_local_path = /var/log/ironic/deploy [deploy] erase_devices_priority = 0 default_boot_option = local default_boot_mode = bios [neutron] port_setup_delay = 15
- 按“Esc”键,输入:wq!,按“Enter”保存并退出编辑。
- 重启ironic-conductor子服务。
1 2
systemctl restart openstack-ironic-conductor systemctl status openstack-ironic-conductor
父主题: 安裝部署裸金属服务