Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation #4616

Merged
merged 2 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/Contributing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,13 @@ as part of openSUSE Tumbleweed.
push directly) locally, e.g. `osc co devel:openQA/openQA`.
2. Get the script `update-cache.sh` from the main git repository with
`osc service ra`
2. Run `bash *update-cache.sh` inside the repository folder. Follow the log
3. Run `bash *update-cache.sh` inside the repository folder. Follow the log
checking no download errors occurred.
3. Do a sanity check on the generated `cache.txz`. It usually should not be
4. Do a sanity check on the generated `cache.txz`. It usually should not be
smaller than before, contain the newly added sources and must not contain
any empty files.
4. Add an entry to the changes file using `osc vc openQA.changes`.
5. `osc ci -m 'Update asset cache'`
5. Add an entry to the changes file using `osc vc openQA.changes`.
6. `osc ci -m 'Update asset cache'`

== Managing the database

Expand Down
18 changes: 9 additions & 9 deletions docs/Installing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1036,15 +1036,15 @@ updates and if it does it will upgrade the whole system. This approach is
independent of `openQA-auto-update` but can be used complementary. The
configuration is analogous to `openQA-auto-update`.

==== Migrating from older databases
== Migrating from older databases

For older versions of openQA, you can migrate from SQLite to PostgreSQL
according to
<<Pitfalls.asciidoc#db-migration,DB migration from SQLite to PostgreSQL>>.

For migrating from older PostgreSQL versions read on.

==== Migrating PostgreSQL database on openSUSE
== Migrating PostgreSQL database on openSUSE

The PostgreSQL `data`-directory needs to be migrated in order to switch to a
newer major version of PostgreSQL. The following instructions are specific to
Expand Down Expand Up @@ -1119,7 +1119,7 @@ sudo -u postgres vimdiff \
IMPORTANT: There shouldn't be a diff in the locale settings, otherwise
`pg_upgrade` will complain.

5. Shutdown postgres server and related services as appropriate for your setup,
7. Shutdown postgres server and related services as appropriate for your setup,
e.g.:
+
[source,sh]
Expand All @@ -1128,7 +1128,7 @@ sudo systemctl stop openqa-{webui,websockets,scheduler,livehandler,gru}
sudo systemctl stop postgresql
----

6. Perform the migration:
8. Perform the migration:
+
[source,sh]
----
Expand All @@ -1147,14 +1147,14 @@ for details.
NOTE: This step only takes a few seconds for multiple production DBs because the `--link`
option is used.

7. Change symlink (shown in step 2) to use the new data directory:
9. Change symlink (shown in step 2) to use the new data directory:
+
[source,sh]
----
sudo ln --force --no-dereference --relative --symbolic /var/lib/pgsql/data.$newver /var/lib/pgsql/data
----

8. Start services again as appropriate for your setup, e.g.:
10. Start services again as appropriate for your setup, e.g.:
+
[source,sh]
----
Expand All @@ -1165,21 +1165,21 @@ sudo systemctl start openqa-{webui,websockets,scheduler,livehandler,gru}
NOTE: There is no need to take care of starting the new version of the PostgreSQL service.
The start script checks the version of the data directory and starts the correct version.

9. Check whether usual role and database are present and running on the new version:
11. Check whether usual role and database are present and running on the new version:
+
[source,sh]
----
sudo -u geekotest psql -c 'select version();' openqa
----

10. Remove old postgres packages if not needed anymore:
12. Remove old postgres packages if not needed anymore:
+
[source,sh]
----
sudo zypper rm postgresql$oldver-server postgresql$oldver-contrib postgresql$oldver
----

11. Delete the old data directory if not needed anymore:
13. Delete the old data directory if not needed anymore:
+
[source,sh]
----
Expand Down
4 changes: 2 additions & 2 deletions tools/generate-documentation
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ check_asciidoctor() {
if [[ -z "$asciidoctor_bin" ]] || [[ ! -f $asciidoctor_bin ]]; then
echo "Could not find asciidoctor binary in your path, please install it and run this command again:"
echo " sudo gem install asciidoctor pygments.rb"
[[ ${formats[pdf]} ]] && echo " sudo gem install asciidoctor-pdf --pre"
[[ ${formats[pdf]} ]] && echo " sudo gem install asciidoctor-pdf"
echo "or via openSUSE's package manager:"
echo " sudo zypper install 'rubygem(asciidoctor)' 'perl(Pod::AsciiDoctor)'"
exit 1
Expand All @@ -195,7 +195,7 @@ check_asciidoctor() {
install_asciidoctor() {
# install dependencies
gem install asciidoctor pygments.rb
[[ ${formats[pdf]} ]] && gem install asciidoctor-pdf --pre
[[ ${formats[pdf]} ]] && gem install asciidoctor-pdf
cpanm -M https://cpan.metacpan.org --install Pod::AsciiDoctor
}

Expand Down