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

Make nomulus work locally #2349

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Make nomulus work locally #2349

merged 1 commit into from
Mar 11, 2024

Conversation

jianglai
Copy link
Collaborator

@jianglai jianglai commented Mar 5, 2024

Chose the default transaction manager based on RegistryEnvironment. This
makes it possible to run nomulus on Jetty locally. Tested with the
following:

./gradle :jetty:run -Penvironment=alpha
curl http://localhost:8080/beta.app

The docker image is also updated to take an argument that specifies the
environment. It runs locally as well but the container doesn't get
access to locally stored credentials, so it fails to initialize the
transaction manager.


This change is Reviewable

Copy link
Collaborator Author

@jianglai jianglai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jianglai)

Copy link
Collaborator Author

@jianglai jianglai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ptkach)

Copy link
Collaborator

@ptkach ptkach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 7 files at r1, 2 of 3 files at r2, 2 of 2 files at r3.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @gbrodman and @jianglai)


jetty/start.sh line 18 at r3 (raw file):

environment=$1
cd /jetty-base
java -jar /usr/local/jetty/start.jar -Dgoogle.registry.environment=${environment:-"alpha"}

It seems a little weird to me that we consider "alpha" to be a local environment. Ideally we probably want to have "local" environment that's dedicated for local runs. Unless there's strong reason not to.

Code quote:

alpha

@jianglai jianglai requested a review from ptkach March 7, 2024 17:34
Copy link
Collaborator Author

@jianglai jianglai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman and @ptkach)


jetty/start.sh line 18 at r3 (raw file):

Previously, ptkach (Pavlo Tkach) wrote…

It seems a little weird to me that we consider "alpha" to be a local environment. Ideally we probably want to have "local" environment that's dedicated for local runs. Unless there's strong reason not to.

Well, it depends on what we mean by "local". Since the workload can run anywhere, the environment here only just determines which config file to load, which in turn decides things like the URL to the Cloud SQL instance for that environment.

So unless we want to set up SQL locally, we really have to point to one of the Cloud environment for us to run the WAR or the image locally.

Copy link
Collaborator

@ptkach ptkach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @gbrodman)

@jianglai jianglai removed the request for review from gbrodman March 11, 2024 15:11
Chose the default transaction manager based on RegistryEnvironment. This
makes it possible to run nomulus on Jetty locally. Tested with the
following:

```bash
./gradle :jetty:run -Penvironment=alpha
curl http://localhost:8080/beta.app
```

The docker image is also updated to take an argument that specifies the
environment. It runs locally as well but the container doesn't get
access to locally stored credentials, so it fails to initialize the
transaction manager.
@jianglai jianglai added this pull request to the merge queue Mar 11, 2024
Merged via the queue into google:master with commit 1fb27fc Mar 11, 2024
8 checks passed
@jianglai jianglai deleted the jpa branch March 11, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants