Saturday, 18 October 2014

Ignite Open fire Plugin

Open fire version :- Openfire 3.9.3
Maven version :- Maven-2.0.10

Download the Maven Openfire Plugin master branch from this link

Go to the Maven Openfire Plugin folder and execute the below command.
 mvn clean install
To write Ignite Openfire plugin we need openfire.jar. To get the openfire.jar go to the open fire server’s lib folder and copy it into the local folder.

Now add the openfire.jar into the maven local repository using below command. I downloaded the openfire.jar into the F folder and my open fire version is 3.9.3.
mvn install:install-file -DgroupId=org.igniterealtime.openfire -DartifactId=openfire -Dversion=3.9.3 -Dpackaging=jar -DgeneratePom=true -Dfile=F:\openfire.jar

Maven project structure and sample application will be avialable in below link.

After downloading the OpenfireSamplePlugin go to the root folder of OpenfireSamplePlugin and execute the below command.                                             
                        mvn clean install

This command will create the target folder with OpenfireSamplePlugin-0.0.1-SNAPSHOT.jar.

Now go to the open fire server management portal and upload the jar file.

NOTE:- If we got error like below please check the maven project structure. If we add webapp folder under src/main the error will be gone.
Failed to execute goal com.reucon.maven.plugins:maven-openfire-plugin:1.0.2-SNAPSHOT:jspc (default-jspc) on project OpenfireSamplePlugin: Failure processing jsps

Monday, 21 July 2014

Azure Configure Software RAID on Linux

Following are the steps to create RAID 5 Array on Ubuntu 12.04 LTS machine.

          è  Attach 5 hard disks each one with 500 GB.

 è Partition all hard disks.

 è Install the mdadm using the below command.
             apt-get install mdadm

 è Create the RAID 5 array using below command.
             mdadm --create /dev/md127 --level=5 --raid-devices=5 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1                     /dev/sdg1

 è Partition the RAID 5 array /dev/md127 and we get the /dev/md127p1 partition.

 è Format using the ext4 file system.
             mkfs –t ext4 /dev/md127p1

 è Add the configuration to mdadm.conf
             mdadm --detail --scan >> /etc/mdadm/mdadm.conf
             Edit the mdadm.conf file to contain only the device name and UUID like below.
             ARRAY /dev/md127 UUID=*********

 è You need to update initramfs so it contains your mdadm.conf settings during boot.
             sudo update-initramfs –u

 è Get the UUID of RAID 5 partition to add entry in fstab. Execute the below command to get UUID.
             sudo /sbin/blkid
             Copy the UUID of /dev/md127p1

 è Add the entry in fstab like below.
             UUID=****  /mountpoint      ext4       defaults, nobootwait     0              2

 è Change the bootdegraded value to true in below file.

 è Add the bootdegraded=true property in GRUB_CMDLINE_LINUX_DEFAULT like below in               /etc/default/grub file.
            GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 earlyprintk=ttyS0                           rootdelay=300 bootdegraded=true"

 è After updating the above file execute the below command.
            sudo update-grub

 è Check the mount configuration using below command.
           mount -a

Friday, 4 April 2014


Code for user Authentication using CAS REST API in java.

Download from here


Using Jasig CAS REST API we can authenticate user without CAS login form.

CAS Version:- cas-server-3.5.2-release

Required libraries :-
cas.server.core 3.5.1
spring-beans ${spring.version}


Open the web.xml file of CAS and add the below servlet configuration.

cas.server.core 3.5.1
spring-beans ${spring.version}



Now we can authenticate the user using CAS REST API.

Friday, 31 January 2014

Remote Desktop Windows Azure OpenSUSE VM

Based on your openSUSE version select the xrdp. For different versions refer the below link

1. Open the 3389 port from Windows Azure portal.

Install gnome using below command.

2. sudo zypper install gnome-session

3. Now go to the /etc/sysconfig/displaymanger and change the DISPLAYMANAGER property to "gdm"

4. Reboot the VM from Windows Azure portal.

5. Now take the remote desktop and select the GNOME session type.