Dashboard database migration
Here are the migration steps. Before starting, note that there are two users:
- jenkins with a home directory /var/lib/jenkins and most of the Lingoport programs are in the /var/lib/jenkins/lingoport folder.
- centos or ec2-user or another name - this is the user that has sudo permission on the system.
1.As the jenkins user, stop Dashboard Server 9.4.1
./lingoport/dashboard-server-9.4.1/bin/linux-x86-64/sonar.sh stop
2. As the sudo user, delete sonardb database
sudo -u postgres psql (note: this may give a permission error, but continue anyway) drop database lingodash; create database lingodash; grant all privileges on database lingodash to lingodashuser; quit
3. Returning to the jenkins user, modify sonar.properties of Dashboard server 7.8.3
cp lingoport/dashboard-server-7.8.3/conf/sonar.properties lingoport/dashboard-server-7.8.3/conf/sonar.propertiesmysql vi lingoport/dashboard-server-7.8.3/conf/sonar.properties
- 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 comment out any 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 projects (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
cd lingoport cp update/mysql-migrator-1.2-SNAPSHOT.zip . unzip mysql-migrator-1.2-SNAPSHOT.zip ./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
dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh start
- The password has returned to the original password.
- Check that the projects all exist then stop the server
dashboard-server-7.8.3/bin/linux-x86-64/sonar.sh stop
8. Install SonarQube 7.9 Community Edition
cp update/sonarqube-7.9.6.zip . unzip sonarqube-7.9.6.zip cp dashboard-server-7.8.3/conf/sonar.properties sonarqube-7.9.6/conf/. 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
sonarqube-7.9.6/bin/linux-x86-64/sonar.sh stop
9. Install SonarQube 8.9 Community Edition
cp update/sonarqube-8.9.8.54436.zip . unzip sonarqube-8.9.8.54436.zip cp dashboard-server-7.8.3/conf/sonar.properties sonarqube-8.9.8.54436/conf/ 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
sonarqube-8.9.8.54436/bin/linux-x86-64/sonar.sh stop
10. Start Dashboard Server 9.4.1
cp dashboard-server-7.8.3/conf/sonar.properties dashboard-server-9.4.1/conf rm -rf dashboard-server-9.4.1/data/es7
- Start SonarQube 9.4.1
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
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