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

CB-231: Update docs for specifying single way of setting up MB database. #115

Merged
merged 2 commits into from Jun 29, 2017

Conversation

ferbncode
Copy link
Member

@ferbncode ferbncode commented Jun 27, 2017

I updated the docs for focusing on a single way for setting up the MusicBrainz database. Also sent a PR for updating the download of dumps with retries: metabrainz/musicbrainz-server#527.

@ferbncode
Copy link
Member Author

ferbncode commented Jun 27, 2017

I also tried another way for setting up the MB database https://gist.github.com/ferbncode/13f7d6a9ae0a37064f9e13c1c02a2c0f#file-intro-L41-L61. It is a good way as everything happens in a single command. But using docker-compose -f docker/docker-compose.dev.yml up --build does not produce a very informative output while downloading dumps: https://gist.github.com/ferbncode/08b6f9e8dd0bcd0416a4f15ace8feffe (Information related to downloads only gets shown up either when the downloads complete or are interrupted). But I am not sure if that should be an issue? Should I rather update with these commands?

docs/intro.rst Outdated
@@ -44,15 +44,9 @@ Then you can build all the services::

$ docker-compose -f docker/docker-compose.dev.yml build

You need MusicBrainz database containing all the MusicBrainz music metadata for setting up your application. Data dumps provided from https://musicbrainz.org can be downloaded from https://musicbrainz.org/doc/MusicBrainz_Database/Download. ``mbdump.tar.bz2`` is the core MusicBrainz database including the tables for artist, release groups etc. ``mbdump-derived.tar.bz2`` contains annotations, user tags and search indexes. The core and the derived database covers all the data required for a CritiqueBrainz server.
MusicBrainz database containing all the MusicBrainz music metadata is needed for setting up your application. The ``mbdump.tar.bz2`` is the core MusicBrainz database including the tables for artist, release_group etc. ``mbdump-derived.tar.bz2`` contains annotations, user tags and search indexes. The core and the derived database covers all the data required for a CritiqueBrainz server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good if you wrapped long lines like it's done in other places in this file.

Copy link
Contributor

@gentlecat gentlecat Jun 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the MusicBrainz music metadata

I think "music" part can be removed since it's not only music.

The mbdump.tar.bz2 is the core MusicBrainz database

It's not really a database. Can call it a database dump or an archive, otherwise it can get confusing.

for setting up your application

for setting up an instance of CritiqueBrainz

including the tables for artist, release_group etc.

which includes the tables for artist, release group, and other entities

The core and the derived database covers

These archives include

docs/intro.rst Outdated
**Note** ``DUMPS_DIR`` should be set to the path containing the downloaded dumps.

You can automatically download ``mbdump.tar.bz2`` and ``mbdump-derived.tar.bz2`` and import them by not specifying a volume::
You can automatically download the dumps (``mbdump.tar.bz2`` and ``mbdump-derived.tar.bz2``) and begin the import for the MusicBrainz database::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you call them "dumps". You should pick one term and stick to it.

docs/intro.rst Outdated
@@ -62,7 +56,13 @@ Initialization of CritiqueBrainz database is also required::

Then you can start all the services::

$ docker-compose -f docker/docker-compose.dev.yml up -d
$ docker-compose -f docker/docker-compose.dev.yml up -d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is indentation for code here correct?

docs/intro.rst Outdated

.. seealso:: An alternative way for setting up the MusicBrainz database is to download the dumps manually and then do the import. Data dumps provided from https://musicbrainz.org can be downloaded from https://musicbrainz.org/doc/MusicBrainz_Database/Download. Then setup the MusicBrainz database using::

$ docker-compose -f docker/docker-compose.dev.yml run -v $DUMPS_DIR:/home/musicbrainz/dumps -v $PWD/data/mbdata:/var/lib/postgresql/data/pgdata musicbrainz_db
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea to split long lines of commands into multiple using \. That way all of it is going to be visible without having to scroll.

docs/intro.rst Outdated

$ docker-compose -f docker/docker-compose.dev.yml run -v $DUMPS_DIR:/home/musicbrainz/dumps -v $PWD/data/mbdata:/var/lib/postgresql/data/pgdata musicbrainz_db

**Note**: ``DUMPS_DIR`` should be set to the path containing the downloaded dumps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be clarified before the command. Also, it's better to say explicitly what DUMPS_DIR is (an environment variable).

@gentlecat gentlecat merged commit a2a8db8 into metabrainz:master Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants