2015-07-28
OpenStack RDO Manager Installation (1)
How to install the OpenStack RedHat RDO Manager (TripleO). Basically follow the same as official documents. However, there are some pitfalls. Probably official documents are written for user who understand OpenStack professionally.
In addition, this article written by 2015-07-20. RDO manager bugs are fixing daily. Some written details may be no longer usable. Please leave comment this article if you have it.
Environment
Environment | |
---|---|
Install To | Intel CPU, RAM 8GB, SSD 256GB |
Etc | |
---|---|
PC for Operation(Workstation) | Windows 8.1 |
Terminal Environment | MinGW+MSYS+ConEmu |
USB Flash Drive for OS Installation | USB Flash Drive 16GB (8GB Enough) |
CentOS 7.1 Installation
Install CentOS 7.1 Below instructions are how to install from USB.
Burn the iso file to USB Flash Drive
Download CentOS-7-x86_64-DVD-1503-01.iso.
Write image to FAT32 formatted USB Flash Drive by Win32 Disk Imager. Also may be use Rufus.
Install CentOS
Boot from USB for CentOS 7.1 installation.
- Leave checkbox on `Automatically connect to this network when available' of Ethernet/Configure/General on the NETWORK & HOST NAME.
- Should be IPV4 Settings if you don't use DHCP.
- xfs partitions by default is basic, but this time the Btrfs used.
- Continue to work via ssh connection after installation.
Please check the IP address of DHCP-obtained after you install. Host IP address is 192.168.100.30 as RDO Manager host in this article.
stack user creation
Create user via ssh login by MSYS bash Installation runs by sudo. Set sudoers by following commands. Should be removed requiretty for remote command execution. (Considering alternative to use ssh -t instead of these)
$ ssh root@192.168.100.30
[root@localhost ~]# useradd stack
[root@localhost ~]# passwd stack
[root@localhost ~]# echo "%stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/stack
[root@localhost ~]# sed -i "s/^\(.*requiretty\)$/#\1/" /etc/sudoers
[root@localhost ~]# echo 'Defaults env_keep += "HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY NO_PROXY"' >> /etc/sudoers
[root@localhost ~]# logout
Register ssh public key (MSYS bash on Windows)
Register public key to remote host for ssh. Please create public key by ssh-keygen by workstation(Windows 8.1).
$ ssh-keygen
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc...
Copy ssh public key to remote host (from MSYS bash on Windows)
MSYS doen't have ssh-copy-id command. Please use below scritpt instead of it. http://gabrielsomoza.com/server-administration/ssh-copy-id-implementation-for-mingw-and-msys/
$ wget https://gist.github.com/gabrielsomoza/1825620/raw/f5a8febd458ba443e10bd7fe488603bc530f11ba/ssh-copy-id.sh --no-check-certificate
$ ssh-copy-id.sh -i ~/.ssh/id_rsa.pub stack@192.168.100.30
Log in with ssh public key.
$ ssh -i ~/.ssh/id_rsa stack@192.168.100.30
sshd settings
Disallow remote login as root and only accept public key authentication for security reasons. Set ClientAliveInterval to 30 for avoid ssh disconnection of long running script.
[stack@rdo ~]$ sudo sed -i.orig "s/#RSAAuthentication.*$/RSAAuthentication yes/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo sed -i "s/#PubkeyAuthentication.*$/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo sed -i "s/#AuthorizedKeysFile\(.*\)$/AuthorizedKeysFile\1/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo sed -i "s/#PermitRootLogin.*$/PermitRootLogin no/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo sed -i "s/PasswordAuthentication.*$/PasswordAuthentication no/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo sed -i "s/GSSAPIAuthentication.*$/GSSAPIAuthentication no/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo sed -i "s/#UseDNS.*$/UseDNS no/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo sed -i "s/#ClientAliveInterval.*$/ClientAliveInterval 30/g" /etc/ssh/sshd_config
[stack@rdo ~]$ sudo systemctl restart sshd
[stack@rdo ~]$ logout
Re-login with ssh public key.
$ ssh -i ~/.ssh/id_rsa stack@192.168.100.30
Modify grub
Only install it to SSD if it install on HDD, Please ignore.
Modifying kernel boot parameter for SSD. (elevator=noop)
Deadline I/O scheduler is default. SSD should be consider to use noop scheduler for better performance. Turn off GUI booting. (rhgb quiet)
[stack@rdo ~]$ sudo vi /etc/default/grub
Change GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet" to GRUB_CMDLINE_LINUX="crashkernel=auto elevator=noop"
Please remember to run grub2-mkconfig.
[stack@rdo ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Modify fstab (for Btrfs)
Please ignore if using HDD.
Modify the parameter in fstab for SSD.
[stack@rdo ~]# vi /etc/fstab
Change btrfs subvol=root to btrfs subvol=root,noatime,discard,ssd,compress=lzo,space_cache
Change btrfs subvol=home to btrfs subvol=home,noatime,discard,ssd,compress=lzo,space_cache
Change Hostname
Should change hostname because still remains localhost.localdomain. Change to rdo.local
[stack@rdo ~]$ sudo vi /etc/hostname
Change localhost.localdomain to *rdo.local
Update modules and kernel
Modules and kernel update and reboot.
[stack@rdo ~]$ sudo yum -y update
[stack@rdo ~]$ sudo reboot
Now, it ready to install RDO Manager. Next article describes Install RDO Manager.