Total Pageviews

Sunday, November 20, 2011

RHEV 3 Cook Book Part 2


Installing RHEV Manager

 This is a continuation of RHEV 3 Cook Book Part 1. Please Read My Post http://rcritical.blogspot.com/2011/09/rhev-3-cookbook.html before setting up your RHEV Manager and follow further subsequent Steps of this Post if you are new to RHEV.

 Once you have the working DNS Set up Ready to use with RHEV Manager and the Optional IPA Directory Service to attach with RHEV Manager for Providing Multi Admin User Access to user RHEV Manager UI, Its time to jump to start the rhevm set up tool.

Login in as root  to the RHEL 6.1 Machine which is going to act as a RHEV Manager and run the rhevm-setup and follow the On Screen Instruction to finish the manager set up. 

At any Point of time if you want to refer the installation log you can refer /var/log/rhevm/rhevm-setup_Year__Date_Time.log which will get created the moment you start run the rhevm-setup tool.


Note: Values in Bold Can be Changed as relevant to your environment. Most of the time leaving values to default is sufficient if you in case you need any change set up tool will you to do that as well.  All below set up information are captured as a screen shot for your reference. Check below after this rhevm-setup.

# rhevm-setup

Welcome to RHEV Manager setup utility

HTTP Port [8080] :  ##Change as per your requirement else leave default 
 
HTTPS Port [8443] : ##Change as per your requirement else leave default 
 
Host fully qualified domain name, note that this name should be fully resolvable [rhevmanager.rhev3.in] : ##Change as per your requirement else leave default 
 
Password for Administrator (admin@internal) : ##Feed Admin Password
Confirm password : ##Re Feed the password to Confirm
Database password (required for secure authentication with the locally created database) : ##Feed Postgresql rhevm db password
Confirm password : ##Re Feed Postgresql rhevm db password

Organization Name for the Certificate: PAPS ##your organization name
 
The default storage type you will be using ['NFS'| 'FC'| 'ISCSI'] [NFS] : FC  ##your default storage type FC in our case

Should the installer configure NFS share on this server to be used as an ISO Domain? ['yes'| 'no'] [yes] : no   

##rhev need nfs disk to store all software dumps required for os installation and other third party software installation if you have sufficient disk space on the rhevm server by saying yes you need to provide the export path and this will create a nfs iso export disk on the same  rhevm instance instead of using other standalone NFS Server to store all  your ISO Dumps.


Firewall ports need to be opened.

You can let the installer configure iptables automatically overriding the current configuration. The old configuration will be backed up.

Alternately you can configure the firewall later using an example iptables file found under /usr/share/rhevm/conf/iptables.example

Configure iptables ? ['yes'| 'no']: yes


RHEV Manager will be installed using the following configuration:

=================================================================

http-port: 8080
https-port: 8443
host-fqdn: rhevmanager.rhev3.in
auth-pass: ********
db-pass: ********
org-name: PAPS
default-dc-type: FC
override-iptables: yes
Proceed with the configuration listed above? (yes|no):yes
=================================================================


By Accepting all info as Yes the set up tool will start the rhevm installation

Check the Screen Shot of the Complete above steps i captured for your reference.



After few minutes you will see post installation Information as similar like  the one in below screen shot. You can refer the rhevm set up log for installation details and errors if any. 





You are Done Now its the time to Log in to the RHEV Manager UI. For supported Browser You can check the Client Requirement section of the blog to access Admin and User Portal.


Point your Browser to http://rhevmanager.rhev3.in:8080/ and you will see a single consolidated UI to access various RHEV Web Services.

 


Now Click on Administrator portal (http or https) and it will ask you to install CA and Application Certificate once for first time.







Install Application Certificate and Finish.






Now if you select Click to Here Run Administrator Portal it will take you the RHEV Manager Login Screen.




Log in With the admin user with  the password you provided during the  rhevm set up tool and you can See Domain set as internal by default. Yes admin is the internal user created by rhevm  set up tool for the Admin Purpose. 

Later we can see how to join RHEVM With Directory Services Especially with the IPA set up we had  done in RHEV 3 Cook Book.


OK now we can set up the Hypervisor Part and then we will switch back to RHEV Manager UI and See Creating a new Data Centre, Cluster, Adding Host, Attaching Storage and Spindling up Virtual Machines and More Later in the blog section 


Setting up Hyperviors 

  As far as Hypervisor Set up is Concerned you can use either Bare metal Hypervisor build on the same code of RHEL6 designed and  trimmed down to 125MB Foot Print for virtualization specific work loads or you can use RHEL 6 Operating System as a Hypervisor. I am going to explain you the later part that is adding RHEL6.1 Host as an Hypervisor and will cover setting up Bare metal RHEV-H Deployment in a Separate Blog.

Adding RHEL6 Host

Install Minimal  Base RHEL6.1 X86_64 Bit  on a VT Enabled Hardware.

Ensure host name under /etc/hosts  and /etc/resolv.conf  set up properly and both forward and lookup works from this host with out any errors.
Set selinux in enforcing mode. Check it by using the below command and you should get "Enforcing" as output.

#getenforce
   Enforcing

 If selinux shows disbaled open the file /etc/selinux/config  and change SELINUX=disabled to SELINUX=Enforcing
   
Register it to RHN
#rhn_register
Subscribe to rhel-x86_64-rhev-mgmt-agent-6-beta

# rhn-channel --add --channel=rhel-x86_64-rhev-mgmt-agent-6-beta

Run the below command and Verify the Host is subscibed to appropriate channels.

# yum repolist

Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
repo id repo name status
rhel-x86_64-rhev-mgmt-agent-6-beta Red Hat Enterprise Virt Management Agent Beta (v 6 x86_64) 0
rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64) 0
repolist: 0
#

Open Required Firewall ports by putting below in simple bash script and execute so that it will set required firewall rules
 
#sh /root/set-iptables.sh 

#cat  /root/set-iptables.sh 
#!/bin/sh
iptables-save > /opt/iptables-default.txt
iptables -F
iptables --append INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables --append INPUT -p icmp -j ACCEPT
iptables --append INPUT -i lo -j ACCEPT
iptables --append INPUT -p tcp --dport 22 -j ACCEPT
iptables --append INPUT -p tcp --dport 16514 -j ACCEPT
iptables --append INPUT -p tcp --dport 54321 -j ACCEPT
iptables --append INPUT -p tcp -m multiport --dports 5634:6166 -j ACCEPT
iptables --append INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT
iptables --append INPUT -j REJECT --reject-with icmp-host-prohibited
iptables --append FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited
/etc/init.d/iptables save
chkconfig iptables on
chkconfig ip6tables off
chkconfig --list iptables
chkconfig --list ip6tables
[root@hyp2-dl580g5 network-scripts]


Next configure sudo to enable root to execute all commands since RHEVM make use of sudo to perform operation of virtualization host

Edit /etc/sudoers and append the below two lines at the bottom

sudoedit /etc/sudoers

# Allow root to run any commands anywhere

root ALL=(ALL) ALL

Make sure ssh is enabled for root
 
 Reboot and Verify all your settings are persist up on reboot and if so Now your Host is Ready to Add in to the RHEV.
 
Please Refer below Link for  setting up of Data Centre, Cluster, Adding Host, Creating Virtual Machines,Snapshots, Templates and User and other advanced stuffs on my  following  Part 3  Series of RHEV Cookbook.

No comments: