Sunday, August 19, 2012

The Procedure to setup GIT HTTP SERVER on Windows

 

 

Procedure of setting up git http server

 

Assumptions: you already have git and a bared git repository installed on the server

 

1.       install apache http server

2.       open conf/httpd.conf

a.       find line "#Include conf/extra/httpd-vhosts.conf" and remove # mark from the begining of the line

3.  open conf/extra/http-vhosts.conf, input below lins

<VirtualHost *:80>

    ServerName your_server_name

    DocumentRoot "your git repository path"

</VirtualHost>

 

it looks like below after finish

<VirtualHost *:80>

    ServerName localhost

    DocumentRoot "G:/GIT/REMOTEHUB"

</VirtualHost>

 

4.       reopen conf/http.conf

a.       find below block

   <Directory />

    Options FollowSymLinks

    AllowOverride None

    Order deny,allow

    Deny from all

   </Directory>

  

b.       add lines below after

<Directory "your git repository path">

    #

    # Possible values for the Options directive are "None", "All",

    # or any combination of:

    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

    #

    # Note that "MultiViews" must be named *explicitly* --- "Options All"

    # doesn't give it to you.

    #

    # The Options directive is both complicated and important.  Please see

    # http://httpd.apache.org/docs/2.2/mod/core.html#options

    # for more information.

    #

    Options Indexes FollowSymLinks

 

    #

    # AllowOverride controls what directives may be placed in .htaccess files.

    # It can be "All", "None", or any combination of the keywords:

    #   Options FileInfo AuthConfig Limit

    #

    AllowOverride All

 

    #

    # Controls who can get stuff from this server.

    #

    Order allow,deny

    Allow from all

 

</Directory>

 

5.       cd to your git repository directory and run below command

   git update-server-info

 

6.       start apache http server

7.       then you can clone git repository using belown sytac

git clone http://server/git_repository_directory


Tuesday, February 22, 2011

Fix Error 1720 - Windows Installer Error

Fix Error 1720 - Windows Installer Error

The detail error message is :

Error 1720: There is a problem with this windows installer package. A script required for this install to complete could be run. Contact your support personnel or package vendor.

 

The ways to fix this issue:

a.      Install proper windows installer and try again.

b.      If a does not work, register dll and ocx as below

Regsvr32 wshom.ocx

Regsvr32 scrrun.dll

 

Tuesday, January 18, 2011

Mark-- What happened to IBM Rational Forum today?

Mark-- What happened to IBM Rational Forum today?

 

What happened to IBM Rational Forum today?  I posted a problem yesterday on ClearQuest forum and today found there is no thread in ClearQuest Forum at all. Many other forums have the same problem. Have a mark here. J

 

IBM Rational Forum

http://www.ibm.com/developerworks/forums/dw_rforums.jspa

 

IBM ClearQuest Forum

http://www.ibm.com/developerworks/forums/forum.jspa?forumID=329

 

IBM ClearCase Forum

http://www.ibm.com/developerworks/forums/forum.jspa?forumID=333

 

Friday, December 31, 2010

FW: ClearQuest Ldap Settings with Windows Active Directory

ClearQuest Ldap Settings with Windows Active Directory

 

In ClearQuest, it gives ldap option for user authentication. I have a try to setup the Windows AD as ldap server and enable integration between ClearQuest and Windows AD. Here are the summary of the setup.

 

a.       In windows 2003 or 2000 server, setup domain controller. After promoted  as domain controller,  the server plays the role of ldap server as well. You can check whether the ldap service is up or not by below commands,

Netstat –a | find “ldap”

If the service is up, it outputs that ldap port is listening.

 

b.      Download Ldap Admin Tool which acts as a ldap client to check the directory structure. It is a must to know this before you can successfully know its structure. For the Windows AD, the directory structure looks like,

DC=VM_TESTINGLAB  -- VM_TESTINGLAB is the domain name of windows AD

   CN=Users

        CN=Administrator   --the default administrator user name

        CN=Cert Publishers

        CN=cq_search       -- another domain user which will be used later as the search user to look up ldap entries.

        CN=Domain Admins   -- the default domain administrator group

        CN=Domain Computerrs  -- the computer list in the domain

       ……………..

       ……………..

 

c.       After we know the structure, we can enable the integration then by running below commands

installutil setauthenticationalgorithm db_set_name cq_admin_user cq_admin_user_pwd CQ_ONLY  -- this command is to set ClearQuest to use itself as a user authentication method.

 

installutil setldapinit db_set_name  cq_admin_user cq_admin_user_pwd  "-h ldap_server_name -p 339 -D cn=cq_search,cn=Users,dc= VM_TESTINGLAB  -w cq_search_password"   -- this command is to set ldap related information for ClearQuest like what is the ldap server name, which port is used by that ldap server, which user ClearQuest should use for ldap entries search, what is this user’s DN?.  In above command, the ldap server is ldap_server_name, port is 339 (default ldap port), cq_search is the user for ClearQuest to check the ldap entries. So this id must be added in windows AD and have ldap lookup privilege. According to the directory structure above, the user’s DN is cn=cq_search,cn=Users,dc= VM_TESTINGLAB.   Actually I do not know how to setup a user with ldap directory lookup privilege in a AD but just add this user as administrators group instead. A member in administrators group must have full access right to all resources.

 

