Migration of sonarqube 8.3.1 version from kubernetes pod to virtual machine for 9.9 version

Make sure to tell us:

  • What version are you upgrading from?
    8.3.1 to 9.9
  • System information (Operating system, Java version, Database provider/version)
    Linux
  • What’s the issue you’re facing?
    We are using the sonarqube 8.3.1 version and PostgreSQL 12 both are deployed in kubernetes by using helm chart and now the rquirement is to upgrade sonarqube to 9.9 LTS. But the problem here is, for 9.9 LTS sonarqube the supported version of Kubernetes is 1.23 - 1.26 but we are using 1.20 kubernetes version. Due to some dependencies we don’t want to upgrade Kuberentes version.

Now we are planning to migrate the sonarqube from kuberentes to a virtual machine where it will run as a service. What are the best possible options to achieve this setup without any data loss?

Hi,

Welcome to the community!

Ignoring the k8s technical details, the key point here is that your data is stored in your database. Keep it up and running and you’re golden.

Just make sure you point your higher version of SonarQube to the same DB and there will be no data loss.

Note that you cannot upgrade directly from 8.3.1 to 9.9. Your upgrade path is:

8.3.1 → 8.9.10 → 9.9

Whether you’re upgrading from zip to zip, docker to docker, k8s to k8s or any mix of k8s to zip to docker, the underlying principle is the same:

  • obtain the new version
  • configure it to point at your existing, external DB
  • turn off the old one
  • turn on the new one
  • trigger SonarQube to do its schema migration.

The docs should help.

 
HTH,
Ann

Hi Ann,

As we are doing the 9.9 LTS version installation completely on a new instance, It’s just like we are setting up freshly. What will be dependency here with the migration path?

Thanks,
Srikanth

Hi Srikanth,

Are you saying you’re tossing out your old data and starting from a blank DB? Then there’s no “migration”.

If you’re keeping your old DB, then the migration path & procedure is just as I explained it above.

 
Ann

Hi Ann,

Currently the sonarqube and db is present on kubernetes, as we are installing sonarqube 9.9 LTS on virtual machine we are also installing db on to a new virtual machine and then thinking to copy the data of both sonarqube and db which is on kubernetes to the newly created vm’s.

Does this process requires migration path?

Thanks,
Srikanth Reddy

Hi Ann,

I have tried the above one, the sonar is not coming up if we doesn’t follow the migration path. So, I have followed the migration path and now the sonar is up. Thanks for your inputs.

2 Likes