https://github.com/multiprocessio/postgres-elastic-integration
https://github.com/multiprocessio/postgres-elastic-integration
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/multiprocessio/postgres-elastic-integration
- Owner: multiprocessio
- Created: 2022-04-21T17:03:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T13:47:30.000Z (about 4 years ago)
- Last Synced: 2025-01-23T01:13:04.913Z (over 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostgreSQL / Elasticsearch sample data generator
## Setup
### PostgreSQL
Create user and database:
```
$ sudo su postgres
$ psql
> CREATE DATABASE ds_playground;
> CREATE USER ds_playground WITH PASSWORD 'ds_playground';
> GRANT ALL ON DATABASE ds_playground TO ds_playground;
```
Make sure you can log in with user/pass. In `/var/lib/pgsql/data/pg_hba.conf` add:
```
host ds_playground ds_playground 127.0.0.1/32 md5
host ds_playground ds_playground ::1/128 md5
```
### Elasticsearch
```
$ docker run -d -p 9200:9200 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.16.3
```
## Run
This will take a while. You'll need python3 and psycopg2.
```
$ python3 generate.py
```