How to Configure and Deploy a Bare Metal Controller using OpenStack Ironic - Part 2

ID 标签 689645
已更新 12/7/2016
版本 Latest
公共

author-image

作者

Introduction

This is the second post in a series of blogs about how to configure and deploy a bare metal controller using Ironic. The first post described the requirements needed to accomplish this deployment.

Configure the node

In order to use a server as an Ironic node, first configure some BIOS parameters. Check the motherboard manual to determine how to access the BIOS panel, usually by pressing the button F2 or F10. The following images are for illustrative purpose only. Not all BIOS have the same layout so the next step is to find how to configure the following parameters in the motherboard’s BIOS.

Enable IPMI and PXE

First, setup the server to stay down after a power failure. Ironic will bring it up if needed.

Image 1: sample server management configuration

 

In the configuration panel, go to the NIC configuration menu and disable Preboot eXecution Environment (PXE) in all interfaces except the one which is going to be connected to the Ironic network. In this case, we are using the same network interface for Intelligent Platform Management Interface (IPMI) management and PXE booting [1], but the administrator can install a second interface to be used for PXE. It is recommended to use the fastest interface for PXE to speed up the download of the operating system images.

Image 2: NIC configuration

 

Once PXE has been configured for one network interface, go to boot options and set as first option PXE.

Image 3: boot options

Finally, save the changes and exit.

Image 4: exit and save changes

The following configuration option is very useful for debugging purposes. In the console redirection menu, set the redirecting server’s console to a serial (COM) port. With that done, it can be accessed via IPMI to remotely see, for example, the server screen during the boot process.

Image 5: console redirection

Configure IPMI

At this point, two different scenarios are possible: to have an operating system or not to have an operating system in the node server. Of course it is easier to have an operating system, but not necessary.

Before modifying any parameter it is important to be familiar with the IPMI environment. IPMI uses a channel model for direct communications between a communications interface and the Baseband Management Controller (BMC). Each channel has its own properties and its own configuration [2].

Before continuing, it’s very important to know which IPMI channel is assigned to the network interface. To find out, first configure all the IPMI network interfaces with different IP addresses. Next, ping them. Because of the direct connection to only one network interface, only one will reply.

The next step varies depending on whether an OS is installed.

No operating system: access the BIOS again and configure the basic IPMI parameters:

  • The IPMI IP address and force it to be static.

  • The netmask.

  • Enable the root user and set a password.

  • Enable the access to this channel.

With an operating system: install the IPMI tool:

           apt-get get install ipmitool

Next, configure the same parameters described above but using this command line tool:

ipmitool lan set <channel> ipsrc static
ipmitool lan set <channel> ipaddr <IPMI IP address>
ipmitool lan set <channel> netmask <IPMI netmask>
ipmitool lan set <channel> arp respond on
ipmitool lan set <channel> auth ADMIN MD5
ipmitool lan set <channel> access on

# Enable root user (user ID = 2)

ipmitool user enable 2

# Set root password

ipmitool user set password 2 <password>

Check all parameters by executing this command:

ipmitool lan print <channel>

Change the server name by changing the system info:

ipmitool mc setsysinfo system_name <server name>

Once this configuration is finished, try to access the node server from the controller server using the ipmitool to retrieve the chassis status:

ipmitool -I lanplus -H <IPMI IP address>  -U root -P <password> chassis status

Additional instructions on how to implement the next steps will be provided in follow-on blogs.

 

References

[1] Preboot Execution Environment (https://en.wikipedia.org/wiki/Preboot_Execution_Environment)

[2] Thomas Krenn Wiki (https://www.thomas-krenn.com/en/wiki/IPMI_Basics)

 

 

 

"