-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[#10955] Add documentation for Datastore emulator and Solr setup #10958
[#10955] Add documentation for Datastore emulator and Solr setup #10958
Conversation
docs/datastore-emulator-setup.md
Outdated
1. Sometimes the recommended emulator setup in [wiki](https://github.com/objectify/objectify/wiki/Setup#initialising-the-objectifyservice-to-work-with-emulator-applies-to-v6) might not work with `Exiting due to exception: java.io.IOException: Failed to bind`. | ||
|
||
**Solution:** | ||
In that case, try out some other localhost ports such as `gcloud beta emulators datastore start --host-port=localhost:8482`. | ||
Also change `DatastoreOptions.setHost()` parameter in `src/main/java/teammates/storage/api/OfyHelper.java` accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error is due to the emulator not shutting down properly, which leaves a process running in port 8484
. Since we have fixed the port number in build.template.properties
to port 8484
, I guess we should change this part?
To kill the dangling process in port 8484
we can find its process id with the command lsof -i tcp:8484
, and kill it with kill -9 <PID>
, and then re-run gcloud beta emulators datastore start --host-port=localhost:8484
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jianhandev Right, you can go ahead and co-author on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, will add in some other details also and seek your review afterwards.
docs/development.md
Outdated
|
||
### Steps to local setup | ||
**1. Installing the Datastore Emulator** | ||
After you have installed the [Google Cloud SDK](https://cloud.google.com/sdk/docs/install) which contains the `gcloud` tool, the datastore emulator can be installed by running the command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if relevant to this PR, but just wondering if we could have these run as gradle tasks? I remember devs previously would have to setup google cloud sdk for deployment but @wkurniawan07 did some magic with gradle and that requirement was removed. Now it's being brought back so just checking if alternatives have been considered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the magic from App Engine plugin, not anywhere near anything done by me. Datastore emulator is however an entirely different product, so it looks like Google Cloud SDK becomes a necessity once again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
95a2b4e
to
f768ad3
Compare
I fetched this branch and tried running |
@jianhandev what makes you claim that the emulator is not running? Just because the build terminates doesn't mean there is no Datastore running. |
Maybe I missed out something here, but after running the
Are there any preliminary steps we should take before running the |
Other than having the Also, does your component tests pass? It is the exact same setup, other than the store-on-disk setup (which could be the make-or-break factor). |
I tried out this setup. Component tests are passing. |
Unfortunately this doesn't count as confirmation, because component tests are using its own setup from the beginning. What I said previously was if the setup didn't work there's a likelihood that the component tests setup didn't work either, but getting the component tests to pass also doesn't necessarily mean that the setup will work. |
Performed E2E tests locally, they pass as well. |
744d365
to
92790b9
Compare
@wkurniawan07 @Derek-Hardy @jianhandev what is the status of this PR? |
There are still some pending changes to be made, I think we agreed to leave this PR open and update it along the way. |
…r starting back-end dev server
04c864d
to
0648ef6
Compare
@jianhandev I took the opportunity to reorganize the information and reduce verbosity. See if they are understandable enough for newcomers? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes looks good to me, just a small comment to clarify things a bit:
Part of #10955
Task List:
datastore emulator
setup instruction as part of developer documentation