Tuesday, March 20, 2018

Enable SSH based authentication in Tortoise Git Client and BitBucket

This post will give you overview of how you can enable SSH based authentication on your Tortoise Git Client application and clone repository locally using SSH URL.

Below applications are required.
1) Tortoise Git Client
2) PuTTYgen
3) Pageant(Putty Authentication Agent)

Below are the steps to configuration:

1) Open PuTTYgen to generate keys for SSH.

2) Drag mouse pointer into blank area to create randomness in your key.

3) Save Private and Public both keys into your local file system.

4) Copy Public key from PuTTYgen UI.
--------------------------------------------------
BitBucket Settings
--------------------------------------------------
5) Open BitBucket server UI and login using your credentials.


6) Go to User -> Manage Account -> SSH Keys.

7) Click on "Add Key" and paste copied public key into text box.

8) Click on "Add Key" button to save key on server.

------------------------------------------------
Pageant Settings
------------------------------------------------
9) Open Pageant application ( Its location is in Tortoise Git/bin folder)

10) Click Add Key button to add private key to Pageant.

You are all set to run Tortoise Git Client to clone any repository from Bit Bucket server.

To Clone Repository:
1) Login to BitBucket UI and select repository to clone.
2) Click clone button on left side menu to copy SSH URL for repository.

3) Open you file system location where you want to clone repository.
4) Right click and select
5) Paste repository URL in URL field.(This usually get populated if you copied it in your clipboard)
6) Select private key you have save in above steps and click OK button to start cloning process.
7) It will show progress information and success message in next screen.


Wednesday, February 28, 2018

Enable partition and OLAP feature in oracle through silent installer

I have been working on enabling partition on oracle which is getting installed using silent installation. This post will give you basic idea about how to install oracle in silent mode.

In my case I was using below command for silent installation of oracle.

Command:

setup.exe -silent -showProgress -force -nontw32FoldersActions -waitforcompletion FROM_LOCATION=ORACLE_INSTALLER_PATH\\database\\stage\\products.xml ORACLE_HOME=ORACLE_HOME_PATH ORACLE_HOME_NAME=CDBORCL INSTALL_TYPE=SE -responseFile RESPONSE_FILE_PATH\\db.rsp

Parameters:

-silent : Tells installer to run in silent mode and does not invoke UI.
-showProgress : It will show progress on command prompt when installation is running. You can see what is being installed. If you don't give this option it will just install without any indication to user.
-force : No idea
-nontw32FoldersActions : No idea
-waitforcompletion : It will hold parent process which has started this installation. i.e. if you are installing oracle as part of some other application installation then main application installation will hold until oracle gets installed.
FROM_LOCATION : Location where installer can find product.xml. This file contains information about various installation type and features to be enabled in those installation types.
ORACLE_HOME : Location where you want to install oracle. Mostly its c:\oracle12c\CDBORCL_home.
ORACLE_HOME_NAME : Usually container database name. i.e. CDBORCL
INSTALL_TYPE : Installation type. It can be EE, SE, PE and Custom. Feature enable/disable depends on installation type. like partition and OLAP is not enabled on SE while its enabled on EE.  Do not confuse it will oracle edition like enterprise or standard. 
-responseFileResponse file which contains all input user gives when we run OUI(Oracle Universal Installer) through UI. You can get some sample response files under ORACLE_INSTALLER_PATH\database\response folder so you can fill values in it and use.

Values to Replace:

You need to replace all italic names with respective values for your installation.
i.e.
ORACLE_INSTALLER_PATH = Where your oracle installer folder is. Oracle installation usually consist two zip files so you need to extract both in single folder before you proceed.
ORACLE_HOME_PATH = Where you want to install your oracle on system. like c:\oracle12c\CDBORCL_home

RESPONSE_FILE_PATH = Response file location.


In my case issue was INSTALL_TYPE as highlighted on above command. Its SE so oracle will install standard installation which does not enable features like partition and OLAP. If you want to enable these feature you need to give INSTALL_TYPE=EE which will enable typical installation type and enables partitioning with other features like OLAP, Advanced Analytics, Real Application Testing.

Please give your feedback so I can improve this post based on that.

Wednesday, August 31, 2016

Migrate existing messages from HornetQ to ActiveMQ

We have recently migrated from JBoss EAP to Wildfly and we are using HornetQ in EAP. As wildfly has ActiveMQ, we needed to migrate from HornetQ to ActiveMQ. I have struggled for few days on how to migrate existing messages from HornetQ to ActiveMQ, so I thought it will be good idea to share it will everyone who are facing same situation.

Follow below steps to export existing messages from HornetQ journal.
  1. Copy below jar files from JBOSS_HOME\modules\system\layers\base\org\hornetq\main to any folder. i.e. D:\ExportUtility
  •   hornetq-server-2.3.0.CR1.jar;
  •   hornetq-core-client-2.3.0.CR1.jar;
  •   hornetq-commons-2.3.0.CR1.jar;
  •   hornetq-journal-2.3.0.CR1.jar;
  •   hornetq-jms-client-2.3.0.CR1.jar;
  •   hornetq-jms-server-2.3.0.CR1;
2. Copy below jars from JBOSS_HOME\modules\system\layers\base\org\jboss\logging\main and netty\main.
  •   jboss-logging-3.3.0.Final.jar;
  •   netty-3.2.0.Final.jar
3.    Create D:\ExportUtility\ExportMessages.bat.

4.    Edit ExportMessages.bat file and paste below content into it and save.
java -cp ./hornetq-server-2.3.0.CR1.jar;./hornetq-core-client-2.3.0.CR1.jar;./hornetq-commons-2.3.0.CR1.jar;./hornetq-journal-2.3.0.CR1.jar;./hornetq-jms-client-2.3.0.CR1.jar;./hornetq-jms-server-2.3.0.CR1;./jboss-logging-3.3.0.Final.jar;./netty-3.2.0.Final.jar; org.hornetq.core.persistence.impl.journal.XmlDataExporter E:\Product\Hornetq\bindings E:\Product\Hornetq\journal null E:\Product\Hornetq\large-messages > journal-export.xml

5.    Highlighted above are HornetQ bindings, journals, paging and large messages folders respectively.
Before executing this step make sure your Queue in HornetQ contains any message otherwise you will not be able to verify if it is really imported into ActiveMQ or not.

6.    Execute ExportMessages.bat file.

7.    It will create journal-export.xml file in same folder with all Queue and its messages detail in that.

8.    Run wildfly server and open command prompt at wildfly_home/bin.

9.    Run jboss-cli.bat –gui

10.    Above command will open GUI for jboss command line interface.

11.    There will be cmd> textbox in upper part of that UI.

12.    Paste below command into that text box and press “Submit” button beside.
/subsystem=messaging-activemq/server=default:import-journal(file= D:\\ExportUtility\\journal-export.xml)

13.    It will below message on output tab below.
/subsystem=messaging-activemq/server=default:import-journal(file= D:\\ExportUtility\\journal-export.xml)
{"outcome" => "success"}

14.    If it fails due to any reason then it will failure message as below.
/subsystem=messaging-activemq/server=default:import-journal(file=C:\\Users\\bodap\\Desktop\\journal-export.xml)
{
    "outcome" => "failed",
    "failure-description" => "java.lang.String cannot be cast to java.lang.Number",
    "rolled-back" => true
}

15.    To verify if your message is got imported into ActiveMQ, please visit admin console (http://localhost:9990/console) of Wildfly and check if given Queue contains messages you imported.

Let me know your feedback and suggestions so I can improve it will additional information.