Web Interface to manage Gluster Nodes

Ovirt is an open source tool used to create/manage gluster nodes through an easy to use web interface.

This document is to cover how gluster can be used with ovirt.

Want to manage gluster nodes with ease using ovirt ?  Create your own ovirt by following these simple steps.

Machine Requirements :

  • Fedora19  with 4GB of memory(minimum) and 20GB of hard disk space.
  • Recomended Browsers:
  • Mozilla Firefox 17
  • IE9  and above for the web admin portal.

Installation steps:

  •  Download and install fedora19 ISO.
  • Add the official ovirt repository for fedora yum localinstall http://resources.ovirt.org/releases/ovirt-release.noarch.rpm” 
  •  Install ovirt-engine by running the command  “yum install -y ovirt-engine.”
  • Once the installation is completed, run the command to set up ovirt with gluster, “engine-setup”

Once you run the above command, user will be prompted with the below questions . Provide the answer as follow.

The installer will take you through a series of interactive questions as listed in the following example. If you do not enter a value when prompted, the installer uses the default settings which are stated in [ ] brackets.

The default ports 80 and 443 must be available to access the manager on HTTP and HTTPS respectively.

[ INFO ] Stage: Initializing
[ INFO ] Stage: Environment setup
Configuration files: [‘/etc/ovirt-engine-setup.conf.d/10-packaging.conf’]
Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140411224650.log
Version: otopi-1.2.0 (otopi-1.2.0-1.fc19)
[ INFO ] Stage: Environment packages setup
[ INFO ] Yum Status: Downloading Packages
[ INFO ] Yum Download/Verify: iproute-3.12.0-2.fc19.x86_64
[ INFO ] Yum Status: Check Package Signatures
[ INFO ] Yum Status: Running Test Transaction
[ INFO ] Yum Status: Running Transaction
[ INFO ] Yum update: 1/2: iproute-3.12.0-2.fc19.x86_64
[ INFO ] Yum updated: 2/2: iproute
[ INFO ] Yum Verify: 1/2: iproute.x86_64 0:3.12.0-2.fc19 – u
[ INFO ] Yum Verify: 2/2: iproute.x86_64 0:3.9.0-1.fc19 – ud
[ INFO ] Stage: Programs detection
[ INFO ] Stage: Environment setup
[ INFO ] Stage: Environment customization

–== PRODUCT OPTIONS ==–

–== PACKAGES ==–

[ INFO ] Checking for product updates…
[ INFO ] No product updates found

–== NETWORK CONFIGURATION ==–

Host fully qualified DNS name of this server [localhost.localdomain]:  [ Give the FQDN  / locally resolvable host]

If user does not provide a FQDN, setup will result in the following warning.

[WARNING] Failed to resolve localhost.localdomain using DNS, it can be resolved only locally
Setup can automatically configure the firewall on this system.
Note: automatic configuration of the firewall may overwrite current settings.

Do you want Setup to configure the firewall? (Yes, No) [Yes] : Yes

[ INFO ] firewalld will be configured as firewall manager.

–== DATABASE CONFIGURATION ==–

Where is the Engine database located? (Local, Remote) [Local]: Local

Setup can configure the local postgresql server automatically for the engine to run. This may conflict with existing applications.
Would you like Setup to automatically configure postgresql and create Engine database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic

–== OVIRT ENGINE CONFIGURATION ==–

Application mode (Both, Virt, Gluster) [Both]: Gluster (The input being provided here is Gluster, as we are interested only to monitor gluster nodes).

Engine admin password:  [provide a password, which would be used to login]
Confirm engine admin password: [confirm the password]

If the password provided is too short, setup results in an warning as below.

[WARNING] Password is weak: it is based on a dictionary word
Use weak password? (Yes, No) [No]: [provide yes, if you want to use the short password]

–== PKI CONFIGURATION ==–

Organization name for certificate [localdomain]: ABCD

–== APACHE CONFIGURATION ==–

Setup can configure apache to use SSL using a certificate issued from the internal CA.
Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]: [Automatic]

Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.
Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]: Yes

–== SYSTEM CONFIGURATION ==–

Configure WebSocket Proxy on this machine? (Yes, No) [Yes]: [No]

[ INFO ] NFS configuration skipped with application mode Gluster

–== MISC CONFIGURATION ==–

–== END OF CONFIGURATION ==–

[ INFO ] Stage: Setup validation
[WARNING] Cannot validate host name settings, reason: resolved host does not match any of the local addresses
[WARNING] Less than 16384MB of memory is available

If system has less than 16B of memory , setup would display above warning. (since this is the maximum recomended)

–== CONFIGURATION PREVIEW ==–

