{"id":731,"date":"2013-11-21T15:26:18","date_gmt":"2013-11-21T14:26:18","guid":{"rendered":"http:\/\/qualilogy.com\/en\/?p=731"},"modified":"2013-12-01T15:02:09","modified_gmt":"2013-12-01T14:02:09","slug":"sonarqube-upgrade2","status":"publish","type":"post","link":"http:\/\/qualilogy.com\/en\/sonarqube-upgrade2\/","title":{"rendered":"SonarQube Upgrade"},"content":{"rendered":"<p><a href=\"http:\/\/500px.com\/Vicken\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1285\" alt=\"SonarUpgradeImg2\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarUpgradeImg2.jpg\" width=\"232\" height=\"350\" \/><\/a><br \/>\nAfter preparing the upgrade of our SonarQube version in the previous post, about <a title=\"Pr\u00e9-requis d'upgrade SonarQube\" href=\"http:\/\/qualilogy.com\/en\/sonarqube-upgrade-prerequisites\/\" target=\"_blank\">upgrade prerequisites<\/a>, which allowed us to present how to make a backup of our Oracle database (or at least of the Sonar schema), we will see now how to perform this upgrade.<\/p>\n<p>Remember that you can always consult the documentation on this subject since the <a href=\"http:\/\/docs.codehaus.org\/display\/SONAR\/Upgrading\" target=\"_blank\">SonarSource site<\/a>. This procedure changes very rarely, but I recommend that you always refer to it, in case this article would become obsolete.<\/p>\n<p>Also, our will realize an upgrade of <a href=\"http:\/\/qualilogy.com\/en\/migrate-sonarqube-tomcat-to-windows-service\/\" target=\"_blank\">SonarQube installed as a Windows service<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>We have seen in the <a title=\"Pr\u00e9-requis d'upgrade SonarQube\" href=\"http:\/\/qualilogy.com\/en\/sonarqube-upgrade-prerequisites\/\" target=\"_blank\">previous post<\/a> how to perform our upgrade from the Update Center of SonarQube. Here are the operations to do, at the time I dit it:<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarQubeUpgrade1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1293\" alt=\"SonarQube Update Center\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarQubeUpgrade1.jpg\" width=\"696\" height=\"484\" \/><\/a><\/p>\n<h2>Plugins update<\/h2>\n<p>We can see a number of operations to be performed on the plugins we have installed in our environment code analysis.<\/p>\n<h3>Plugins uninstall<\/h3>\n<p>Generally, I doing this upgrade of plugins in two steps, the first of which is to uninstall the plugins that I do not want anymore, or are no more compatible with the new version of SonarQube that I want to install.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarQubePluginUninstall1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1294\" alt=\"SonarQubePluginUninstall1\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarQubePluginUninstall1.jpg\" width=\"494\" height=\"158\" \/><\/a><\/p>\n<p>You can select multiple plugins to uninstall.<\/p>\n<p>It is necessary to restart SonarQube to update the Update Center. In our environment, it requires a Start \/ Stop of the Windows service.<\/p>\n<h3>Upgrade \/ Installation de plugins<\/h3>\n<p>Once SonarQube has started again, we can see in the Update Center that the plugins previously deleted are not anymore present in the tab &#8216;Installed Plugins&#8217;. They also have disappeared from the directory \u2018..\\extensions\\plugins&#8217; where they are located by default.<\/p>\n<p>We can now perform a second step to upgrade the plugins that need to be &#8230;<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/Upgrade4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1296\" alt=\"Upgrade4\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/Upgrade4.jpg\" width=\"673\" height=\"302\" \/><\/a><\/p>\n<p>&#8230; and install either new plugins, either new versions of plugins that we did remove in the previous step.<\/p>\n<p>A new Re-start of the Windows service, and back to the Update Center to ensure that all operations have been successfull. You can also download yourself the plugins from <a href=\"http:\/\/www.sonarsource.com\/category\/plugins-news\/\" target=\"_blank\">the SonarSource <\/a><a href=\"http:\/\/www.sonarsource.com\/category\/plugins-news\/\" target=\"_blank\">site<\/a> into their own folder, but this requires the knowledge of the correct versions of the plugins. And this is where the Update Center does the job for you!<\/p>\n<h2>SonarQube upgrade<\/h2>\n<p>We already addressed this subject some months ago, in this post <a href=\"http:\/\/qualilogy.com\/en\/sonar-upgrade\/\" target=\"_blank\">Sonar Upgrade<\/a>, when Sonar was not yet named SonarQube. The only other difference is that this article was related to a Sonar installation under Tomcat while now we have SonarQube as a Windows service. But the architecture of our environment remains the same, and therefore the steps to update also. So I will just list them without much details.<\/p>\n<h3>Uninstall the current SonarQube Service<\/h3>\n<p>First, we must unininstall the current version of the SonarQube service. For this, we open a DOS command windows, and go into:<\/p>\n<ul>\n<li>the &#8216;..\\bin&#8217; directory of the current SonarQube version;<\/li>\n<li>then the sub-directory corresponding to our OS.<\/li>\n<\/ul>\n<p>Which is &#8216;sonar-3..5.1\\bin\\windows-x86-64&#8217;, in my case.<\/p>\n<p>In this folder, we launch the file &#8216;UninstallNTService.bat&#8217;.<\/p>\n<p>The following figure shows this uninstall in a DOS windows and the message about the successfull remove of the Windows service SonarQube.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarServiceUninstall.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1299\" alt=\"SonarServiceUninstall\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarServiceUninstall.jpg\" width=\"686\" height=\"191\" \/><\/a><\/p>\n<h3>Prepare to install the new version SonarQube<\/h3>\n<p>We will get the new version from the <a href=\"http:\/\/www.sonarqube.org\/downloads\/\" target=\"_blank\">download page of SonarSource<\/a>. Take this opportunity to read the Release Notes, never a loss of time.<br \/>\nI&#8217;ll unzip this new version in its own directory: \u2018..\\sonar 3.7.2&#8242;.<\/p>\n<p>I will then reuse the existing configuration files, so:<\/p>\n<ul>\n<li>Copy the files \u2018sonar.properties\u2019 (with the parameters of your environment) and \u2018wrapper.conf\u2019 from \u2018..\\sonar-3.5.1\\conf\u2019 to \u2018..\\sonar-3.7.2\\conf&#8217;.<\/li>\n<li>Copy the Oracle database driver from \u2018..\\sonar-3.5.1\\extensions\\jdbc-driver\\oracle\\ojdbc6.jar\u2019 the directory \u2018..\\sonar-3.7.2\\extensions\\jdbc-driver\\oracle\u2019 (depending of the database you are using).<\/li>\n<li>Copy the .jar files for the plugins installed in your current environment from \u2018..\\sonar-3.5.1\\extensions\\plugins\u2019 to \u2018..\\sonar-3.7.2\\extensions\\plugins\u2019.<\/li>\n<\/ul>\n<p>And if you want to install new plugins, or forgot to install one from the Update Center, you can do it now.<\/p>\n<h3>SonarQube upgrade<\/h3>\n<p>Now that we have configured the new version of SonarQube, we can install the corresponding service. To do this, we go into the &#8216;bin&#8217; directory of the new version: &#8216;sonar-7..3.2\\bin\\windows-x86-64&#8217;, and we launch the file &#8216;InstallNTService.bat&#8217; .<\/p>\n<p>Note: You must choose between launching a 64-bit or 32-bit batch file, depending on the version &#8211; 64-bit or 32-bit \u2013 of your JVM, and therefore of your Java installation.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarServiceInstall.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1300\" alt=\"SonarServiceInstall\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarServiceInstall.jpg\" width=\"685\" height=\"137\" \/><\/a><\/p>\n<p>You can start the Sonar service to verify that the installation was successful. If you encounter an error message, I suggest you check that your user has <a href=\"http:\/\/qualilogy.com\/en\/migrate-sonarqube-tomcat-to-windows-service\/\" target=\"_blank\">the rights to run the Windows service<\/a>.<\/p>\n<p>One final step is to update the SonarSource database from the &#8216;Setup&#8217; page.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarUpgadeDB.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1302\" alt=\"SonarUpgadeDB\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarUpgadeDB.jpg\" width=\"493\" height=\"174\" \/><\/a><\/p>\n<p>Click on the &#8216;Upgrade&#8217; button.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarUpgrading.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1303\" alt=\"SonarUpgrading\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarUpgrading.jpg\" width=\"364\" height=\"87\" \/><\/a><\/p>\n<p>And after few minutes (depending on the size of you SonarQube repository):<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarDBUpdate.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1304\" alt=\"SonarDBUpdate\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarDBUpdate.jpg\" width=\"413\" height=\"100\" \/><\/a><\/p>\n<p>Going to the Update Center, we can see that now our environment is &#8216;up to date&#8217;.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarAfterUpdate1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1305\" alt=\"SonarAfterUpdate1\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/11\/SonarAfterUpdate1.jpg\" width=\"483\" height=\"146\" \/><\/a><\/p>\n<p>Et voil\u00e0 !<\/p>\n<p>See you soon for the next post: we will celebrate 2 years of this blog Qualilogy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After preparing the upgrade of our SonarQube version in the previous post, about upgrade prerequisites, which allowed us to present how to make a backup of our Oracle database (or at least of the Sonar schema), we will see now how to perform this upgrade. Remember that you can always consult the documentation on this [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-731","post","type-post","status-publish","format-standard","hentry","category-sonar-installation"],"_links":{"self":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/731"}],"collection":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/comments?post=731"}],"version-history":[{"count":22,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/731\/revisions"}],"predecessor-version":[{"id":760,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/731\/revisions\/760"}],"wp:attachment":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/media?parent=731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/categories?post=731"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/tags?post=731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}