Dashboard database migration
Here are the migration steps.
1.Stop Dashboard Server 9.4.1
./lingoport/dashboard-server-9.4.1/bin/linux-x86-64/sonar.sh stop
2. Delete sonardb database
sudo -u postgres psql drop database lingodash; create database lingodash; grant all privileges on database lingodash to lingodashuser;
3. Modify sonar.properties of Dashboard server 7.8.3
lingoport/dashboard-server-7.8.3/conf/sonar.properties Make a copy of current mysql version sonar.properties file and name it sonar.propertiesmysql
Then modify the sonar.properties file as
sonar.jdbc.username=lingodashuser sonar.jdbc.password=password can be found on dashboard-server-9.4.1/conf/sonar.properties sonar.jdbc.url=jdbc:postgresql://localhost/lingodash sonar.search.javaOpts=-Xmx1g -Xms1g -XX:+HeapDumpOnOutOfMemoryError
Also commented out duplicate sonar.jdbc.url and sonar.search.javaOpts lines in the file.
4. Start Dashboard Server 7.8.3
cd ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh start
Go to the Dashboard url and there should be no project (the login has also reverted back to ‘admin/admin’)
5. Stop Dashboard Server 7.8.3
./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh stop
Delete lingoport/dashboard-server-7.8.3/data/es6 folder
6. Run the command
./mysql-migrator-1.2-SNAPSHOT/bin/mysql-migrator -source /var/lib/jenkins/lingoport/dashboard-server-7.8.3/conf/sonar.propertiesmysql -target /var/lib/jenkins/lingoport/dashboard-server-7.8.3/conf/sonar.properties
7. Start Dashboard Server 7.8.3
./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh start
The password has returned to the original password.
Check the project all exists then stop the server
./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh stop
8. Install SonarQube 7.9 Community Edition
Copy lingoport/dashboard-server-7.8.3/conf/sonar.properties to lingoport/sonarqube-7.9.6/conf
Start SonarQube 7.9 ./lingoport/sonarqube-7.9.6/bin/linux-x86-64/sonar.sh start
Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions and click “Migrate database” button
Login to sonarqube and you can see all the project names but no other details
Stop SonarQube 7.9 ./lingoport/sonarqube-7.9.6/bin/linux-x86-64/sonar.sh stop
9. Install SonarQube 8.9 Community Edition
Copy lingoport/dashboard-server-7.8.3/conf/sonar.properties to lingoport/sonarqube-8.9.8.54436/conf
Start SonarQube 8.9 ./lingoport/sonarqube-8.9.8.54436/bin/linux-x86-64/sonar.sh start
Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions and click “Migrate database” button
Login to sonarqube and you can see all the project names but no other details
Stop SonarQube 8.9 ./lingoport/sonarqube-8.9.8.54436/bin/linux-x86-64/sonar.sh stop
10. Start Dashboard Server 9.4.1
Copy lingoport/dashboard-server-7.8.3/conf/sonar.properties to lingoport/dashboard-server-9.4.1/conf
Delete dashboard-server-9.4.1/data/es7
Start SonarQube 9.4.1 ./lingoport/dashboard-server-9.4.1/bin/linux-x86-64/sonar.sh start
Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions and click “Migrate database” button
If there is no project showing, stop the server and delete dashboard-server-9.4.1/data/es7 folder
Start SonarQube 9.4.1 ./lingoport/dashboard-server-9.4.1/bin/linux-x86-64/sonar.sh start