Engine database name : engine
Engine database secured connection : False
Engine database host : localhost
Engine database user name : engine
Engine database host name validation : False
Engine database port : 5432
PKI organization : ABCD
Application mode : gluster
Firewall manager : firewalld
Update Firewall : True
Configure WebSocket Proxy : True
Host FQDN : localhost.localdomain
Configure local Engine database : True
Set application as default page : True
Configure Apache SSL : True

Please confirm installation settings (OK, Cancel) [OK]:

The installation commences. The following message displays, indicating that the installation was successful.

[ INFO ] Stage: Transaction setup
[ INFO ] Stopping engine service
[ INFO ] Stopping websocket-proxy service
[ INFO ] Stage: Misc configuration
[ INFO ] Stage: Package installation
[ INFO ] Stage: Misc configuration
[ INFO ] Creating PostgreSQL ‘engine’ database
[ INFO ] Configuring PostgreSQL
[ INFO ] Creating Engine database schema
[ INFO ] Creating CA
[ INFO ] Configuring WebSocket Proxy
[ INFO ] Generating post install configuration file ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf’
[ INFO ] Stage: Transaction commit
[ INFO ] Stage: Closing up

–== SUMMARY ==–

SSH fingerprint: <SSH_FINGERPRINT>
Internal CA: <CA_FINGERPRINT>
Web access is enabled at:
http://example.ovirt.org:80/ovirt-engine
https://example.ovirt.org:443/ovirt-engine
Please use the user “admin” and password specified in order to login into oVirt Engine

–== END OF SUMMARY ==–

[ INFO ] Starting engine service
[ INFO ] Restarting httpd
[ INFO ] Restarting nfs services
[ INFO ] Generating answer file ‘/var/lib/ovirt-engine/setup/answers/20140310163837-setup.conf’
[ INFO ] Stage: Clean up
Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20140310163604.log
[ INFO ] Stage: Pre-termination
[ INFO ] Stage: Termination
[ INFO ] Execution of setup completed successfully

`Installation completed successfully`

Great!! you are almost there.

Now browse through the following URL “https://<ip>/ovirt-engine&#8221; , provide the user name as admin and password is the one which you gave in the setup.

Add your gluster nodes to the console and enjoy features like adding new/ improting existing cluster, creating/deleting volumes, adding/deleting bricks, set/reset volume options, optimize volume for virt store, Rebalance , remove brick features.

Another fantastic way to manage your Gluster nodes through UI

Not interested to peform all the above steps and just wanna do the actions mentioned above, do the following steps?

Is it possible? Yes, why not? Go through the steps below.

1) Install docker on your machine by performing the step “yum install -y docker”

2) Now start running docker by running the command “systemctl start docker”

3) Search for the image by running the command “docker search kasturidocker/centos_ovirt_3.5”

4) Just login to the above linux container by running the command “docker run -i -t  kasturidocker/centos_ovirt_3.5 /bin/bash”

Done, that is it.

5) Check if ovirt-engine is running , by running the command “service ovirt-engine status”, if not start it.

6) Get ip of the system and browse through the URL “http://<ip>/ovirt-enigine&#8221;.

Your web console is ready just in 6 steps, start adding gluster nodes and manage it.

 

Advertisements

Ovirt + Docker

A small blog on how to put Ovirt inside a docker.

Install docker on your system.

Get an account in docker.

pull a base image from docker which ovirt supports. For example : Fedora and centos.

Let us install ovirt on centos, by pulling centos base image from docker.

Instructions to follow:

docker run -i -t centos /bin/bash – user will be logged into the bash prompt of centos machine.

Now install all the packages which ovirt requires on top of centos base image.

As a first step, add the official ovirt repository by running the command “yum localinstall http://resources.ovirt.org/releases/ovirt-release.noarch.rpm&#8221;

Add / enable the epel repo by running the command “rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm”

Install ovirt-engine by running the command “yum install -y ovirt-engine”

Before running the engine-setup, make sure /etc/sysconfig/network is present with the following contents

NETWORKING=yes
HOSTNAME=localhost.localdomain

With out the above, postgresql will not start and data base would not be created.

Run the engine-setup command , and when prompted with a question, “Do you wish to setup firewall as IPtables?” Input the answer as “No”, otherwise execution fail.

Once engine setup is done, browse through the URL “https://<ip>/ovirt-engine&#8221;.

Pushing Image back to docker central repository

To push the repository, user need to peform the below repository.

Exit from the centos with ovirt installed base image .

Run the command to commit the image which has been created recently “docker commit <commitid>  <docker_username>/<give the name for your image>”

Now push the docker image to the central repository so that others can make use of that by running the command “docker push <docker_username>/<name of newly created user>

That is it !!! Now newly created image that is centos + ovirt is pushed to the central repository.

You can verify the same by searching for the image pushed . Run the command “docker search <newly created docker image>”

There you go, in the result set returned you should see an image pushed by you.