Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Start and stop ES using runAll hooks #87

Open
ignasi35 opened this issue May 23, 2017 · 11 comments
Open

Start and stop ES using runAll hooks #87

ignasi35 opened this issue May 23, 2017 · 11 comments
Labels
maintenance Upgrading Lagom potentially caused the issue. status:backlog

Comments

@ignasi35
Copy link
Contributor

Using the new feature (lagom/lagom#762) allowing start and stop code to be hooked to runAll, it'd be useful to take elasticsearch in online-auction as an example for the feature.

@lakhina
Copy link
Contributor

lakhina commented May 24, 2017

@ignasi35 As per I can understand from context what we will need to do is

  1. Check if ES of proper version is available to run. if not then download and install it.
  2. Check if ES is already running.
  3. If ES is not running then start the new instance.
  4. Clean instance if ant cleaning needed to be done.
  5. Stop ES when sbt is being terminated.

Please let me know which of these should exist in process and which are not needed. Also let me know if I missed something.

@ignasi35
Copy link
Contributor Author

I think the example in the PR is quite illustrative: https://github.com/lagom/lagom/pull/763/files#diff-69be132232784c54f9b1cdfc434186af

I would build from that:

  1. if the folder target/elasticsearch-5.0.2 doesn't exist, download and unzip there
  2. don't check if it's already running and just execute the start command. It will fail on start and the user will have to deal with that.
  3. if sbt clean is invoked, all target folder is removed so no need to add any code there.

Does that make sense?

@lakhina
Copy link
Contributor

lakhina commented May 24, 2017

@ignasi35 Where should we download ES so that it do not have to be re downloaded every time after sbt clean

@ignasi35
Copy link
Contributor Author

ignasi35 commented May 24, 2017 via email

@lakhina
Copy link
Contributor

lakhina commented May 25, 2017

@ignasi35 With which version of lagom comes the lagomInfrastructureServices. I am not able to find it on lagom 1.3.4

@lakhina
Copy link
Contributor

lakhina commented May 25, 2017

@ignasi35 I have made the following changes in my build.sbt

Where am I going wrong?

@ignasi35
Copy link
Contributor Author

Hi @lakhina the feature is only available in master which means you will only see it if you compile lagom locally and make your PR depend on 1.4.0-SNAPSHOT.

@lakhina
Copy link
Contributor

lakhina commented May 29, 2017

@ignasi35 So should I upgrade online-auction to 1.4.0-SNAPSHOT or I should wait for this feature to come in stable version?

@lakhina
Copy link
Contributor

lakhina commented May 29, 2017

Realized just now that SNAPSHOT do not exist as remote lib so I guess we should wait for stable version to add this feature to online auction. What do you say?

@ignasi35
Copy link
Contributor Author

This will not be mergeable until 1.4.0 is out, but in the meantime you can clone lagom/lagom and use publishLocal in sbt to test your changes. ;-)

@lakhina
Copy link
Contributor

lakhina commented May 29, 2017

@ignasi35 okay thanks. I am on it

@ignasi35 ignasi35 added the maintenance Upgrading Lagom potentially caused the issue. label Mar 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintenance Upgrading Lagom potentially caused the issue. status:backlog
Development

No branches or pull requests

3 participants