:snapshot: 1.26.5-SNAPSHOT
:stable: 1.24.1
:current: {stable}

== upNGizr

*upNGizr* is a privileged Tomcat web-application that is able to update your appNG instance including appNGizer.

Therefore, it *must* be deployed in the same Tomcat installation as appNG itself.

WARNING: Currently, *upNGizr* is considered [big red]*experimental*, so it's not recommended to be used in production environments.

WARNING: *upNGizr* does not support clustered environments!


=== Installation
Just drop `uppNGizr.war` into your Tomcat's `webapps` folder and you are read to go.

=== Usage
First, check if the desired version is available at http://localhost:8080/upNGizr/checkVersionAvailable/{current}.

To update your appNG installation, then go to http://localhost:8080/upNGizr/update/start/{current} and press the button "Update to {current}".


=== Configuration

The following configuration parameters are available, add them as `<context-param>` to `WEB-INF/web.xml`:

Example:
[source,xml]
----
<context-param>
    <param-name>blockRemoteIPs</param-name>
    <param-value>false</param-value>
</context-param>
----

==== buildRepository
Default: `https://appng.org/appng/builds/{build}/`

The URI pointing to the location where the appNG artifacts reside. This can be another (proxy) server or even a path in the file system (use file-protocol in this case).
Note that `{build}` is replaced with either `stable` or `snapshot`, depending on the version you want to update to.)

If you want to use a *Maven repository* as the source for the artifacts, you can do this by specifying `buildRepository` as follows:

[source,xml]
----
<context-param>
    <param-name>buildRepository</param-name>
    <param-value>http://repo1.maven.org/maven2/org/appng/appng-application/{version}/</param-value>
</context-param>
----
NOTE: The placeholder `{version}` is being replaced with the version you try to install.

You can also use the *local filesystem*:

[source,xml]
----
<context-param>
    <param-name>buildRepository</param-name>
    <param-value>file:///path/to/appng-artifacts/</param-value>
</context-param>
----


==== replaceBin
Default: `false`

Whether or not `WEB-INF/bin` should be replaced during the update.

==== blockRemoteIPs
Default: `true`

For security reasons, by default, upNGizr only allows requests originating from the local machine. Set to `false` to also allow remote origins. 

[WARNING]
====
In this case, further actions to secure upNGizr are required, e.g. using basic authentication (enable the  `<security-contraint>` in `web.xml`) or due to some firewall rules.
====

==== useFQDN
Default: `false`

Whether to use the fully-qualified domain name (FQDN) of the host in the responses (instead of https://docs.oracle.com/javaee/7/api/javax/servlet/ServletRequest.html#getServerName--[ServletRequest.getServerName()^]). 
