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

Connect to external password protected Elastic node on AWS #211

Closed
Nielex opened this issue Nov 19, 2016 · 11 comments
Closed

Connect to external password protected Elastic node on AWS #211

Nielex opened this issue Nov 19, 2016 · 11 comments

Comments

@Nielex
Copy link

Nielex commented Nov 19, 2016

I'm testing with a external ElasticSearch node on AWS. Now I'm trying to connect to it from Magento2, but the node needs basic password authentication.

How do I configure my credentials in the Smile Module so I'can use this node?

@afoucret
Copy link
Contributor

Currently it is not supported by ElasticSuite.
My advice would be to not use authentication for ES and to rely on the VPC feature of AWS instead in order to secure your cluster.

@afoucret
Copy link
Contributor

I don't close the issue since we will implement it sometime.
Additionally, it will allow to handle clusters hosted by Elastic (Elastic Cloud offer).

@Nielex
Copy link
Author

Nielex commented Nov 21, 2016

I could connect to AWS with basic authenthication in the url:

http://user:password@url:port

That works fine. The issue I had, was that the ElasticSearch instance I used was running on ElasticSearch 5. With ElasticSearch 5, I got an error on the handler when I'm running the indexer:

"No handler found for uri [/default_catalog_category_20161121_111244] and method [POST]"

I thought the authentication was trowing this error, but its the ElasticSearch version. SO my conclusion is that ElasticSuite isn't compatible with ElasticSearch 5. Is compatibility with version 5 planned in the future?

@Nielex
Copy link
Author

Nielex commented Nov 21, 2016

@afoucret

I did a bit of work this afternoon and I think I build the basic password authentication with configurable options in the system config. It works for my Elasticsearch instance. I'll create a pull request if your interested.

@afoucret
Copy link
Contributor

afoucret commented Nov 21, 2016

Hi @Nielex,

ES 5.x is planned, but we have to work on the module compatibility. One of the most difficult part of the job is to update the ES PHP Client to the 5.x version. While it is not a huge problem for the community edition of Magento, the enterprise one requires a 2.x client. As we want provide support for Magento EE, we will need to find a way. We will have to work with Magento team in order to get this achieved.

@Nielex
Copy link
Author

Nielex commented Nov 22, 2016

Hi @afoucret,

Tnx for the update. I'm looking forward to Elastic 5 support. But no hurry, Elastic 2.4 is still working fine for me. And I love this module, it still is getting better and better.

@afoucret
Copy link
Contributor

PR #218 have been merged into 2.3.x and master branches.

@Nielex : I refactored the code a little. You can test it again with my modification. If everything goes fine, we will close this issue.

Thx for the contrib.

@afoucret
Copy link
Contributor

FYI : will be part of the upcoming 2.3.0 stable release.

@afoucret
Copy link
Contributor

@Nielex : any feedback about this one ?

@Nielex
Copy link
Author

Nielex commented Nov 29, 2016

Hi @afoucret,

Sorry for my late response. I didn't had to chance to response earlier. But your refactoring was very nice, I learned a lot from it. And it works fine, so I'm looking forward to next 2.3.0 release to see this implemented.

Tnx for your quick review on my pull request. I'm looking forward to contribute more in the future.

@afoucret
Copy link
Contributor

Hi @Nielex,

Glad to see it have worked. Once again thank you for the contrib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants