mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 05:40:01 +00:00
Small changes to README.MD and .gitignore (#476)
* added es_sync_config.json and minified js to .gitignore * reordered README.md to reflect that MySQL Binlogging must be enabled before running import_to_es.py
This commit is contained in:
parent
0cc25c3569
commit
7a494f26de
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -22,7 +22,12 @@ __pycache__
|
|||
# Application
|
||||
/install/*
|
||||
/config.py
|
||||
/es_sync_config.json
|
||||
/test_torrent_batch
|
||||
|
||||
# Build Output
|
||||
nyaa/static/js/bootstrap-select.min.js
|
||||
nyaa/static/js/main.min.js
|
||||
|
||||
# Other
|
||||
*.swp
|
||||
|
|
24
README.md
24
README.md
|
@ -77,18 +77,6 @@ Continue below to learn about database migrations and enabling the advanced sear
|
|||
- Run `curl -XGET 'localhost:9200'` and make sure ES is running
|
||||
- Optional: install [Kibana](https://www.elastic.co/products/kibana) as a search debug frontend for ES
|
||||
|
||||
### Setting up ES
|
||||
- Run `./create_es.sh` to create the indices for the torrents: `nyaa` and `sukebei`
|
||||
- The output should show `acknowledged: true` twice
|
||||
- Stop the Nyaa app if you haven't already
|
||||
- Run `python import_to_es.py` to import all the torrents (on nyaa and sukebei) into the ES indices.
|
||||
- This may take some time to run if you have plenty of torrents in your database.
|
||||
|
||||
Enable the `USE_ELASTIC_SEARCH` flag in `config.py` and (re)start the application.
|
||||
Elasticsearch should now be functional! The ES indices won't be updated "live" with the current setup, continue below for instructions on how to hook Elasticsearch up to MySQL binlog.
|
||||
|
||||
However, take note that binglog is not necessary for simple ES testing and development; you can simply run `import_to_es.py` from time to time to reindex all the torrents.
|
||||
|
||||
### Enabling MySQL Binlogging
|
||||
- Edit your MariaDB/MySQL server configuration and add the following under `[mariadb]`:
|
||||
```
|
||||
|
@ -103,6 +91,18 @@ However, take note that binglog is not necessary for simple ES testing and devel
|
|||
- Verify that the result of `SHOW VARIABLES LIKE 'binlog_format';` is `ROW`
|
||||
- Execute `GRANT REPLICATION SLAVE ON *.* TO 'username'@'localhost';` to allow your configured user access to the binlog
|
||||
|
||||
### Setting up ES
|
||||
- Run `./create_es.sh` to create the indices for the torrents: `nyaa` and `sukebei`
|
||||
- The output should show `acknowledged: true` twice
|
||||
- Stop the Nyaa app if you haven't already
|
||||
- Run `python import_to_es.py` to import all the torrents (on nyaa and sukebei) into the ES indices.
|
||||
- This may take some time to run if you have plenty of torrents in your database.
|
||||
|
||||
Enable the `USE_ELASTIC_SEARCH` flag in `config.py` and (re)start the application.
|
||||
Elasticsearch should now be functional! The ES indices won't be updated "live" with the current setup, continue below for instructions on how to hook Elasticsearch up to MySQL binlog.
|
||||
|
||||
However, take note that binglog is not necessary for simple ES testing and development; you can simply run `import_to_es.py` from time to time to reindex all the torrents.
|
||||
|
||||
|
||||
### Setting up sync_es.py
|
||||
`sync_es.py` keeps the Elasticsearch indices updated by reading the binlog and pushing the changes to the ES indices.
|
||||
|
|
Loading…
Reference in a new issue