Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

I want to assign license to a user called "Build" in JKE banking application.Can I do it from command line?

0 votes


Accepted answer

Permanent link
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

3 votes

Comments

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
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.


0 votes


Permanent link
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

0 votes

Comments

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.

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 log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,495
× 1,700
× 1,381
× 382

Question asked: Jan 06 '16, 2:52 a.m.

Question was seen: 3,967 times

Last updated: Jan 08 '18, 11:14 a.m.

Related questions
Confirmation Cancel Confirm