Before You Begin
If you are deploying Ironic together with the rest of the OpenStack components, make sure that you configure those core components first. At a minimum, Keystone and Glance configurations must be completed before you work on Ironic.
Likewise, ensure that the database for Ironic is set up. This procedure follows the 3-node reference architecture in Figure 2 where the database is set up on the Controller node, together with the rest of the OpenStack databases.
controller# export $CONTROLLER_ADMIN_NODE=controller-node
where controller-node can be either the Controller's IP address or the host name. For more information about setting variables, see Preparing Host Names, Variables, and Passwords.
controller# mysql -u root -p Enter password: MySQL-root-password mysql> create database ironic default character set utf8 default collate utf8_general_ci; mysql> grant all privileges on ironic.* to 'ironic'@'$CONTROLLER_ADMIN_NODE' identified by 'service-password'; mysql> flush privileges; mysql> quit
# pkg install ironic ironicclient rabbitmq # pkg update stevedore stevedore-27
Use the same command whether you are installing the AI server package locally with Ironic or remotely on a different host.
# pkg install pkg:/install/installadm
remote-AI# useradd -d /var/lib/ironic -m -g 88 -u 88 \ -P "Install Service Management" ironic remote-AI# passwd ironic New Password: password Re-enter new Password: password
ironic-localhost# su - ironic ironic-localhost# mkdir /var/lib/ironic/.ssh ironic-localhost# ssh-keygen -N '' -t rsa \ -f /var/lib/ironic/.ssh/id_rsa ironic-localhost# cat /var/lib/ironic/.ssh/id_rsa.pub > \ /var/lib/ironic/.ssh/authorized_keys
remote-AI# su - ironic remote-AI# mkdir /var/lib/ironic/.ssh remote-AI# ssh-keygen -N '' -t rsa \ -f /var/lib/ironic/.ssh/id_rsa remote-AI# cat /var/lib/ironic/.ssh/id_rsa.pub > \ /var/lib/ironic/.ssh/authorized_keys
ironic-localhost# mkdir /var/lib/ironic/.ssh ironic-localhost# scp ironic@AI-server:~/.ssh/id_rsa /var/lib/ironic/.ssh ironic-localhost# scp ironic@AI-server:~/.ssh/id_rsa.pub /var/lib/ironic/.ssh ironic-localhost# cat /var/lib/ironic/.ssh/id_rsa.pub > \ /var/lib/ironic/.ssh/authorized_keys ironic-localhost# chown -R ironic:ironic /var/lib/ironic/.ssh
where AI-server can be either the AI server's IP address or the host name.
Note the following considerations regarding the configuration of certain parameters in the file:
Under the DEFAULT section, specify noauth if you are using Ironic as a stand-alone component. Specify keystone if you are deploying Ironic with other OpenStack components.
Under the ai section, specify localhost if the Automated Installer (AI) is local with Ironic. If the AI is remote, specify that server's IP address or host name.
Under the [database] section, specify the connection to the MySQL database.
Under the glance section, specify the IP address or host name of the Glance server if the auth_strategy parameter is set to keystone.
Also under the glance section, specify either the host names or IP addresses with their corresponding port numbers such as 192.168.0.150:9292. Do not specify localhost.
Use the following sample file to guide you in configuring all the required parameters for Ironic to work. Note that in the sample file, the variable glance-serverIP represents the IP address or host name of the Glance server.
[DEFAULT] enabled_drivers=solaris auth_strategy=setting depends on whether Ironic is stand alone or not pybasedir = /usr/lib/python2.6/vendor-packages/ironic bindir = /usr/lib/ironic host = ironic [ai] server=setting depends on whether AI is local or remote username=ironic port=22 timeout=10 ssh_key_file=/var/lib/ironic/.ssh/id_rsa deploy_interval=30 [api] port=6385 [conductor] api_url=http://localhost:6385/ heartbeat_timeout=60 heartbeat_interval=60 sync_power_state_interval=300 check_provision_state_interval=120 [database] connection= mysql://ironic:ironic-service-password@$CONTROLLER_ADMIN_NODE/ironic [solaris_ipmi] imagecache_dirname = /var/lib/ironic/images imagecache_lock_timeout = 60 [glance] glance_host = glance-serverIP glance_port = 9292 glance_protocol = http glance_api_servers = glance-serverIP:port auth_strategy =for Ironic to use Keystone to interact with Glance, specify keystone [keystone_authtoken]configure if under DEFAULT, auth_strategy = keystone auth_host = localhost auth_uri = http://$CONTROLLER_ADMIN_NODE:5000/v2.0 identity_uri = http://$CONTROLLER_ADMIN_NODE:35357 admin_user = ironic admin_password = ironic-service-password admin_tenant_name = tenant signing_dir = /var/lib/ironic/keystone-signing [neutron] auth_strategy =for Ironic to use Keystone to interact with Neutron, specify keystone
ironic-localhost# svcs -a | grep rabbitmq ironic-localhost# svcs -a | grep ironic
If Ironic is in stand-alone mode, you might need to manually enable the services.
ironic-localhost# svcadm enable rabbitmq ironic-localhost# svcadm enable ironic-db ironic-localhost# svcadm enable ironic-api ironic-conductor
ironic-localhost# export OS_AUTH_TOKEN=fake-token ironic-localhost# export IRONIC_URL=http://localhost:6385
If the Keystone service is in a different node from Ironic, then for OS_AUTH_URL, specify either the host name or the IP address where Keystone is installed.
ironic-localhost# export OS_AUTH_URL=http://$CONTROLLER_ADMIN_NODE:5000/v2.0" ironic-localhost# export OS_TENANT_NAME=service ironic-localhost# export OS_USERNAME=ironic ironic-localhost# export OS_PASSWORD=ironic-service-password ironic-localhost# export IRONIC_URL=http://localhost:6385/
# ironic driver-list +---------------------+----------------+ | Supported driver(s) | Active host(s) | +---------------------+----------------+ | solaris | ironic | +---------------------+----------------+
Currently, solaris is the only enabled and tested driver in Ironic. However, you can add drivers to the list by including their names under the [enabled_drivers] section in the /etc/ironic/ironic.conf file. After adding the drivers, you need to restart the ironic-api and ironic-conductor SMF services.