Skip to content

Zeppelin 337 configurable context path (2)#429

Closed
echarles wants to merge 4 commits into
apache:masterfrom
echarles:ZEPPELIN-337-Configurable-ContextPath
Closed

Zeppelin 337 configurable context path (2)#429
echarles wants to merge 4 commits into
apache:masterfrom
echarles:ZEPPELIN-337-Configurable-ContextPath

Conversation

@echarles
Copy link
Copy Markdown
Member

Allow to configure the context path of the webapp via zeppelin.server.context.path property or ZEPPELIN_SERVER_CONTEXT_PATH env variable + documentation for this.

(replaces #385)

@echarles
Copy link
Copy Markdown
Member Author

Travis fails with
09:59:03,926 INFO org.apache.zeppelin.rest.AbstractTestRestApi:247 - Connecting to http://localhost:8080/api/
09:59:03,929 INFO org.apache.zeppelin.rest.AbstractTestRestApi:252 - 404 - Not Found

On my laptop, mvn clean package -DskipTests -Phadoop-2.3 -Ppyspark -B on this branch runs successfully.

@jongyoul
Copy link
Copy Markdown
Member

@echarles Your command passes the tests so you can build this but AbstractTestRestApi fails because that doesn't fix https://github.com/apache/incubator-zeppelin/blob/0a82a93ce495cf537b28104a024a8c0361fd80ac/zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java#L52, too. And I have a basic question. Why do you need this feature as I commented https://issues.apache.org/jira/browse/ZEPPELIN-337.

@echarles
Copy link
Copy Markdown
Member Author

@jongyoul just pushed an update and check is now successful.

It is common practice to define the context path in any webapp. Sometimes you don't have a proxy (nginx...) in front and still you want to deploy and answer requests on a defined url base.

@jongyoul
Copy link
Copy Markdown
Member

@echarles Thanks for fixing it. Concerning use case, not using nginx, I don't think it's possible to serve saperate Zeppelin instance with, for example, http://some-domain/zeppelin_user1 and http://some-domain/zeppelin_user2 because each Zeppelin has a different port for listening to. Url based deployments is a proper solution for multi user but do you have to launch two Zeppelin instance with two different ports without Nginx? I think only it's possible to serve http://some-domain:port1/zeppelin_user1 and http://some-domain:port2/zeppelin_user2 - actually, zeppelin_user2 is not a mandatory. Without regard to this issue, I'm curious to serve two Zeppelin instance with same port without Nginx. Could you please share your case?

@echarles
Copy link
Copy Markdown
Member Author

@jongyoul my intent here is not directly linked to serving different user. I just need to have zeppelin respond to a well defined context path.

@Leemoonsoo
Copy link
Copy Markdown
Member

@jongyoul Is it good to go?

@jongyoul
Copy link
Copy Markdown
Member

@Leemoonsoo Sure. Ready to merge.

@Leemoonsoo
Copy link
Copy Markdown
Member

I have tested it and it working well.
However, when i create package using -Pbuild-distr maven profile, it does not work correctly.

@echarles Could you take a look?

@jongyoul
Copy link
Copy Markdown
Member

Oops. I'll check it, too.

@echarles
Copy link
Copy Markdown
Member Author

@jongyoul @Leemoonsoo Thank you for reviewing this and pointing remaining issues.

I have fixed the behavior in the distribution package (simply calling the setContextPath before the check warPath.isDirectory()) and pushed 37e07f9. It now works in IDE, simple repo and distibution modes.

Travis build is happy. Can please you recheck and send any feedback?

@Leemoonsoo
Copy link
Copy Markdown
Member

Tested and working nicely both with/without -Pbuild-distr

LGTM

@Leemoonsoo
Copy link
Copy Markdown
Member

Merge if there're no more discussions.

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.

3 participants