Hyper Open Edge Cloud

How to Install OS on Rapid Space Server for a Partner

How a partner can install the OS on servers to become Rapid.Space hosting servers.
  • Last Update:2021-01-21
  • Version:001
  • Language:en

This procedure describes the standard installation of base OS of an OCP server done by RapidSpace. Partners should follow this procedure but can use another one if they want.

1. Goal

The goal is to install Debian 10 on all OCP servers of a rack. The OS must be installed on the small SSD disk so that the big SSD disk can be used totally by the Rapid.Space VM. At the end of the procedure, all servers are installed with SSH access.

2. Prerequisites

1. Hardware

Here is the list of hardware you need to complete the procedure:

  • 1 raspberry pi
  • 1 RJ 45 cable
  • all the OCP servers you want to install
  • 1 switch for the OCP server
  • all the cables to connect the switch and the OCP servers

2. Network

IN order to complete the procedure, you will need internet access. The raspberry pi must be able to connect to the internet through wifi. The OCP servers must also have internet access through IPv4 during the procedure. You can decide be plug the OCP servers to the switch through SFP+ cables (in this case, the raspberry pi will be directly plugged to the RJ45 port of each server during installation) or through RJ45 cables (in this case, you will plug the raspberry to the RJ45 switch). 

3. Prepare raspberry device

We use a raspberry device that will be used to do DHCP server and TFTP server during the installation. The raspberry will contains all the scripts needed to install the OS.

Note: The raspberry can be replaced by the switch in the rack if it runs Linux (this is the case for our standard AS5812 switch) or even by any machine inside the rack. The advantage in using the raspberry is that it works no matter the current environment.

Install the raspberry following rapidspace-Create.Raspberry.For.Remote.Maintenance then, as root:

cd /root
apt install ipmitool dnsmasq-base git
git clone https://lab.nexedi.com/nexedi/rapidspace-autoinstall-os

4. Check the network topology of your rack

You need to know/decide the following information to do the installation:

  • network interface: during installation, you can chose to use the OCP mezzanine network interface to get internet access or the RJ45 interface (note: the Leopard servers don't have the RJ45 plug). In any case, you will need IPMI access to the machine so the RJ45 will always be plugged (note: for the Leopard server, you will need to find a way to connect the raspberry to the server's SFP+ port either through a switch or through an adapter)
  • internet access: what will provide internet access during installation: it can be the raspberry through its wifi or the regular internet access you will use later

If you want to use the raspberry to provide internet access, you need to run the following commands as root:

echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
update-alternatives --config iptables # chose legacy iptables
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

5. Adapt scripts to your location

cd /root/rapidspace-autoinstall-os
cp dnsmasq_hydro66.sh dnsmasq_XXX.sh
cp preseed_hydro66.cfg preseed_XXX.cfg

You need to copy the scripts as you can see above. You can give them a name representing the location of your rack. As you can see the script dnsmasq_XXX.sh will do the following things:

  1. download the needed iso files if needed
  2. prepare a special grub config file that will be able to recognize the server depending on their MAC address
  3. prepare the network interfaces configuration file for each machine
  4. launch dnsmasq executable to act as a DHCP server + TFTP server

You need to carefully replace all the variables with what you want in your site. You need also to replace in the linux command line for Debian the name of the preseed script.

Be careful, for DHCP_RANGE if you chose static, then you need to specify each MAC address that can have an IP with --dhcp-host option of dnsmasq command.

You need also to adapt the preseed configuration file for automatic Debian installation. You need to look carefully at the following lines:

  • d-i mirror/http/hostname this is the hostname of the APT mirror you want to use
  • d-i partman/early_command this is the command executed to select the good disk to install your OS on. Be careful with this command in order to install on the correct disk
  • d-i preseed/late_command this command is run at the end of the installation. It will get the network interface file through tftp. You need to use the proper IP. 


 A good thing to do is looking at the diff between the different dnsmasq and preseed files in the repository.

When everything is ready, you should simply launch the dnsmasq script in a terminal (the script should stay opened in the terminal so you can see dnsmasq logs):

cd /root/rapidspace-autoinstall-os

6. Use IPMI to go to the BIOS

Once the IPMI is plugged to the raspberry (either directly or through a switch), you will see that BMC does a DHCP request in the dnsmasq logs. Use this IP address to connect to the IPMI. You can use this command to make sure IPMI access is OK:

ipmitool -I lanplus -U XXX -P XXX -H 192.168.46.XXX chassis power status # replace the XXX with correct values for username/password/IP address

Then, you need to type the following commands to force to boot into bios, then reboot, then connect to serial port:

ipmitool -I lanplus -U XXX -P XXX -H 192.168.46.XXX chassis bootdev bios
ipmitool -I lanplus -U XXX -P XXX -H 192.168.46.XXX chassis power cycle
ipmitool -I lanplus -U XXX -P XXX -H 192.168.46.XXX sol activate

7. Configure BIOS

You must be in UEFI mode and you must select PXE through IPv4 as your first boot device (be careful if you have several interface to use the good one, there is the MAC address of the interface to help you).

Note: UEFI mode can be in "CSM configuration" menu of BIOS.

8. Do installation

Use IPMI to reboot the system again and follow the installation progression through the serial port:

ipmitool -I lanplus -U XXX -P XXX -H 192.168.46.XXX chassis power cycle
ipmitool -I lanplus -U XXX -P XXX -H 192.168.46.XXX sol activate

When grub shows up, you must manually type "Enter" to select debian installation. Then the rest of the process should be fully automatic. If something goes wrong, you can debug what is happening with the shell inside the installer and modify the preseed files to what you want. Then restart the installation.

9. Test

At the end of this procedure, you should now be able to login with SSH on all the servers of the rack. Make sure it is really the case. Each server must have internet access through IPv4. Make sure, you can ping from all the servers.

10. Next steps

When all the OCP machines are installed with Debian 10, you can follow the procedure described in rapidspace-HowTo.Partner.Setup.Server.Installation.