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

Kevin Minder edited comment on KNOX-670 at 2/10/16 7:36 PM:
------------------------------------------------------------

This attached patch 
[KNOX-670_002.patch|https://issues.apache.org/jira/secure/attachment/12787314/KNOX-670_002.patch]
 is a step beyond the 001 version.  It more fully integrates the applications 
with the topology model.  In particular with this patch you must explicitly 
reference an application for it to be deployed.  Here is an overview of how it 
works.

First you need to have an application in {{conf/applications}}.  This can 
either be an exploded WAR format directory that contains and application or a 
WAR format archive file.  So you may for example have sample.war stored there 
{{conf/applications/sample.war}}.

Next you would reference the application from within a topology file.  This 
reference is made via a new {{<application>}} tag.  A subtag {{<name>}} 
identifies the name of the application from within {{conf/applications}} to be 
deployed.  So consider a topology file {{conf/topologies/green.xml}} that 
contained this:
{code:xml}
<topology>
    <application>
        <name>sample</name>
    </application>
</topology>
{code}
This would deploy the application from {{conf/applications/sample.war}} and 
make it available at {{https://localhost:8443/gateway/green/sample}}.  The 
current convention being that the base name of application is used as the 
context path.

A few things to note:
1. Currently a topology file can contain only a single application.
2. Currently a topology file can contain only a single application or services.

All of the the provider features configured via the {{<gateway>}} section of 
the topology file can be used and will be applied "in front of" the application 
processing.  For example:
{code:xml}
<topology>
    <gateway>
        ...
    </gateway>
    <application>
        <name>sample</name>
    </application>
</topology>
{code}

The application directory/archive (e.g. {{conf/applications/sample.war}} or 
{{conf/applications/sample}} can contain {{service.xml}} and {{rewrite.xml}} 
file identical to those used by service definitions.  If these are not found 
defaults are provided.  For {{service.xml}}, essentially all routes are mapped 
(i.e. {{/?\*\*}} and {{/\*\*?\*\*}}).  For {{rewrite.xml}}, no rules are 
defined.


was (Author: kminder):
This attached patch 
[KNOX-670_002.patch|https://issues.apache.org/jira/secure/attachment/12787314/KNOX-670_002.patch]
 is a step beyond the 001 version.  It more fully integrates the applications 
with the topology model.  In particular with this patch you must explicitly 
reference an application for it to be deployed.  Here is an overview of how it 
works.

First you need to have an application in {{conf/applications}}.  This can 
either be an exploded WAR format directory that contains and application or a 
WAR format archive file.  So you may for example have sample.war stored there 
{{conf/applications/sample.war}}.

Next you would reference the application from within a topology file.  This 
reference is made via a new {{<application>}} tag.  A subtag {{<name>}} 
identifies the name of the application from within {{conf/applications}} to be 
deployed.  So consider a topology file {{conf/topologies/green.xml}} that 
contained this:
{code:xml}
<topology>
    <application>
        <name>sample</name>
    </application>
</topology>
{code}
This would deploy the application from {{conf/applications/sample.war}} and 
make it available at {{https://localhost:8443/gateway/green/sample}}.  The 
current convention being that the base name of application is used as the 
context path.

A few things to note:
1. Currently a topology file can contain only a single application.
2. Currently a topology file can contain only a single application or services.

All of the the provider features configured via the {{<gateway>}} section of 
the topology file can be used and will be applied "in front of" the application 
processing.  For example:
{code:xml}
<topology>
    <gateway>
        ...
    </gateway>
    <application>
        <name>sample</name>
    </application>
</topology>
{code}
{code}

The application directory/archive (e.g. {{conf/applications/sample.war}} or 
{{conf/applications/sample}} can contain {{service.xml}} and {{rewrite.xml}} 
file identical to those used by service definitions.  If these are not found 
defaults are provided.  For {{service.xml}}, essentially all routes are mapped 
(i.e. {{/?\*\*}} and {{/\*\*?\*\*}}).  For {{rewrite.xml}}, no rules are 
defined.

> 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