An Oracle VM Server can be used as a compute node, and as a Ceph OSD node. This section describes how to prepare an Oracle VM Server as a compute node for OpenStack. Section 4.10.6, “Setting up Oracle VM Server as a Ceph OSD” describes how to prepare an Oracle VM Server as a Ceph OSD node. Section 3.5, “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.2,
from the Oracle Software Delivery Cloud at:
https://edelivery.oracle.com/linux
To prepare an Oracle VM Server node:
Install Oracle VM Server for x86 using the instructions in the Oracle VM Installation and Upgrade Guide for Release 3.4.2 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
root
user.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/grub
file on the Oracle VM Server and change thedom0_mem
parameter to16384M
:GRUB_CMDLINE_XEN="dom0_mem=max:16384M allowsuperpage"
Regenerate the
grub.cfg
file.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
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.repo
file. Enable the following repositories by settingenabled=1
in the following sections:[ol6_addons]
[ol6_UEKR4]
[ol6_openstack30]
All other repositories should be disabled by setting
enabled=0
in 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.conf
file 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
The
iptables
service is not running by default. If you enable theiptables
service, 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
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
docker
service to use the proxy.Add the following content to the
/etc/sysconfig/docker
file:HTTP_PROXY=
proxy_URL
:port
http_proxy=$HTTP_PROXY HTTPS_PROXY=$HTTP_PROXY https_proxy=$HTTP_PROXYReplace
proxy_URL
andport
with 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_PROXY
environment 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
docker
service:# service docker restart
Create a partition for Docker.
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
parted
utility:#
parted
GNU 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 5
Warning: 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 partition of at least 64 GB for Docker, for example:
(parted)
mkpart docker
Warning: 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 164GB
Create a partition with the remaining space for the Oracle VM Server local storage, for example:
(parted)
mkpart storage
Warning: 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 1200GB
The 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 docker 6 160GB ... ... storageReboot 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
fdisk
utility.#
fdisk /dev/sda
WARNING: 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):
d
Partition number (1-4):4
Write the changes to the partition table and exit:
Command (m for help):
w
The 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/sda
WARNING: 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):n
Command action e extended p primary partition (1-4)e
Selected 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):
n
First cylinder (...-..., default ...): Using default value ... Last cylinder, +cylinders or +size{K,M,G} (...-..., default ...):+64G
The 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):
w
The 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
Stop the
docker
service:# service docker stop
Create either a btrfs or an ext4 file system on the partition you created for Docker, mounted on
/var/lib/docker
.The following example formats an existing partition on
/dev/sda5
, and mounts it on/var/lib/docker
using the/etc/fstab
file.Create the file system on an existing device:
To create a btrfs file system:
# mkfs.btrfs -f [-L
label
] /dev/sda5To create an ext4 file system:
# mkfs.ext4 [-L
label
] /dev/sda5where
-L
is an optional label that can be used to mount the file system.label
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
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/fstab
file 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 2
If you created a label for the file system, you can also use the label instead of the UUID, for example:
LABEL=
label
/var/lib/docker ext4 defaults 1 2Mount all the file systems listed in
/etc/fstab
:# mount -a
You can verify the partition is mounted using:
#
df
Filesystem 1K-blocks Used Available Use% Mounted on ... /dev/sda5 ... ... ... 1% /var/lib/docker
Start the
docker
service:# service docker start
Ensure that Docker is using the correct storage driver, either
btrfs
oroverlay2
.Docker may not use the correct storage driver for the file system mounted on
/var/lib/docker
when it starts. Use the docker info command to check the current storage driver.For a btrfs file system, the storage driver must be
btrfs
, for example:#
docker info | grep -A 1 Storage
Storage Driver: btrfs Build Version: Btrfs v4.2.2For an ext4 file system, the storage driver must be
overlay2
, for example:#
docker info | grep -A 1 Storage
Storage Driver: overlay2 Backing Filesystem: extfsIf the storage driver is incorrect, configure Docker to use the correct driver, as follows:
Edit the
/etc/sysconfig/docker
file and add a--storage-driver
option to theother_args
variable.For example:
other_args='--storage-driver=
driver
'where
driver
is eitherbtrfs
oroverlay2
.Restart the
docker
service.# service docker restart
Check the correct driver is now loaded.
Synchronize the host time with the controller nodes to avoid errors during OpenStack operations. Time synchronization is discussed in more detail in Section 3.5, “Preparing Oracle Linux Nodes”.
To synchronize the host with the controller nodes, edit the
/etc/ntp.conf
file to configure thentpd
service. 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
ntpd
service and configure it to start following a system reboot.# service ntpd start # chkconfig ntpd on
You can check the
ntpd
service is configured and synchronizing correctly using thentpq
andntpstat
commands, for example:#
ntpq -p
remote 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 #ntpstat
synchronised to NTP server (10.196.134.1) at stratum 4 time correct to within 120 ms polling server every 64 s