installutil setldapsearch db_set_name  cq_admin_user admin_user_pwd   "-s sub -b dc=vm_ol (&(objectCategory=person)(sAMAccountName=%login%)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))"   -- this command is to set the search string for ClearQuest to lookup ldap user entries. –b specifies the base DN. In this case, it is dc=vm_ol. –s indicate ClearQuest to search the sub entries under vm_ol. (&(objectCategory=person)(sAMAccountName=%login%)(!(userAccountControl:1.2.840.113556.1.4.803:=2))) string is what the ClearQuest help document says, just follow it without any changes.

 

installutil setcqldapmap db_set_name  cq_admin_user admin_user_pwd   CQ_LOGIN_NAME sAMAccountName   -- this command is to set which user attribute to map to the ldap sAMAccountName (also a attribute of a AD user). CQ_LOGIN_NAME means to map the login to sAMAccountName. There are other options you can use like CQ_EMAIL, CQ_FULLNAME, CQ_LOGIN_NAME, CQ_MISC_INFO, or CQ_PHONE. For example, if  CQ_LOGIN_NAME is used, then input the login name to login ClearQuest. If CQ_EMAIL is used, then input the user mail address to login ClearQuest instead of login name. But  in this case, the email address must be same as the value of sAMAccountName in ldap side.

 

installutil validateldap db_set_name  cq_admin_user admin  a_ldap_user a_ldap_user_pwd   -- this command is to check if the setup is correct. I failed many times during my setup. It mainly caused by 2 issues. Firstly, the search user in setldapinit step must be created in AD and should have directory lookup privilege(just give this id a administrator role). Secondly, search string(filter) in setldapsearch is not setup correctly. Remember just put the top dn after –b.  

 

installutil setauthenticationalgorithm db_set_name  cq_admin_user admin CQ_FIRST  -- this command is to let ClearQuest know it’s time to use ldap for user authenticatiton.

 

 

d.      After all those done, you can open ClearQuest user administration tool to add a user and check the ldap option . Then when user login ClearQuest, the login will pass to ldap for login authentication.

 

 

PS, keep in mind that do not change cq_search and its password in AD, else any ldap enabled user can not login ClearQuest. In multisite, if all sites’ settings are same, just run the exact commands in working master site and then sync those updates to other sites. Else with –site option in each site. Lastly, you can disable ldap with below commands

installutil setauthenticationalgorithm db_set_name  cq_admin_user admin_user_pwd   CQ_ONLY

installutil setldapinit db_set_name  cq_admin_user admin_user_pwd   -allsites -remove

installutil setldapsearch db_set_name  cq_admin_user admin_user_pwd   -allsites -remove

installutil setcqldapmap db_set_name  cq_admin_user admin_user_pwd   -allsites –remove

or temporily disable ldap with below command,

installutil setauthenticationalgorithm db_set_name  cq_admin_user admin_user_pwd   CQ_ONLY

 

 

This is pretty much of what I know about ClearQuest and LDAP integration.

Tuesday, October 19, 2010

VOB Creation Error Handling

Users with ClearCase Administrator role sometimes still can not create VOB successfully although it have RW access control right to storage locations. Below alert message will prompt up

Creating VOB:
VOB Creation Wizard:Error:Failed to record hostname "xxxx" in storage directory "xxxxxx".Check the root or the ClearCase administrators group has permission to write to this directory.
VOB Creation Wizard:Error:Unable to create versioned object base "xxxxxx"
In this situation, user should check access right of the log on user of system service "Atrial Location Broker" and make sure the user has also RW right to the storage location. Add that user to administrators group on the machine which host the storage location if no.


PS, for any exception during cc operations, users can check Log Browser which logs the detailed error messages for further investigation.

Tuesday, May 4, 2010

CM API Usage Guide

CM API Usage Guide
CM API is introduced in Rational 7.1. It has implement java interface between JAVA and CC/CQ applications. Using CM API, java client can do task like,
1. populate users in cq database
2. submit, update, delete records in cq database
3. check out/in a element version
4. others like perl, vbs do in privious version.
 
Here is brief introducton of CM API.
 
 

Friday, April 23, 2010

How to Set Dynamic Parameter of Query From External Script

How to Set Dynamic Parameter of Query From External Script
 
Below is the perl code
 
##############################################
my $workSpace=$userSession->GetWorkSpace(); #$userSession should be created before

 #Personal Queries/Dymic is a query with 2 dynamic fields state and submit date
 my $queryDef=$workSpace->GetQueryDef("Personal Queries/Dymic");
 my $rstSet=$userSession->BuildResultSet($queryDef);

   # set state value list
   $rstSet->AddParamValue(1,"Submitted");
   $rstSet->AddParamValue(1,"Assigned");

   # first set compare operator for the submit date. 9 means "between"
   $rstSet->SetParamComparisonOperator(2,9);
   # then set 2 time value for between
   $rstSet->AddParamValue(2,"2010-04-23 00:00:00");
   $rstSet->AddParamValue(2,"2010-04-23 23:59:59")
   $rstSet->Execute;
   print $rstSet->GetSQL();
##############################################
 
The output likes this,
select distinct T1.dbid,T1.id from new_defect T1,statedef T2 where T1.state = T2.id and (T1.dbid  0 and ((T2.name in ('Submitted','Assigned') and T1.submit_date between {ts '2010-04-21 08:00:00'} and  {ts '2010-04-23 08:00:00'})))