Difference between revisions of "Dashboard database migration"
Line 26: | Line 26: | ||
4. Start Dashboard Server 7.8.3 |
4. Start Dashboard Server 7.8.3 |
||
− | cd |
+ | cd |
− | ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh start |
+ | ./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’) |
Go to the Dashboard url and there should be no project (the login has also reverted back to ‘admin/admin’) |
||
Line 33: | Line 33: | ||
5. Stop Dashboard Server 7.8.3 |
5. Stop Dashboard Server 7.8.3 |
||
− | ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh stop |
+ | ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh stop |
+ | rm ./lingoport/dashboard-server-7.8.3/data/es6 |
||
− | |||
− | Delete lingoport/dashboard-server-7.8.3/data/es6 folder |
||
6. Run the command |
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 |
+ | ./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 |
7. Start Dashboard Server 7.8.3 |
||
− | ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh start |
+ | ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh start |
− | The password has returned to the original password. |
+ | * The password has returned to the original password. |
− | Check the project all exists then stop the server |
+ | * Check the project all exists then stop the server |
− | ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh stop |
+ | ./lingoport/dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh stop |
8. Install SonarQube 7.9 Community Edition |
8. Install SonarQube 7.9 Community Edition |
||
− | + | cp ./lingoport/dashboard-server-7.8.3/conf/sonar.properties ./lingoport/sonarqube-7.9.6/conf/. |
|
+ | ./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 |
||
− | Start SonarQube 7.9 ./lingoport/sonarqube-7.9.6/bin/linux-x86-64/sonar.sh start |
||
+ | * Login to sonarqube and you can see all the project names but no other details |
||
− | |||
+ | * Stop SonarQube 7.9 |
||
− | Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions and click “Migrate database” button |
||
+ | ./lingoport/sonarqube-7.9.6/bin/linux-x86-64/sonar.sh stop |
||
− | |||
− | 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 |
9. Install SonarQube 8.9 Community Edition |
||
− | + | cp lingoport/dashboard-server-7.8.3/conf/sonar.properties ./lingoport/sonarqube-8.9.8.54436/conf/. |
|
+ | ./lingoport/sonarqube-8.9.8.54436/bin/linux-x86-64/sonar.sh start |
||
− | |||
− | 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 |
||
+ | * Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions and click “Migrate database” button |
||
− | Stop SonarQube 8.9 ./lingoport/sonarqube-8.9.8.54436/bin/linux-x86-64/sonar.sh stop |
||
+ | * 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 |
10. Start Dashboard Server 9.4.1 |
||
− | + | cp lingoport/dashboard-server-7.8.3/conf/sonar.properties ./lingoport/dashboard-server-9.4.1/conf |
|
+ | rm -rf ./lingoport/dashboard-server-9.4.1/data/es7 |
||
+ | * Start SonarQube 9.4.1 |
||
− | Delete dashboard-server-9.4.1/data/es7 |
||
+ | |||
+ | ./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 |
||
− | Start SonarQube 9.4.1 ./lingoport/dashboard-server-9.4.1/bin/linux-x86-64/sonar.sh start |
||
+ | If there are no projects showing, stop the server and delete dashboard-server-9.4.1/data/es7 folder |
||
− | Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions and click “Migrate database” button |
||
+ | * Start SonarQube 9.4.1 |
||
− | If there is no project showing, stop the server and delete dashboard-server-9.4.1/data/es7 folder |
||
+ | ./lingoport/dashboard-server-9.4.1/bin/linux-x86-64/sonar.sh start |
||
+ | * Delete the es7 folder |
||
− | Start SonarQube 9.4.1 ./lingoport/dashboard-server-9.4.1/bin/linux-x86-64/sonar.sh start |
||
+ | rm -rf ./lingoport/dashboard-server-9.4.1/data/es7 |
Revision as of 20:19, 10 June 2022
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 rm ./lingoport/dashboard-server-7.8.3/data/es6
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
cp ./lingoport/dashboard-server-7.8.3/conf/sonar.properties ./lingoport/sonarqube-7.9.6/conf/. ./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
cp lingoport/dashboard-server-7.8.3/conf/sonar.properties ./lingoport/sonarqube-8.9.8.54436/conf/. ./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
cp lingoport/dashboard-server-7.8.3/conf/sonar.properties ./lingoport/dashboard-server-9.4.1/conf rm -rf ./lingoport/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 are no projects 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
- Delete the es7 folder
rm -rf ./lingoport/dashboard-server-9.4.1/data/es7