Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We have Qlik sense deployments done via scripts (silent installs) as part of automating installation and configuration of QS servers.
As part of extending this, we are trying to set up Qlik Cluster setups via scripts. We were able to install Central and Rim nodes via silent installs.
We are trying to add the Rim node to Cluster nodes list via QRS api and are finding APIs that help with cluster configuration, but unable to find any API that allows to:
1. add Rim node
2. configure roles of Rim node.
Could someone please help us find any such API in Qlik, and how to use it, like an example or such.
We are trying to use the link to find the necessary APIs:
https://help.qlik.com/en-US/sense-developer/April2020/APIs/RepositoryServiceAPI/index.html?page=1246
Here's a set of old code I have used in the past for this purpose which leverages Qlik-Cli: https://gist.github.com/levi-turner/6edf4860d9c7b1c8729fbaeae295a0db
Hi,
I believe this should resolve your issue https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-QRS-API-409-conflict-error-when-running-a-PU...
Hope this helps!
Here's a set of old code I have used in the past for this purpose which leverages Qlik-Cli: https://gist.github.com/levi-turner/6edf4860d9c7b1c8729fbaeae295a0db
Thanks @Levi_Turner , Qlik Cli needs remote signed execution policy that may not bode well with our infosec team.
While I explore about this option and its feasibility, could you please let us know of any other way, more like on lines of silent install or qrs calls.
Hello,
The Qlik-Cli uses the QRS API to add and configure a rim node so yes it is doable to create your own script/application leveraging the QRS API.
However this will not be a single line of code as there are multiple QRS API to run to get a node added and configured into Qlik Sense. The Qlik-Cli actually makes it simpler as it will run these API Calls in the background for you.
@Levi can add on top of that but if you are interested you can loos at the PowerShell script available in Qlik-Cli to see the different QRS API call used which should give you an idea of the workflow.
Finally regarding the Set-ExecutionPolicy, this can be reverted back once the deployment of the node is done. You can probably automate that as well.
Hope this helps!
@Bastien_Laugiero @Levi_Turner
Thank you both. Let me check out the CLI way.
@Levi_Turner @Bastien_Laugiero
Sorry about the delay in my reply.
So I was finally able to get Qlik CLi on my central node. And was able to add it too... but it is failing mid way - saying it is unable to find the target system.
Here is my script.
Connect-Qlik
$password = New-QlikNode -hostname dev1727 -name dev1727 -nodePurpose Both -engineEnabled -proxyEnabled
$foo = @{__pwd="$password"}
$Username = '<domain\username>'
$Password = '<password>'
$pass = ConvertTo-SecureString -AsPlainText $Password -Force
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$pass
Invoke-Command -ComputerName dev1727 -ScriptBlock { Invoke-WebRequest -Uri "http://localhost:4570/certificateSetup" -Method Post -Body $Using:foo } -credential $Cred$nodeid = Get-QlikNode -filter "(name eq 'dev1727')"
Invoke-QlikGet -path /qrs/servernoderegistration/start/$($nodeid.id)
Error I am facing
The system DEV1727 is reachable from Central node when i ping it.
Also, in QMC, I see the RIM node being added; but pending certs distribution.
I am not sure how to proceed further at this time.
All necessary ports are open between these two nodes since i am able to set up cluster manually.
Hello!
Could you check this link? It looks like you might need to set a trusted a list of trusted hostname.
Hope this helps!
Ironically I viewed that page earlier, but didn't set up the hosts as trusted hosts.
Adding as trusted hosts got the node added and certs distributed (i assume certs have been distributed cos it now does not say certs not distributed and instead shows services status).
But towards the end of the process, instead of gracefully exiting, I see the below error:
I ignored the error above and proceeded, and see the node being added to the list of nodes in cluster with services picked when adding it.
Thank you Levi and Bastien for the info on that. I shall accept it as solution (didn't accept for now since i added the continuation to the same post instead of making a new one).
So now i moved on to the next stage and trying to add the added node to the list of load balancing nodes under the virtual proxy.
In the body below, I highlighted in BOLD in the info about the new node that needs to be added to it.
It is coming back with success response (i am getting 409 conflict) but when i go to the nodes list, i do not see the new node added. I left the system free for like 30 minutes and still getting the same 409 conflict. Am i missing something?
Response
Hi,
I believe this should resolve your issue https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-QRS-API-409-conflict-error-when-running-a-PU...
Hope this helps!