RTC: Add user + floating license via batch job
3 answers
Usually companies use LDP to manage the users - see the ELM documentation.
It is possible to use the repotools shipped with ELM to create/update users, including licenses. I will try to attach an example tomorrow.
Comments
Option 1 you can try: use repotools -createUser
call %SERVERFOLDER%\repotools-jts -createUser userId=bob licenseId=com.ibm.team.rrc.author repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=marco licenseId=com.ibm.rqm.tester repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=marco licenseId=com.ibm.team.rtc.developer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=marco licenseId=com.ibm.rqm.tester repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=marco licenseId=com.ibm.team.rtc.developer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
I have not looked at what happens if you use LDAP. It can update existing users. It can only update the information it manages e.g. the licenses.
Option 2: Import Users from CSV
call %SERVERFOLDER%\repotools-jts -importUsers fromFile="./SampleUsers.csv" repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
If I remember correctly these CSV entries also contain the license. Run an export first to be sure.
First thanks a lot for your answers! So I do some tests...
We are running on z/OS and used the following repotools command via the jcl (batch job BLZRPOTL) in the SBLZSAMP:
//MAINARGS DD *
-clean
-configuration
§workPath§/§context§/repotools/configuration
-application com.ibm.team.repotools.rcp.repotools_application
-createUser userId=%userid% name=%name% emailAddress=%mailadress% licenseId=com.ibm.rtc.developer-iep.floating
repositoryURL=§repositoryURL§ adminUserId=xyz adminPassword=%password%
logFile=§workPath§/§logs§/repotools-jts_createUsers.log
In generelly it is running now successfully, but we get the following messages and return code which are not clear for us?
...
JVMJZBL2999T JvmExitHook entered with exitCode=21, javaMainReturnedOrThrewException=0
JVMJZBL1043N The Java virtual machine completed with System.exit(21)
CRJAZ1705W The system property "com.ibm.team.repotools.rcp.scriptName" is not set. Using the default value "repotools".
I found the exit status code (21) on knowledge center:
-> Value 21 means "The requested operation could not complete because it would create an n-way conflict in the change set history."
I don't know if it is the right value explanation and what does it mean exactly?
Thanks and best regards
Comments
I am not a Z person. The error CRJAZ1705W The system property "com.ibm.team.repotools.rcp.scriptName" is not set. Using the default value "repotools".is likely a wrong configuration of your batch.
The error https://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.6.1/com.ibm.team.scm.doc/topics/r_scm_cli_retcodes.html is not for the repotools (obviously) it is for the RTC SCM Command Line Tools.