[ 
https://issues.apache.org/jira/browse/KNOX-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142070#comment-15142070
 ] 

Kevin Minder edited comment on KNOX-670 at 2/11/16 12:54 AM:
-------------------------------------------------------------

For the next phase I'm considering allowing the mixing of <service> and 
<application> within a topology as requested by [~lmccay].  I originally 
restricted this because I was trying to solve the "single application topology" 
and avoid potential confusion between applications and services trying to bind 
to the same paths.  I particular I want to ensure that a sample.war application 
can easily be made accessible from a topology file conf/topologies/sample.xml 
at https://localhost:8443/gateway/sample without any confusion.  For the next 
phase I'm considering adding a <context> to <application>.
{code}
<topology>
    <application>
        <name>sample</name>
        <context>example</context>
    </application>
</topology>
{code}
This will result in the sample.war being available at 
https://localhost:8443/gateway/sample/example.  This could also be specified as 
<context>/example</context>.  However specifying a blank or / context will make 
the application available at the root.
{code:xml}
<topology>
    <application>
        <name>sample</name>
        <context>/</context>
    </application>
</topology>
{code}
This will result in the sample.war being available at 
https://localhost:8443/gateway/sample
There will of course need to be validation done to ensure that no two <context> 
settings within a given topology have the same value.  In addition I do not 
believe that a blank or root context should be allowed in a topology with mixed 
services and applications.

So a more complex topology conf/topologies/sandbox.xml might now look like this:
{code:xml}
<topology>
    <gateway>
        ...
    </gateway>
    <application>
        <name>idp</name> <!-- conf/applications/idp.war (Shibboleth)-->
        <context>/sso</context> <!-- https://localhost:8443/gateway/sandbox/sso 
-->
    </application>
    <application>
        <name>knoxlogin</name> <!-- conf/applications/knoxlogin.war -->
        <context>/login</context> <!-- 
https://localhost:8443/gateway/sandbox/login -->
    </application>
    <application>
        <name>testpage</name> <!-- conf/applications/testpage.war -->
        <!-- https://localhost:8443/gateway/sandbox/testpage -->
    </application>
    <service>
        <role>WEBHDFS</role>
        <url>...</url>
    </service>
</topology>
{code}
Note that if <context> is not present as with the testpage example then the 
context defaults to name.



was (Author: kminder):
For the next phase I'm considering allowing the mixing of <service> and 
<application> within a topology as requested by [~lmccay].  I originally 
restricted this because I was trying to solve the "single application topology" 
and avoid potential confusion between applications and services trying to bind 
to the same paths.  I particular I want to ensure that a sample.war application 
can easily be made accessible from a topology file conf/topologies/sample.xml 
at https://localhost:8443/gateway/sample without any confusion.  For the next 
phase I'm considering adding a <context> to <application>.
{code}
<topology>
    <application>
        <name>sample</name>
        <context>example</context>
    </application>
</topology>
{code}
This will result in the sample.war being available at 
https://localhost:8443/gateway/sample/example.  This could also be specified as 
<context>/example</context>.  However specifying a blank or / context will make 
the application available at the root.
{code:xml}
<topology>
    <application>
        <name>sample</name>
        <context>/</context>
    </application>
</topology>
{code}
This will result in the sample.war being available at 
https://localhost:8443/gateway/sample
There will of course need to be validation done to ensure that no two <context> 
settings within a given topology have the same value.  In addition I do not 
believe that a blank or root context should be allowed in a topology with mixed 
services and applications.

So a more complex topology might now look like this:
{code:xml}
<topology>
    <gateway>
        ...
    </gateway>
    <application>
        <name>idp</name> <!-- conf/applications/idp.war (Shibboleth)-->
        <context>/sso</context> <!-- https://localhost:8443/gateway/sandbox/sso 
-->
    </application>
    <application>
        <name>knoxlogin</name> <!-- conf/applications/knoxlogin.war -->
        <context>/login</context> <!-- 
https://localhost:8443/gateway/sandbox/login -->
    </application>
    <application>
        <name>testpage</name> <!-- conf/applications/testpage.war -->
        <!-- https://localhost:8443/gateway/sandbox/testpage -->
    </application>
    <service>
        <role>WEBHDFS</role>
        <url>...</url>
    </service>
</topology>
{code}
Note that if <context> is not present as with the testpage example then the 
context defaults to name.


> Knox Should be able to Host Simple Web Apps
> -------------------------------------------
>
>                 Key: KNOX-670
>                 URL: https://issues.apache.org/jira/browse/KNOX-670
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>            Reporter: Larry McCay
>            Assignee: Kevin Minder
>             Fix For: 0.9.0
>
>         Attachments: KNOX-670_001.patch, KNOX-670_002.patch
>
>
> I think that we need the ability to serve up arbitrary web app resources. 
> Given a conf/applications along side conf/topologies, we should be able to 
> spin up a simple application that can be used as a central login facility 
> with KnoxSSO, a management UI or any number of simple applications.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to