Import json data to hosted elasticsearch

Earlier I imported the data to locally running Elastic (via Docker) But others in my team could not run Docker on their machines, so we decided to use a hosted Elastic server. The steps to import the data were the same. Well, almost. Because this was a hosted instance, it would not allow operations without authentication. I got the following error: dump ended with error (get phase) => UNAUTHORIZED: {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}},"status":401} It took me a while to figure it out, but I did.

Continue Reading »

Import data from Dockerized Postgres to Elasticsearch

After setting up Elasticsearch locally I need to seed it with some dummy data. I came across this article that explain all the steps in details, including populating the postgres with dummy data to begin with. But I could not use it as-is because I use dockerized postgres. I also ran into problem with https and elasticdump I wrote about the problems and solutions on my other blog. Read it here

Setup Elastic Search Locally via Docker

This is the first time I’m setting up elasticsearch While one can set it up natively via brew I have learnt longtime ago to use docker for complex, server type applications. Elastic search’s official document also suggests the docker in their Getting Started. I’ve made summary of the steps on my PKM. Search elastic on the site, since URLs are likely to change. Important thing : Create a local user (I called it dev) and make it superuser

Continue Reading »