Automatic installation of SmartAssembly on build node
Michael_S
Posts: 8 Bronze 1
Hello,
we want to setup our build node automatically using ansible and chocolatey packages. Do you have any suggestion how this can be done?
From an existing question about automatically licensing the installed SmartAssembly I learned that this help page is not applicable to SmartAssembly. How can I activate the license automatically?
How should we handle license deactivation if the build not is not available anymore? We only have one build node to obfuscate our product so we won't be using the same license multiple times. However, if the build node is not operable anymore we don't want to have to remember that we must disable a license manually, we even might not have access to the build node anymore.
I just found Using SmartAssembly with Azure Pipelines which contains some logic to install SmartAssembly right before the build and remove the activation after build. Is this the way to go in my custom jenkins build pipline/scripts?
Does the installer just register the product again on the next run? We don't have such a dynamic build workflow that we create a new build node instance on every build. Instead, we have a static build node which is setup once and executes the build jobs sequentially, i.e. the required software is installed once.
Or does SmartAssembly 7/8 support command line registration "<name of productEXE> /activateSerial:<serialNumber>", too?
Best regards,
Michael
we want to setup our build node automatically using ansible and chocolatey packages. Do you have any suggestion how this can be done?
From an existing question about automatically licensing the installed SmartAssembly I learned that this help page is not applicable to SmartAssembly. How can I activate the license automatically?
How should we handle license deactivation if the build not is not available anymore? We only have one build node to obfuscate our product so we won't be using the same license multiple times. However, if the build node is not operable anymore we don't want to have to remember that we must disable a license manually, we even might not have access to the build node anymore.
I just found Using SmartAssembly with Azure Pipelines which contains some logic to install SmartAssembly right before the build and remove the activation after build. Is this the way to go in my custom jenkins build pipline/scripts?
Does the installer just register the product again on the next run? We don't have such a dynamic build workflow that we create a new build node instance on every build. Instead, we have a static build node which is setup once and executes the build jobs sequentially, i.e. the required software is installed once.
Or does SmartAssembly 7/8 support command line registration "<name of productEXE> /activateSerial:<serialNumber>", too?
Best regards,
Michael
Tagged:
Best Answer
-
Victoria W Posts: 396 Gold 2Hi @Michael_S
The Azure pipeline doc you mentioned would be helpful in this case. You'd essentially follow the same process to activate automatically by installing SmartAssembly via the msi and applying the RG_LICENSE option during the install. You can also deactivate automatically by running the SmartAssembly command line with the /deactivateSerial switch per that page.
If the deactivation doesn't work, you can always log into the portal to free up the activation: https://productsupport.red-gate.com/hc/en-us/articles/360013329698-Logging-in-invitation-function-doesn-t-work-with-server-based-tools=
There is no /activateSerial option for SA, unfortunately. If you're only using one build server, you just need to run the installer once with that RG_LICENSE option (you don't need to reinstall/reactivate on each run as you would need to if using a hosted build agent in Azure).
Answers
thank you for you answer, I will give it a try.
Best Regards,
Michael
is there a way to debug this if passing the license code using the RG_LICENSE option does not work?
I can activate the license with the GUI client after installation and deactivating the license with the executable SmartAssembly.com works, too.
The msi install log contains the passed properties, e.g.
The license code is just an example, on my machine I used the correct license code.
*edit*
I used the msi installer of the nuget package, if that matters.
I created a new chocolatey package with that installer. Is there a way to use the nuget-package as is for chocolatey so I don't have to repackage it? How does the nuget-Package get the license key passed?
*/edit*
Michael
It's not currently possible to check if SmartAssembly is activated properly. Would a feature that will allow you to check license type from the command line be good enough?
Victoria Wiseman | Redgate Software
Have you visited our Help Center?
well, being able to verify the activation would certainly be an improvement to get notified that registration failed and has to be done manually.
However, currently I'm more interested in finding out why the automatic registration does not work. Can I enable some additional switches to create a log file? As interactive registration works I wonder if the registration process is different from the process executed by the installer? Are there any other ways to find out why it is failing? Maybe a wireshark network communication log or something similar?
Best regards,
Michael
It's currently not possible to activation failure logs but we've created a JIRA ticket SA-2464 for this.
We also have one to allow activation using the command line, JIRA SA-2463. And JIRA SA-2457 additional switch for checking the license type.
Victoria Wiseman | Redgate Software
Have you visited our Help Center?
We have completed the task with the "/licensetype" switch to check the license type and activate the product with "/activateSerial:<serial>" (with the appropriate activation status information) and we're just waiting to release. For the time being we won't be adding any logging during installation but assume that you can use the added switch instead of RG_LICENSE.
Victoria Wiseman | Redgate Software
Have you visited our Help Center?
that's great news, thank you!
I'm looking forward to testing it in our environment.
I assume there will be a hint on error similar as in the GUI, e.g. if the license server can't be contacted?
Best regards,
Michael
We provide feedback on activation. The proper message will be shown if it fails. We also provide a exit code of 0 if the activation was successful and 1 if it was unsuccessful.
Victoria Wiseman | Redgate Software
Have you visited our Help Center?