Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
We have a perpetual license for Qlick Replicate that I would like to be able to register automatically in an ansible jobs (like you already have in your dockerfile construction script.
This license is in txt format but it seems that "repctl.sh importlicense ..." needs a json format isn't it ?
Could you tell me the exact format needed please ?
Best,
Jerome
You should be able to use any scripting / editing language of your choice to transform a text style license to JSON.
The biggest 'trick' is that the various values need to be inside a block labeled: "cmd.license": { ... }
Below an example I named make_license_json.pl in Perl
hth,
Hein.
#
# Usage:
# Step 1: >> perl make_license_json.pl license.txt > license.json
# Step 2: >> repctl [-d <replicate_data_dir>] importlicense license_file=<location>license.json
#
# Enjoy! Hein van den Heuvel
#
$comma = q(); # Will become a a comma
for (<>) {
next if /^\s*#/; # Comment?
if (/license_type=/) { # Looks like a license file?}
$license=1;
print qq({\n\t"cmd.license":\t{); # Open up the JSON structure
}
next unless $license and /=/;
chomp; # Remove New-line
s/=/":"/;
print qq(${comma}\n\t\t"${_}");
$comma = q(,); # Now it must become real
}
print qq(\n\t}\n}\n); # And close the JSON structure
Hello @jrevillard ,
Yes, the command line request a JSON format.
Can you please send the license file (by private message!) to me ? I can try to convert it to JSON.
BTW, let me know your Replicate Version.
Regards,
John.
Private message sent @john_wang . Thanks for your help !
You should be able to use any scripting / editing language of your choice to transform a text style license to JSON.
The biggest 'trick' is that the various values need to be inside a block labeled: "cmd.license": { ... }
Below an example I named make_license_json.pl in Perl
hth,
Hein.
#
# Usage:
# Step 1: >> perl make_license_json.pl license.txt > license.json
# Step 2: >> repctl [-d <replicate_data_dir>] importlicense license_file=<location>license.json
#
# Enjoy! Hein van den Heuvel
#
$comma = q(); # Will become a a comma
for (<>) {
next if /^\s*#/; # Comment?
if (/license_type=/) { # Looks like a license file?}
$license=1;
print qq({\n\t"cmd.license":\t{); # Open up the JSON structure
}
next unless $license and /=/;
chomp; # Remove New-line
s/=/":"/;
print qq(${comma}\n\t\t"${_}");
$comma = q(,); # Now it must become real
}
print qq(\n\t}\n}\n); # And close the JSON structure
Hi @jrevillard ,
Sorry I just come back from a 2 hours remote session.
It's great @Heinvandenheuvel is around here and provide a great option. thank you so much.
Regards,
John.
Thanks to both of you ! I will try it as soon as possible.
Best,
Jerome