This section describes how to prepare an Oracle VM Server compute node for OpenStack. Section 3.4, “Preparing Oracle Linux Nodes” describes how to prepare an Oracle Linux node.
You can download the installation ISO for Oracle VM Server Release 3.4,
from the Oracle Software Delivery Cloud at:
https://edelivery.oracle.com/linux
To prepare an Oracle VM Server compute node:
Install Oracle VM Server for x86 using the instructions in the Oracle VM Installation and Upgrade Guide for Release 3.4 at:
http://docs.oracle.com/cd/E64076_01/E64078/html/vmiug-ovs-install-x86.html
When the operating system is installed, select Alt+F2 to enter the login screen. Log in as the
rootuser.Increase the dom0 maximum memory allocation to 16GB.
Any RAM not in use by dom0 is available for use by domUs (virtual machines).
Edit the
/etc/default/grubfile on the Oracle VM Server and change thedom0_memparameter to16384M:GRUB_CMDLINE_XEN="dom0_mem=max:16384M allowsuperpage"Regenerate the
grub.cfgfile.For example, in a BIOS installation, enter:
# grub2-mkconfig -o /boot/grub2/grub.cfg
In a UEFI installation, enter:
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Restart the Oracle VM Server for the changes to take effect:
# reboot
Disable and stop the Oracle VM Agent service:
# chkconfig ovs-agent off # service ovs-agent stop
Download the latest Oracle Linux Release 6 Yum Server repository file:
# curl -L -o /etc/yum.repos.d/public-yum-ol6.repo \ http://yum.oracle.com/public-yum-ol6.repo
Edit the
/etc/yum.repos.d/public-yum-ol6.repofile. Enable the following repositories by settingenabled=1in the following sections:[ol6_addons][ol6_UEKR4][ol6_openstack21]
All other repositories should be disabled by setting
enabled=0in each section.This repository contains the required packages for Oracle Linux Release 6, upon which Oracle VM Server is based. This repository also contains the preinstallation packages to set up Oracle OpenStack for Oracle Linux on Oracle VM Server. This repository does not contain updates for Oracle VM Server.
If you access the Yum repositories using a proxy server, update the
/etc/yum.conffile with the proxy server address. For more information on using the Oracle Linux Yum Server, see:https://docs.oracle.com/cd/E37670_01/E41138/html/ol_yum.html
Use the yum command to check the repository configuration.
Clean all yum cached files from all enabled repositories.
# yum clean all
List the configured repositories for the system.
# yum repolist
Make sure the system is up-to-date:
# yum update
The
iptablesservice is not running by default. If you enable theiptablesservice, you need to make sure all the required ports are open. You can find a list of the required ports by issuing the following command from the master node (after setting up all the required kollacli deployment options).# kollacli property list | grep port
For more information on using
iptables, see the Oracle Linux Administrator's Guide for Release 6:https://docs.oracle.com/cd/E37670_01/E41138/html/ol_firewall_sec.html
Create a partition for the Docker images. This partition must be at least 64 GB in size. The partition can be created in a number of ways, depending on your hardware and storage configuration.
For simplicity, this example uses an Oracle VM Server installation on a single disk, accepting all the partitioning defaults in the Oracle VM Server installer. Your installation and configuration may vary.
Example 3.1 In a UEFI-based installation:
Start the
partedutility:#
partedGNU Parted 2.1 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands.List the existing partitions:
(parted)
print... Number Start End Size File system Name Flags 1 ... ... ... fat16 boot 2 ... ... ... ext4 3 ... ... ... ext4 4 ... ... ... linux-swap(v1) 5 ... ... ...Remove the last partition:
(parted)
rm 5Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.Create a new btrfs partition of at least 64 GB for the Docker images, for example:
(parted)
mkpart btrfsWarning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.100GB 164GBCreate a partition with the remaining space for the Oracle VM Server local storage, for example:
(parted)
mkpart extendedWarning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.164GB 1200GBThe results should look something like this:
(parted)
print... Number Start End Size File system Name Flags 1 ... ... ... fat16 boot 2 ... ... ... ext4 3 ... ... ... ext4 4 ... ... ... linux-swap(v1) 5 100GB 160GB 64GB btrfs 6 160GB ... ... extendedReboot the Oracle VM Server:
# reboot
Example 3.2 In a BIOS-based installation:
List the partitions using:
#
fdisk -l... Device Boot Start End Blocks Id System /dev/sda1 * ... ... ... 83 Linux /dev/sda2 ... ... ... 83 Linux /dev/sda3 ... ... ... 82 Linux swap / Solaris /dev/sda4 ... ... ... 83 Linux ...As shown in this output, there are four primary partitions. A BIOS-based installation is restricted to four primary partitions. To create another partition for Oracle OpenStack for Oracle Linux, delete the last partition, and create a new extended partition, which can include a new logical partition for the Docker images.
Start the
fdiskutility.#
fdisk /dev/sdaWARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').Remove the last partition created by the Oracle VM Server installer, this case it is the fourth partition:
Command (m for help):
dPartition number (1-4):4Write the changes to the partition table and exit:
Command (m for help):
wThe partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks.Reboot the Oracle VM Server:
# reboot
Create an extended partition for the Oracle VM Server local storage:
#
fdisk /dev/sdaWARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help):nCommand action e extended p primary partition (1-4)eSelected partition 4 First cylinder (...-..., default ...): Using default value ... Last cylinder, +cylinders or +size{K,M,G} (...-..., default ...): Using default value ...Create a logical partition for the Docker images, with a size of at least 64 GB:
Command (m for help):
nFirst cylinder (...-..., default ...): Using default value ... Last cylinder, +cylinders or +size{K,M,G} (...-..., default ...):+64GThe results should look something like this:
Command (m for help):
p... Device Boot Start End Blocks Id System /dev/sda1 * 1 ... ... 83 Linux /dev/sda2 ... ... ... 83 Linux /dev/sda3 ... ... ... 82 Linux swap / Solaris /dev/sda4 ... ... ... 5 Extended /dev/sda5 ... ... ... 83 LinuxWrite the changes to the partition table and exit:
Command (m for help):
wThe partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks.Reboot the Oracle VM Server:
# reboot
Create a btrfs file system on the new partition, mounted on
/var/lib/docker.A simple example follows. This example formats an existing partition on
/dev/sda5, and mounts it on/var/lib/dockerusing the/etc/fstabfile.Create the btrfs file system on an existing device:
# mkfs.btrfs -f -L docker /dev/sda5
Use the blkid command to display the UUID of the device and make a note of this value, for example:
#
blkid /dev/sda5/dev/sda5: LABEL="docker" UUID="bb6912ae-e6c4-4ffd-bcdc-37c8c19eb7db" UUID_SUB="599202a1-fb2d-4352-916f-aee4d034d3bd" TYPE="btrfs"Edit the
/etc/fstabfile and add an entry to ensure the file system is mounted when the system boots:UUID=bb6912ae-e6c4-4ffd-bcdc-37c8c19eb7db /var/lib/docker btrfs defaults 1 2Create the
/var/lib/dockerdirectory:# mkdir /var/lib/docker
Mount all the file systems listed in
/etc/fstab:# mount -a
You can verify the partition is mounted using:
#
dfFilesystem 1K-blocks Used Available Use% Mounted on ... /dev/sda5 ... ... ... 1% /var/lib/docker
More information on using mkfs.btrfs is available in the Oracle Linux Administrator's Guide for Release 6 at:
https://docs.oracle.com/cd/E37670_01/E41138/html/ol_create_btrfs.html
Install the Oracle OpenStack for Oracle Linux preinstallation package from the Oracle Yum Server:
# yum install openstack-kolla-preinstall
If you are using a web proxy, configure the
dockerservice to use the proxy.Add the following content to the
/etc/sysconfig/dockerfile:HTTP_PROXY=
proxy_URL:porthttp_proxy=$HTTP_PROXY HTTPS_PROXY=$HTTP_PROXY https_proxy=$HTTP_PROXYReplace
proxy_URLandportwith the appropriate URLs and port numbers for your web proxy.You may also want to specify that local connections do not need to be proxied by setting the
NO_PROXYenvironment variable:NO_PROXY=localhost,127.0.0.1 no_proxy=localhost,127.0.0.1
Include a line to export these environment variables:
export HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy
Restart the
dockerservice:# service docker restart
Synchronize the host time with the controller nodes to avoid errors during OpenStack operations. Time synchronization is discussed in more detail in Section 3.4, “Preparing Oracle Linux Nodes”.
To synchronize the host with the controller nodes, edit the
/etc/ntp.conffile to configure thentpdservice. Add the controller nodes to the file, for example:server control1.example.com server control2.example.com
Create the drift file, which is used to store the system's clock drift value.
# touch /var/lib/ntp/drift
Start the
ntpdservice and configure it to start following a system reboot.# service ntpd start # chkconfig ntpd on
You can check the
ntpdservice is configured and synchronizing correctly using thentpqandntpstatcommands, for example:#
ntpq -premote refid st t when poll reach delay offset jitter ============================================================================== *control1 10.169.64.1 3 u 58 64 377 0.132 33.490 22.604 control2 .INIT. 16 u - 128 0 0.000 0.000 0.000 #ntpstatsynchronised to NTP server (10.196.134.1) at stratum 4 time correct to within 120 ms polling server every 64 s

