sudo dd if=rhel-server-7.2-x86_64-dvd.iso of=/dev/sdb bs=8M sudo fdisk -l
Part 1: RHEL 7.2 Installation and Configuration
The following topics describes how to download, install, and configure the RHEL 7.2 operating system on the Blue Planet server.
Note
|
RHEL 7.2 installation procedures use the Dell PowerEdge R630 rack server as an example. |
Download RHEL 7.2
-
Download the Red Hat Enterprise Linux Server version 7.2 x86_64bit server ISO image.
-
Create a USB stick to place the downloaded RHEL 7.2 ISO image. For Unix, enter the correct device (for example, /dev/sdb or /dev/sdc). For Mac OSX, select the correct USB device /dev/disk{2-4}. For more information, see the Red Hat Customer Portal.
Unix machine:
Mac OSX:
diskutil list sudo dd if=rhel-server-7.2-x86_64-dvd.iso of=/dev/disk4 bs=4096
-
Set up the BIOS to boot from the USB stick, then restart your computer.
Install and configure RHEL 7.2
Follow these steps to install and configure the RHEL 7.2 server software. This method uses the RHEL Anaconda installer. For more information, see the Red Hat Customer Portal.
Important
|
You must have an RHEL 7.2 license to complete this procedure. |
-
After the host machine boots, the Welcome to Red Hat screen displays. Select the language, English (United States), for example, then click Continue.
The Installation Summary window, shown below, displays.
Figure 1. Installation Summary window -
On the Installation Summary window, click DATE & TIME then, on the DATE & TIME window (shown below), select the region to use for the server timezone. Ciena recommends that you set the timezone to GMT.
Figure 2. Date & Time window -
Click Done
-
On the Installation Summary window, click Software Selection, then select the Infrastructure server installation. Do not select any options in the Add-ons for the selected Environment panel.
-
Click Done.
The system automatically detects the live network interface for Network & Host Name.
-
On the Installation Summary window, click Installation Destination. The Installation Destination window, shown below, displays.
Figure 3. Installation Destination window -
On the Installation Destination window, select the following:
-
Local Standard Disks--The available disks display. If two disks are displayed, select only the primary disk. The primary disk is typically displayed on the left and labeled as sda, as shown in the figure above. If more than one is selected (indicated by a checkmark), select to uncheck.
NoteIf you select both disks, they will be included in the volume group and will not be accessible as a second disk for Docker storage. You will need to reinstall RHEL 7.2 to remove the second disk from the volume group. Verify that the second disk has 150 GB available to serve as an LVM partition for Docker container images. This disk is partitioned when you run the docker-storage-setup script. If only one disk is displayed, verify that it has an additional 150 GB for Docker images.
-
Other Storage Options--Select I will configure partitioning.
-
-
Click Done. The Manual Partitioning window, shown below, displays.
Figure 4. Manual Partitioning window 1 -
For the partitioning scheme, select LVM.
-
Select Click here to create them automatically to specify LVM mount points. The Manual Partitioning window displays the information shown below.
Figure 5. Manual Partitioning window 2On the Manual Partitioning window, complete the following steps:
-
Record the amount of home storage space.
-
Select the /home partition, then click "-"" to delete.
-
Select the / (root) partition and add the space that was assigned to the /home partition in step a. For a single-host deployment, leave 150 GB of disk space for Docker storage.
-
Select the /boot partition and increase the partition to 1024 MB.
NoteYou do not need to change the swap partition because it is created automatically.
-
-
Click the / (root) partition.
-
Next to Volume Group (rhel), click Modify. The Configure Volume Group window displays.
-
From the Size Policy list, select As large as possible.
-
Click Save. The Partitioning window displays.
-
-
Click Done. The Summary of Changes window displays.
-
Click Accept Changes.
-
On the Installation Summary window, select Network & Host Name.
-
Verify that the network interface device correctly identifies the default, KDUMP (kernal crash dumping mechanism).
-
Enable the Ethernet port.
-
Click Done.
-
-
In the Installation Summary window, click Begin Installation. The Configuration window, shown below, displays.
Figure 6. Configuration Set Root Password window -
During the installation, set the root password (you will create a non-root bpadmin user later):
-
Click Root Password.
-
Enter a password in Root Password, then enter the password again to confirm.
-
Click Done. If the password is weak, click Done twice to accept the weak password.
NoteA weak password is acceptable because you will restrict the server to sshkeys access and the Red Hat user will not have remote SSH access. You can change the password later. -
Click Done again.
-
Register RHEL 7.2 and update RHEL 7.2 package and dependencies
Complete the following steps to register the RHEL 7.2 installation and update the RHEL package and dependencies.
-
Register your RHEL installation using the
subscription-manager register
command.subscription-manager register --username bpuser@ciena --password <password> --auto-attach --release=7.2 --force
-
Download and install the RHEL 7.2 Infrastructure Server base on each server.
NoteThe Blue Planet server requires the infrastructure server package. yum --setopt=group_package_types=mandatory,default,optional groupinstall 'Infrastructure Server'
ImportantThis Blue Planet release can only run on RHEL 7.2. Enable only the following RPM packages. Do not enable others because they might interfere with Blue Planet processes.
-
rhel-7-server-rh-common-rpms
-
rhel-7-server-rpms
-
rhel-7-server-optional-rpms
-
-
Update any RHEL packages and dependencies (assume yes if prompted).
yum update -y
Configure the host names
Complete the following steps to give Blue Planet host(s) a unique name.
-
Log in as root.
$ sudo -s
-
Set a unique name using the
hostnamectl set-hostname
command. This example sets the name,cluster1.mycompany.com
.# hostnamectl set-hostname cluster1.mycompany.com
-
For multi-host clusters, complete steps 1-2 at each host.
Remove and recreate the SSH host files
-
Remove the SSH host files, create new SSH host files, and restart the
sshd.service
.rm -rf /etc/ssh/ssh_host_* ssh-keygen -A systemctl restart sshd.service
-
For a multi-host cluster, repeat step 1 at each host.
Create the bpadmin user
Complete the following steps to create a non-root user named bpadmin
. The bpadmin
user is required to perform the remaining Blue Planet installation tasks.
-
As root, add a Docker group.
# groupadd docker
-
Create the user,
bpadmin
.# useradd -d /home/bpadmin -m -s /bin/bash -g docker bpadmin
-
Set the password for
bpadmin
; in this example the password isbpadminpw
.# passwd bpadmin Changing password for user bpadmin. New password: xxxxxxxxx Retype new password: xxxxxxxxx password set
-
Create an
/etc/bp2
directory and set the owner asbpadmin
.# mkdir /etc/bp2 # chown bpadmin:`id --group bpadmin` /etc/bp2
-
Repeat steps 1 through 4 on each host.
Create the bpadmin user sudo privileges
Complete the following steps to create sudo privileges for the bpadmin user. Adding the permissions accurately is important. Should you encounter permission failures later in the Blue Planet installation, verify that all privileges below were entered accurately.
-
As the root user, create the
/etc/sudoers.d/bpadmin
file on each host and enter the following permissions.# cat <<EOF > /etc/sudoers.d/bpadmin bpadmin ALL=(ALL) NOPASSWD: /bin/apply-ilan-config bpadmin ALL=(ALL) NOPASSWD: /usr/bin/bp2-site* bpadmin ALL=(ALL) NOPASSWD: /usr/bin/rm /etc/docker/key.json bpadmin ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart docker.service bpadmin ALL=(ALL) NOPASSWD: /usr/bin/systemctl stop docker.service bpadmin ALL=(ALL) NOPASSWD: /usr/bin/systemctl start docker.service bpadmin ALL=(ALL) NOPASSWD: /usr/bin/set-site-ip bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/brctl delif dockerbr ilanbr bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/ifconfig ilanbr down bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/ovs-vsctl add-br ilanbr bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/ovs-vsctl del-br ilanbr bpadmin ALL=(ALL) NOPASSWD: /usr/bin/yum remove bpadmin ALL=(ALL) NOPASSWD: /usr/bin/yum clean bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/wipefs bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/lvremove --force direct-lvm bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/lvremove -y rhel/docker-pool bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/lvremove -y direct-lvm/docker-pool bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/vgdisplay bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/vgremove -y direct-lvm bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/lvs bpadmin ALL=(ALL) NOPASSWD: /bin/rm -rf /etc/yum.repos.d/bp2.repo bpadmin ALL=(ALL) NOPASSWD: /usr/sbin/service docker restart bpadmin ALL=(ALL) NOPASSWD: /bin/rm -rf /tmp/bp-docker-installer/ bpadmin ALL=(ALL) NOPASSWD: /tmp/bp-docker-installer/configure-sshd.sh bpadmin ALL=(ALL) NOPASSWD: /tmp/bp-docker-installer/single-host-install.sh bpadmin ALL=(ALL) NOPASSWD: /bin/rm -rf /var/lib/docker bpadmin ALL=(ALL) NOPASSWD: /bin/rm -rf /etc/sysconfig/docker-storage bpadmin ALL=(ALL) NOPASSWD: /bin/rm -rf /etc/sysconfig/docker-storage-setup bpadmin ALL=(ALL) NOPASSWD: /bin/rm -rf /etc/bp2/* bpadmin ALL=(ALL) NOPASSWD: /bin/find /bp2 -type d -exec chmod go+rX {} + bpadmin ALL=(ALL) NOPASSWD: /bin/find /bp2 -type f -exec chmod go+r {} + EOF
-
Disable
tty
forsudo ssh
sessions.sed -i 's/^Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
-
Complete steps 1 and 2 on each host.
Configure the SSH keys
Complete the following steps to configure the SSH keys for the root and bpadmin users.
-
Generate an SSH RSA key pair. Repeat at each host.
# ssh-keygen -t rsa
NoteAccept the default file location of ~/.ssh/id_rsa
, leave the pass phrase empty, and confirm. This writes the public key to~/.ssh/id_rsa.pub
and the private key to~/.ssh/id_rsa
. -
Copy the root SSH key to the host. When prompted, enter the root password and proceed. Repeat for each host.
# ssh-copy-id -i ~/.ssh/id_rsa.pub root@<server-ip host-A> # ssh-copy-id -i ~/.ssh/id_rsa.pub root@<server-ip host-B> # ssh-copy-id -i ~/.ssh/id_rsa.pub root@<server-ip host-C>
-
Switch user to
bpadmin
and create the SSH key.NoteAccept the default ~/.ssh/id_rsa file location, leave the pass phrase empty, and confirm. The public key will be written to ~/.ssh/id_rsa.pub and the private key to ~/.ssh/id_rsa. su bpadmin ssh-keygen -t rsa
-
Copy the bpadmin SSH key to itself. When prompted, enter the bpadmin password and proceed.
ssh-copy-id -i ~/.ssh/id_rsa.pub bpadmin@<server-ip host-A> ssh-copy-id -i ~/.ssh/id_rsa.pub bpadmin@<server-ip host-B> ssh-copy-id -i ~/.ssh/id_rsa.pub bpadmin@<server-ip host-C>
-
Repeat steps 3 and 4 at each host.