How to Set up FTS on Linux
Total Page:16
File Type:pdf, Size:1020Kb
How to set up FTS on Linux
Step 1 - Creating the files
1 - Entity-masterdb-userdb.txt
2 - Solr-masterdb-userdb.xml
3 - CQ-masterdb-userdb.xml
Navigate to /opt/rational/clearquest
- all of the following commands for this step can be executed from this directory
From a terminal at this location run the following commands in this order:
(1) --Command to create Entity-masterdb-userdb.txt
- masterdb is the name of the master database
- userdb is the name of the user database
- this is case sensitive – check your database definition, user, password if receiving login errors
- if cqperl, cqtsettup.pl cannot be found – check current directory bin/cqperl cqtssetup.pl –s masterdb -d userdb -u user -p password -o Entity example: masterdb = Ozma userdb = ozuse user = admin password = “” (none)
[root@localhost clearquest]# bin/cqperl cqtssetup.pl -s Ozma -d ozuse -u admin -p "" -o Entity DBSet : Ozma DBName : ozuse User : admin Pwd : ******** Output : Entity File : Info : Writing to: ./Entity-Ozma-ozuse.txt Processing : UseCase [total: 0] Processing : TMTestPlan [total: 0] Processing : Email_Rule [total: 0] Processing : TMExternalFile [total: 0] Processing : TestLog [total: 0] Processing : CustomerTestCase [total: 0] Processing : Defect [total: 1] Processing : SoftwareCategory [total: 0] Processing : TMTestLog [total: 0] Processing : TMConfiguration [total: 0] Processing : BusinessUseCase [total: 0] Processing : Component [total: 0] Processing : BUCUCOrder [total: 0] Processing : Customer [total: 0] Processing : TMComputerGroup [total: 0] Processing : TMComputer [total: 0] Processing : TMSuiteLog [total: 0] Processing : TMIteration [total: 0] Processing : BTBuild [total: 0] Processing : TMTestType [total: 0] Processing : TMConfigurationAttribute [total: 0] Processing : Object [total: 0] Processing : Request [total: 0] Processing : TMConfiguredTestCase [total: 0] Processing : ConfiguredTestCase [total: 0] Processing : ActionAccessControl [total: 0] Processing : TMAssetRegistry [total: 0] Processing : ToDo [total: 0] Processing : TMTestSuite [total: 0] Processing : TMTestCase [total: 0] Processing : Subcomponent [total: 0] Processing : TMConfigurationValue [total: 0] Processing : TMFileLocation [total: 0] Processing : TestCase [total: 0] Info : Total Records 1 Info : Wrote to: ./Entity-Ozma-ozuse.txt Status : Completed
- This will create Entity-masterdb-userdb.txt in your current directory(clearquest)
(2) --Command to create Solr-masterdb-userdb.xml bin/cqperl cqtssetup.pl –s masterdb -d userdb -u user -p password -o Solr –f Entity- masterdb-userdb.txt – (file created from first step) example:
[root@localhost clearquest]# bin/cqperl cqtssetup.pl -s Ozma -d ozuse -u admin -p "" -o Solr -f Entity-Ozma-ozuse.txt DBSet : Ozma DBName : ozuse User : admin Pwd : ******** Output : Solr File : Entity-Ozma-ozuse.txt Info : Writing to: ./Solr-Ozma-ozuse.xml Processing : UseCase [total: 0] Processing : TMTestPlan [total: 0] Processing : Email_Rule [total: 0] Processing : TMExternalFile [total: 0] Processing : TestLog [total: 0] Processing : CustomerTestCase [total: 0] Processing : Defect [total: 1] Processing : SoftwareCategory [total: 0] Processing : TMTestLog [total: 0] Processing : TMConfiguration [total: 0] Processing : BusinessUseCase [total: 0] Processing : Component [total: 0] Processing : BUCUCOrder [total: 0] Processing : Customer [total: 0] Processing : TMComputerGroup [total: 0] Processing : TMComputer [total: 0] Processing : TMSuiteLog [total: 0] Processing : TMIteration [total: 0] Processing : BTBuild [total: 0] Processing : TMTestType [total: 0] Processing : TMConfigurationAttribute [total: 0] Processing : Object [total: 0] Processing : Request [total: 0] Processing : TMConfiguredTestCase [total: 0] Processing : ConfiguredTestCase [total: 0] Processing : ActionAccessControl [total: 0] Processing : TMAssetRegistry [total: 0] Processing : ToDo [total: 0] Processing : TMTestSuite [total: 0] Processing : TMTestCase [total: 0] Processing : Subcomponent [total: 0] Processing : TMConfigurationValue [total: 0] Processing : TMFileLocation [total: 0] Processing : TestCase [total: 0] Info : Total Records 1 Info : Wrote to: ./Solr-Ozma-ozuse.xml Status : Completed [root@localhost clearquest]#
- This will create Solr-masterdb-userdb.xml in your current directory (clearquest)
(3) --Command to create CQ-masterdb-userdb.xml bin/cqperl cqtssetup.pl –s masterdb -d userdb -u user -p password -o CQ –f Entity- masterdb-userdb.txt example:
[root@localhost clearquest]# bin/cqperl cqtssetup.pl -s Ozma -d ozuse -u admin -p "" -o CQ -f Entity-Ozma-ozuse.txt DBSet : Ozma DBName : ozuse User : admin Pwd : ******** Output : CQ File : Entity-Ozma-ozuse.txt Info : Writing to: ./CQ-Ozma-ozuse.xml Processing : UseCase [total: 0] Processing : TMTestPlan [total: 0] Processing : Email_Rule [total: 0] Processing : TMExternalFile [total: 0] Processing : TestLog [total: 0] Processing : CustomerTestCase [total: 0] Processing : Defect [total: 1] Processing : SoftwareCategory [total: 0] Processing : TMTestLog [total: 0] Processing : TMConfiguration [total: 0] Processing : BusinessUseCase [total: 0] Processing : Component [total: 0] Processing : BUCUCOrder [total: 0] Processing : Customer [total: 0] Processing : TMComputerGroup [total: 0] Processing : TMComputer [total: 0] Processing : TMSuiteLog [total: 0] Processing : TMIteration [total: 0] Processing : BTBuild [total: 0] Processing : TMTestType [total: 0] Processing : TMConfigurationAttribute [total: 0] Processing : Object [total: 0] Processing : Request [total: 0] Processing : TMConfiguredTestCase [total: 0] Processing : ConfiguredTestCase [total: 0] Processing : ActionAccessControl [total: 0] Processing : TMAssetRegistry [total: 0] Processing : ToDo [total: 0] Processing : TMTestSuite [total: 0] Processing : TMTestCase [total: 0] Processing : Subcomponent [total: 0] Processing : TMConfigurationValue [total: 0] Processing : TMFileLocation [total: 0] Processing : TestCase [total: 0] Info : Total Records 1 Info : Wrote to: ./CQ-Ozma-ozuse.xml Status : Completed
– This will create CQ-masterdb-userdb.xml in your current directory (clearquest)
(4) – encrypting the administrator password
**note-this step is not required if admin password is blank** bin/cqperl cqtsdbcrawler.pl –encrypt –s masterdb -d userdb -u user -p password –kf key.txt -pf password.txt example:
[root@localhost clearquest]# bin/cqperl cqtsdbcrawler.pl -encrypt -s Ozma -d ozuse -u admin -p pass2encrypt -kf key.txt -pf password.txt
- This will create the two files key.txt and password.txt in your current directory
Step 2 – setting up the CQ.Solr directory
- In /opt/rational/clearquest there is a directory called CQ.Solr.
- Copy this directory and paste it into the file system root (/)
- In CQ.Solr you will see a folder SAMPL
o Rename this to the userdb
- Copy the files you have created in Step 1 into /CQ.Solr/userdb/Solr/
- Go to the directory opt\rational\common\eWAS\bin
- Run the following command to set the Solr path:
./wsadmin.sh –conntype NONE –lang jython –f setSolrHome.py –interactive:yes /CQ.Solr/userdb/Solr/solr
**when asked to modify, choose no** Example:
[root@localhost bin]# ./wsadmin.sh -conntype NONE -lang jython -f setSolrHome.py -interactive:yes /CQ.Solr/ozuse/Solr/solr/
WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode. WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-interactive:yes, /CQ.Solr/ozuse/Solr/solr/]"
This script change 'genericJvmArguments' to set 'solr.solr.home'
Current setting for 'genericJvmArguments' is: -Dsolr.solr.home=/CQ.Solr/ozuse/Solr/ New setting for 'genericJvmArguments' is: -Dsolr.solr.home=/CQ.Solr/ozuse/Solr/solr/ Do you want to modify it? (y/n): n
'genericJvmArguments' was changed to: -Dsolr.solr.home=/CQ.Solr/ozuse/Solr/solr/
The 'cqsearchprofile' MUST be restarted for this change to take effect.
- You can test if the Solr directory has been set up correctly by doing the following: o Restart the eWAS service under System->Administration->Server Settings->Services o Go to the website http:// server /solr/admin/index.jsp . server = name of web server: if performing this operation on the server = http://localhost/solr/admin/index.jsp . If this page does not load, check the ./wsadmin.sh command, especially the path specified for the CQ.Solr directory. Verify this with the actual location of the CQ.Solr folder.
Step 3 – File modifications
(1) – updating the schema.xml file
- Open these two files in the text editor:
o \CQ.Solr\userdb\Solr\solr\conf\schema.xml
o \CQ.Solr\userdb\Solr\Solr-masterdb-userdb.xml
- In schema.xml, replace - Copy all text between the - Copy all text beginning with - Save and close schema.xml (no modifications need to be made to Solr-masterdb- userdb.xml, so this can just be closed) - To check for errors, you can open the schema.xml in a browser. If the contents display correctly then the xml formatting is correct. If you receive errors, such as for tags, you may have overwritten a tag or made a mistake elsewhere. (2) -- updating the CQ-masterdb-userdb.xml - open \CQ.Solr\userdb\Solr\CQ-masterdb-userdb.xml in a text editor - For each record type in your schema, you will see a - “0” means the field will not be displayed. - At least one - Once this is done for each ** this next adjustment only needs to be done if the password has been encrypted** - At the beginning of the file, locate the - Open \CQ.Solr\userdb\Solr\password.txt in the text editor and copy the encrypted password, including the == signs, and paste it into the password field of the - Specify the path of the key.txt file in keyfile property: keyfile=”\CQ.Solr\userdb\Solr\key.txt" - Save and close CQ-masterdb-userdb.xml - This file can be checked for errors as well by opening in a browser. If page displays correctly then the .xml formatting is correct. Step 3: Enabling the Full Text Search radio button. **This must be done on a Windows operating system** - Copy the CQ-masterdb-userdb.xml file to the C:\ > directory - Run the following command: C:\>installutil setmasterpropertyfromfile connection_name –user_db_name userdb user password TEXT_SEARCH_PROPERTY C:\ >CQ-masterdb-userdb.xml - connection_name = name of masterdb connection as defined in the maintenance tool. - password – if blank, use “” - if all goes well, utility will return an exit code of 0 Step 4: Indexing records for search. - navigate to the /opt/rational/clearquest directory - run the following command: bin/cqperl cqtsdbcrawler.pl –batch /CQ.Solr/userdb/Solr/ CQ-masterdb-userdb.xml example: [root@localhost clearquest]# bin/cqperl cqtsdbcrawler.pl -batch /CQ.Solr/ozuse/Solr/CQ-Ozma-ozuse.xml tzmappings: Illegal format at near line 11. Mar 20, 2009 1:41:11 PM com.ibm.rational.clearquest.cqtscrawler.common.ExtractionConfig logConfig … -skipped lines which display checking multiple record types for indexing records- Mar 20, 2009 1:41:13 PM com.ibm.rational.clearquest.cqtscrawler.batch.BatchController extractData INFO: cqtsdbcrawer finished at Fri Mar 20 13:41:13 GMT+01:00 2009 [root@localhost clearquest]# *** errors at this point will indicate a number of issues. If the indexing does not complete, check the schema.xml file for errors, and the password and key file fields of the CQ-masterdb-userdb.xml file. Be sure that these are correct.*** Optional: Setting the indexing service to start at boot sequence: Navigate to the following path: opt/rational/common/CM/profiles/cqsearchprofile/config/cells/localhostCQSearchProfile Node01Cell/applications/cqtsdbcrawler.ear/deployments/cqtsdbcrawler/cqtsdbcrawler.wa r/WEB-INF/ - open web.xml in a text editor and uncomment o Once these steps have been completed, Restart the eWAS service under System->Administration->Server Settings->Services