Set license key

Must-share information (formatted with Markdown):

  • which versions are you using
    upgrading from sonarquce community 8.2 to enterprise version 8.2
  • what are you trying to achieve
    have the license key be set automatically in the deploy script we run for our K8 deployment.
  • what have you tried so far to achieve this
    can only set it after an upgrade is done on the database manually.

Hi @jlenzi ,

there is an API endpoint to set the license api/editions/set_license but as you mentioned the database migration needs to be complete in order to set the license. you can start the migration with api/system/migrate_db and then wait within your script until api/system/status returns UP to set the license automatically

Hope that helps

@Tobias_Trabelsi

We have a Kubernetes cluster with SQ deployed in. Would we be able to pass the license as an environment variable or Helm command?

Also is the license tied to a database instance? what happens if we need to revert a database?

Hi @jlenzi ,

sadly sonarqube is not supported to be run within k8s so you have to treat it as a legacy application. You could set the License key with the scripted approach as i already mentioned but other methodes are currently not available.
The License IS bound to the Server ID which will change if the database URI is changed.

try to deploy sonarqube really static within your k8s cluster. we hope to have a better experience running sonarqube on k8s in the future