It's all about the answers!

Ask a question

Can we assign license to users in JKE Banking application from command line?


Kaipa Sudheernath Reddy (117) | asked Jan 06 '16, 2:52 a.m.
retagged Jan 20 '16, 11:59 a.m. by Ken Tessier (84117)
I want to assign license to a user called "Build" in JKE banking application.Can I do it from command line?

Accepted answer


permanent link
Zeeshan Choudhry (6241512) | answered Jan 06 '16, 1:35 p.m.
edited Jan 06 '16, 1:36 p.m.
repotools-jts.bat -createUser

Use the createUser command to create a new user and assign a license, or update an existing user.

Purpose

The createUser command creates a new user and assigns a license. If a user with the specified user ID exists, that user will be updated with the name, email address, and license provided.


Reference:
https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.jazz.install.doc/topics/r_repotools_createuser.html&scope=null
Ralph Schoon selected this answer as the correct answer

Comments
Davyd Norris commented Jan 06 '16, 8:12 p.m.

This is the correct approach.

I have built a batch file to create all the JKE Banking users and assign licenses. Makes it very easy to reset my demo VM with a fresh sample project

2 other answers



permanent link
Ralph Schoon (54.7k13641) | answered Jan 06 '16, 3:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 06 '16, 3:56 a.m.
https://jazz.net/help-dev/clm/topic/com.ibm.jazz.install.doc/topics/t_config_sample_proj.html mentions that this could be done with a script, but I am not aware of an example.
 
I think repotools-jts can export the users and import them with licenses. You can try that.

I usually do this in the JTS (or other application) user administration.



permanent link
Ralph Schoon (54.7k13641) | answered Jan 07 '16, 3:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Nice, so summarizing, here a script that would do it:
echo on
set SERVERFOLDER="C:\CLM2015\6.0.1\JazzTeamServer\server"
set REPOSITORY="https://clm.example.com:9443/jts"
set USERID="the_admin_userid"
set PASSWORD="the_admin_password"


rem primary users
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=deb licenseId=com.ibm.team.rtc.developer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=tanuj licenseId=com.ibm.rqm.tester repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=rebecca licenseId=com.ibm.team.rtc.developer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%

rem Build user
call %SERVERFOLDER%\repotools-jts -createUser userId=build licenseId=com.ibm.team.rtc.buildsystem repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%

rem secondary users
call %SERVERFOLDER%\repotools-jts -createUser userId=ursula licenseId=com.ibm.team.rrc.author repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=curtis licenseId=com.ibm.rqm.viewer repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=tammy licenseId=com.ibm.rqm.tester repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
call %SERVERFOLDER%\repotools-jts -createUser userId=sally licenseId=com.ibm.team.rrc.author repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
rem Design Manager License 
rem %SERVERFOLDER%\repotools-jts -createUser userId=al licenseId= repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%
pause


If you want to peek into an existing setup
repotools-jts -exportUsers toFile=users.csv repositoryURL=https://clm.example.com:9443/jts adminUserId=the_admin_userid adminPassword=the_admin_password
Get the installed Licenses
repotools-jts -listLicenses repositoryURL=https://clm.example.com:9443/jts adminUserId=the_admin_userid adminPassword=the_admin_password

Comments
Kenery Wang commented Jan 08 '18, 5:04 a.m.

Hi Ralph,


I tried your approach and it did work to assign a license to a specific user. However, if I want to assign "multiple" licenses to a specific user by using  -createUser, it always updates the user with the last assigned license. 

For instance, in your case, the user "marco" is only assigned with RTC Developer license but without  RQM Tester license. 

Could you please tell me if it's possible to assign "multiple" licenses to a specific user by using  -createUser or there's other way to do that. Thanks.


Ralph Schoon commented Jan 08 '18, 11:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

My requirement was only one license. Multiple licenses could be avoided by using CLM licenses. If createUser only allows just one license the other option is the CSV import.
Use exportUsers to see the formats for one or more licenses

echo on
set SERVERFOLDER="C:\CLM2015\6.0\JazzTeamServer\server"
set REPOSITORY="https://clm.example.com:9443/jts"
set USERID=""
set PASSWORD=""

rem primary users call %SERVERFOLDER%\repotools-jts -exportUsers toFile=./users.csv repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%

then modify the csv file e.g. using a script language and import the file

echo on
set SERVERFOLDER="C:\CLM2015\6.0\JazzTeamServer\server"
set REPOSITORY="https://clm.example.com:9443/jts"
set USERID="*"
set PASSWORD="*"

rem primary users
call %SERVERFOLDER%\repotools-jts -importUsers fromFile="./SampleUsers.csv" repositoryURL=%REPOSITORY% adminUserId=%USERID% adminPassword=%PASSWORD%

Finally the API: https://rsjazz.wordpress.com/2017/03/29/managing-contributor-licenses-using-the-plain-java-client-libraries/

Your answer


Register or to post your answer.