Saturday, September 24, 2016

Configuring WSO2 ESB 4.8.1 with a Free NAS Server for file sharing ( Using SMB/CIFS Protocol ) - PART - 1

This article shows how to configure ESB and the Free NAS Server for file processing.
Free NAS is a open source storage operating system. For more information on Free NAS please refer http://www.freenas.org/

Setting Up Free NAS Server


Free NAS is operating system, so we need a Virtual Box to install the operating system. Here I'm using oracle virtual box. You can download it from https://www.virtualbox.org/.


To download the free NAS Server use the below link. Here I'm using current stable release of FreeNAS (9.10). 

Follow the below screens to install free NAS operating system in Oracle Virtual Box. Select Type as BSD and Version FreeBSD( 64-bit ).




Now double click on the created virtual disk and install the operating system. Follow the screens below.

When double click on the server, if you get any error like below. Execute the command provided.


ajanthan@ajanthan-ThinkPad-T440p:~$ sudo /sbin/rcvboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.
ajanthan@ajanthan-ThinkPad-T440p:~$ 










Do a restart and remove the .iso file which we loaded into the storage.




If we successfully installed operating system, we can see an output like below.


You can see here that the management console ip is as 10.0.2.15 and it's not in our primary os ip range, this will make problem when we try connect to management console from browser. To overcome this we modify the Network of the VM to Bridge Adapter as below after shutdown the NAS Server.



Now after start the VM, you can see now it matches our ip range and able to access the management console using 192.168.1.7. Refer the below screen shots.



Use username as "root" and password as "Which specified on setup".



Now we need to add a storage disk. When you go to Storage -> View Disks, there will be no disks available.



Now we need to add a disk to create volumes to store data. Shutdown the NAS Server and go back to Oracle Virtual Machine. Follow the below screens to create a new disk and added to the NAS Server virtual disk.






Select above 2GB storage for the hard disk.



Now we can view the disk.





That's it. We have successfully setup a NAS Server for our file storage. Now we need to configure the Storage to load files and need to configure WSO2 ESB to access and process those files. Please refer my next blog ( Configuring WSO2 ESB 4.8.1 with a Free NAS Server for file sharing ( Using SMB/CIFS Protocol ) - PART - 2 ).




Configuring BIG IP Load Balancer: Monitoring with WSO2 ESB - PART - 2

Licensing the BIG-IP

F5 provides a trial license to use it for 90-Days. Please follow the below steps to license the product we have downloaded.

Below is the license key, which we have requested when we download the product.



Use the Registration key and paste it in Base Registration Key section and change the activation method to "Manual".


Then click Next. 


Then in the above screen copy the "Dossier" section and click and open the F5 Licensing Server Web page. Paste the copied dossier in the below screen.




Then copy the above license key and paste it under the license in below screen.



After clicking continue will get the below page.


Above screen check whether Local Traffic is enabled and then click Next. It will move to the below page where you can provide a host name and change the account passwords. 


Click Next.


Click Finished. 


Now you have successfully licensed the product.

Configuring a Monitor for a WSO2 ESB Service Port

Before doing configuration at the BIG IP, setup a wso2 esb and host a service. Follow the below steps for it.

1) Download a ESB pack from wso2 website and up it in your local environment.
2) In our sample we are going to monitor the service port 8243. You can see already in ESB there is a echo service running on this port.

Now we can do the configuration at the BIG-IP side. Go to Local Traffic -> Pools and click "Create".





Here we have Selected Default TCP Monitoring option and added the Node with service port 8243.



We can see from the above screen, that our service at port 8243 is up and running. To check whether monitoring working fine, try to shutdown the ESB and check the same screen. You can observe the below.



 Confirming the TCP Handshake using Wireshark

 To confirm that the monitoring requests taking place between ESB 8243 port and the Monitoring system in BIG-IP, we can do a wireshark capture at the 192.168.1.1 router.

Below is the default tcp configuration at BIG-IP product. The monitoring calls will be taken place every 5 seconds interval.


We can confirm this using the below wireshark capture.



References


[1] https://www.youtube.com/watch?v=hxmCUnrC1bU




Configuring BIG IP Load Balancer: Monitoring with WSO2 ESB - PART - 1

This article shows how to configure the BIG IP Load balancer to monitor the services hosted in WSO2 ESB.

Setting up and Configuring BIG IP Load Balancer Monitoring


To simulate the BIG IP Load Balancer in our local environment. Here I'm using a VM provided by the BIG IP. This is a 90-Day Trial version and provided by F5 to simulate the BIG IP in local environment using a VM.

You can download it from here. https://www.f5.com/trial/big-ip-ltm-virtual-edition.php But need to register for a support account, before starting the download. When downloading download the BIGIP-11.3.0.39.0-scsi.ova from the below screen.


Then we need to download a VM player to host the VM downloaded from the BIG IP site. Here I'm using Vmware-Player-12.1.1-3770994.x86_64.bundle which is downloaded from


Installing the BIG IP VM into VM Player


Just start the VM player and follow the screen shots as below:









Use the default username and password.
Username: root
Password: default



This alert comes due to the vmware ethernet adapter don't have permission. You can get rid of this error alert by running the below command.

ajanthan@ajanthan-ThinkPad-T440p:~$ sudo chmod a+rw /dev/vmnet0


You can find more information on this link - https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=287

After successfully login to the VM, you will get the below screen.


Now we need to configure the IP addresses to access the load balancer from our primary operating system. Which help us to access the configuration page through our primary browser.

Type "config" in the command line and press enter. Which will go to the below screen.



When you press OK, it will move to the below screen.


When configuring it's better to use manual way, which help us to configure the IP which matches our primary OS IP range. As my range of primary OS is as below.



I'm doing the configuration as below:






To check whether our configuration is added successfully. Run the below command to check it.


Also you can use the list sys management-route to check the route.

Now use the management ip https://192.168.1.8 to log into management console.


Use default username and password as below:
Username: admin
Password: admin

After you successfully logged in, you will get the below screen.


You can find how to configure the monitoring and linking with WSO2 ESB in my PART - 2 of this blog.

References

[1] https://www.youtube.com/watch?v=4mRGF_nBht4
[2] https://www.youtube.com/watch?v=-3_UYZbJ7c4