This guide describes how to setup appNG with the appNGizer.

All PUT and POST requests have to use the header Content-Type=text/xml. The single exception is the login, where text/plain must be used.

1. Login

The appNG platform property sharedSecret is needed to login into appNGizer. The client needs to accept cookies to proceed after login.

METHOD: POST

BODY:

<sharedSecret>

2. Enable messaging

METHOD: PUT

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<property xmlns="http://www.appng.org/schema/appngizer" name="messagingEnabled">
    <value>true</value>
    <defaultValue>false</defaultValue>
    <description>Set to true to enable cluster messaging</description>
</property>

METHOD: PUT

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<property xmlns="http://www.appng.org/schema/appngizer" name="messagingReceiver">
    <value>org.appng.core.controller.messaging.RabbitMQReceiver</value>
    <defaultValue>org.appng.core.controller.messaging.MulticastReceiver</defaultValue>
    <description>Define messaging implementation by referring class name. Default method is multicast </description>
</property>

3. Set required platform properties for messaging

In the example we use RabbitMQ as message broker.

METHOD: POST

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<property xmlns="http://www.appng.org/schema/appngizer" name="rabbitMQHost">
    <value></value>
    <defaultValue>192.168.0.188</defaultValue>
    <description>the host for RabbitMQ</description>
</property>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<property xmlns="http://www.appng.org/schema/appngizer" name="rabbitMQUser">
    <value></value>
    <defaultValue>appng</defaultValue>
    <description>the user for RabbitMQ</description>
</property>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<property xmlns="http://www.appng.org/schema/appngizer" name="rabbitMQPassword">
    <value></value>
    <defaultValue>s3cr3t</defaultValue>
    <description>the password for RabbitMQ</description>
</property>

4. Create a Repository

METHOD: POST

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<repository xmlns="http://www.appng.org/schema/appngizer" name="Remote">
    <remoteName>pdev0-all</remoteName>
    <uri>http://appng.s-ait-p-dev0.aitintra.de/service/appng/appng-manager/soap/repositoryService</uri>
    <enabled>true</enabled>
    <strict>false</strict>
    <published>false</published>
    <mode>ALL</mode>
    <type>REMOTE</type>
</repository>

5. Install appng-authentication

METHOD: PUT

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<package xmlns="http://www.appng.org/schema/appngizer" name="appng-authentication">
    <displayName>Authentication</displayName>
    <version>0.9.3</version>
    <timestamp>20150710-1037</timestamp>
    <installed>false</installed>
    <type>APPLICATION</type>
</package>

5.1. Make it a hidden privileged application

METHOD: PUT

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application xmlns="http://www.appng.org/schema/appngizer" name="appng-authentication">
    <displayName>Authentication</displayName>
    <core>true</core>
    <fileBased>true</fileBased>
    <hidden>true</hidden>
    <version>0.9.3</version>
</application>

6. Install appng-manager

METHOD: PUT

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<package xmlns="http://www.appng.org/schema/appngizer" name="appng-manager">
    <displayName>Manager</displayName>
    <version>0.12.1</version>
    <timestamp>20170426-0634</timestamp>
    <installed>false</installed>
    <type>APPLICATION</type>
</package>

6.1. Make it a privileged application

METHOD: PUT

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application xmlns="http://www.appng.org/schema/appngizer" name="appng-manager">
        <displayName>Manager</displayName>
        <core>true</core>
        <fileBased>true</fileBased>
        <hidden>false</hidden>
        <version>0.12.1</version>
</application>

7. Install appng template

METHOD: PUT

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<package xmlns="http://www.appng.org/schema/appngizer" name="appng-template">
    <displayName>appng</displayName>
    <version>0.14.2</version>
    <timestamp>20170620-0832</timestamp>
    <installed>false</installed>
    <type>TEMPLATE</type>
</package>

8. Create a Site

METHOD: POST

BODY:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<site xmlns="http://www.appng.org/schema/appngizer" name="manager">
    <host>localhost</host>
    <domain>http://localhost:8080</domain>
    <active>true</active>
</site>

9. Assign applications to the site

10. Create a user

METHOD: POST

BODY:

<subject xmlns="http://www.appng.org/schema/appngizer" name="admin">
    <realName>appNG Administrator</realName>
    <email>admin@appng.org</email>
    <description></description>
    <digest>s3cr3t</digest>
    <timeZone>Europe/Berlin</timeZone>
    <language>en</language>
    <type>LOCAL_USER</type>
    <groups>
            <!-- assign user to the built-in Administrators group -->
        <group name="Administrators" />
    </groups>
</subject>

11. Restart appNG

12. Login into Site

Visit

and login with the user created in the step before

13. Trigger a site reload

METHOD: PUT

Visit http://localhost:8080/manager/manager/appng-manager/sites to see how the startup time of the manager site changed!