Make Elasticsearch configuration more accessible and consistent
Currently to configure Elasticsearch for GitLab involves several tasks and isn't consistent with how other features are typically configured in the /etc/gitlab/gitlab.rb
file.
In more detail the way to set up Elasticsearch involves roughly the following:
- Set the Elasticsearch URL via Web UI or API
- Create an empty index for GitLab via a rake task on the command line
- Start indexing via Web UI or rake task
- Enable Search via Web UI or API
It would be much more consistent and smoother for users if the majority of the above was doable in our config instead of having to jump between Web UI \ API and Rake tasks (although index creation would either still be a task or handled automatically by GitLab perhaps). In addition, the current process makes it harder for the Quality to automate the setup and consequently reduces its testability.