Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring the ironic-api Service

Perform the following operations on the baremetal node.

  1. Open the /etc/ironic/ironic.conf file.
    vi /etc/ironic/ironic.conf
  2. Press i to enter the insert mode and configure the location of the database. The BMS stores information in the database. This document uses the MySQL database used by other OpenStack services.
    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
    

    In this document, all passwords are represented as PASSWORD. Use the actual password during the operation. Replace the PASSWORD with the password of the Ironic database.

  3. Configure the ironic-api service to use the RabbitMQ message proxy by setting the option below. Replace RPC_* with the address and credential of the RabbitMQ server.
    1
    2
    [DEFAULT]
    transport_url = rabbit://RPC_USER:RPC_PASSWORD@RPC_HOST:RPC_PORT/
    

    RPC_USER indicates the OpenStack user of the RabbitMQ service, RPC_PASSWORD indicates the password of the RabbitMQ service user, RPC_HOST indicates the management IP address of the node where the RabbitMQ message queue is located, and RPC_PORT indicates the RabbitMQ service port. For details about RabbitMQ messages, see Installing RabbitMQ. This document uses transport_url = rabbit://openstack:123456@controller:5672 as an example.

  4. Configure JSON RPC for the interaction between ironic-conductor and ironic-api. Enable it in the configuration and provide key credentials for authentication.
     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_id = default
    

    In this document, all passwords are represented as PASSWORD. Use the actual password during the operation. Replace PASSWORD with the password of the Ironic database described in Creating a BMS Database.

  5. Configure the ironic-api service to be used together with the Identity service.
     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
    [DEFAULT]
    auth_strategy = keystone
     
    [keystone_authtoken]
    # Authentication type to load (string value)
    auth_type = password
     
    # Complete public Identity API endpoint (string value)
    www_authenticate_uri = http://controller:5000
     
    # Complete admin Identity API endpoint. (string value)
    auth_url = http://controller:5000
     
    # Service username. (string value)
    username = ironic
     
    # Service account password. (string value)
    password = PASSWORD
     
    # Service tenant name. (string value)
    project_name = service
     
    # Domain name containing project (string value)
    project_domain_name = Default
     
    # User's domain name (string value)
    user_domain_name = Default
    

    In this document, all passwords are represented as PASSWORD. Use the actual password during the operation. Replace PASSWORD with the password selected by Ironic for the user in the Identity service, which is described in Creating a BMS Database.

  6. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  7. Run the following command on the BMS management node baremetal to create a BMS ironic database table:
    1
    ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema
    
  8. Restart the ironic-api service.
    1
    2
    systemctl restart openstack-ironic-api
    systemctl status openstack-ironic-api