<commit_before>= apiman - Installation Guide
:homepage: http://apiman.io/
:doctype: book

== Installation
This guide provides detailed information about how to install and configure apiman.

=== Installing in WildFly 8
The apiman project primarily targets WildFly 8 as a runtime environment.  In order to install
apiman you will need to download both WildFly 8 and the apiman overlay distribution.  Once
both are downloaded, it's a simple matter of unpacking both into the same location.

==== Download
First you will need to download both WildFly 8 and apiman:

* http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip[Download WildFly 8]
* http://downloads.jboss.org/apiman/1.1.5.Final/apiman-distro-wildfly8-1.1.5.Final-overlay.zip[Download apiman 1.1.5.Final]

....
curl http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip -o wildfly-8.2.0.Final.zip
curl http://downloads.jboss.org/apiman/1.1.5.Final/apiman-distro-wildfly8-1.1.5.Final-overlay.zip -o apiman-distro-wildfly8-1.1.5.Final-overlay.zip
....

==== Unpack
Once both files have been downloaded, simply unpack both in the same location.

....
unzip wildfly-8.2.0.Final.zip
unzip -o apiman-distro-wildfly8-1.1.5.Final-overlay.zip -d wildfly-8.2.0.Final
....

==== Run WildFly 8
The apiman overlay contains everything needed to run apiman, including:

* apiman binaries (several WAR files)
* apiman-specific WildFly 8 configuration (*standalone-apiman.xml*)
* apiman rdbms datasource (h2)
* pre-configured *admin* user with password *<PASSWORD>!*
* pre-configured h2 database for the API Manager (populated with default values)

For this reason, there is no additional configuration required to run apiman.  Simply start up
WildFly using the apiman configuration file:

....
cd wildfly-8.2.0.Final
./bin/standalone.sh -c standalone-apiman.xml
....


=== Installing using Docker
Another option when installing apiman is to use our docker image.  You're probably pretty
familiar with docker if you're going that route, but here is an example of how to start up
the apiman docker image:

....
docker pull jboss/apiman-wildfly
docker run -it -p 8080:8080 jboss/apiman-wildfly
....

[NOTE]
====
You can find apiman on https://registry.hub.docker.com/repos/apiman/[docker hub].
====

== Logging In
Once apiman is running, you should be able to log in to the API Manager by pointing your
browser at the following URL:

....
http://localhost:8080/apimanui/
....

You may log in with credentials *admin/admin<PASSWORD>!*.
[NOTE]
====
We strongly advise that you immediately change the Keycloak admin user password, as well<commit_msg>also port map 8443<commit_after>= apiman - Installation Guide
:homepage: http://apiman.io/
:doctype: book

== Installation
This guide provides detailed information about how to install and configure apiman.

=== Installing in WildFly 8
The apiman project primarily targets WildFly 8 as a runtime environment.  In order to install
apiman you will need to download both WildFly 8 and the apiman overlay distribution.  Once
both are downloaded, it's a simple matter of unpacking both into the same location.

==== Download
First you will need to download both WildFly 8 and apiman:

* http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip[Download WildFly 8]
* http://downloads.jboss.org/apiman/1.1.5.Final/apiman-distro-wildfly8-1.1.5.Final-overlay.zip[Download apiman 1.1.5.Final]

....
curl http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip -o wildfly-8.2.0.Final.zip
curl http://downloads.jboss.org/apiman/1.1.5.Final/apiman-distro-wildfly8-1.1.5.Final-overlay.zip -o apiman-distro-wildfly8-1.1.5.Final-overlay.zip
....

==== Unpack
Once both files have been downloaded, simply unpack both in the same location.

....
unzip wildfly-8.2.0.Final.zip
unzip -o apiman-distro-wildfly8-1.1.5.Final-overlay.zip -d wildfly-8.2.0.Final
....

==== Run WildFly 8
The apiman overlay contains everything needed to run apiman, including:

* apiman binaries (several WAR files)
* apiman-specific WildFly 8 configuration (*standalone-apiman.xml*)
* apiman rdbms datasource (h2)
* pre-configured *admin* user with password *<PASSWORD>!*
* pre-configured h2 database for the API Manager (populated with default values)

For this reason, there is no additional configuration required to run apiman.  Simply start up
WildFly using the apiman configuration file:

....
cd wildfly-8.2.0.Final
./bin/standalone.sh -c standalone-apiman.xml
....


=== Installing using Docker
Another option when installing apiman is to use our docker image.  You're probably pretty
familiar with docker if you're going that route, but here is an example of how to start up
the apiman docker image:

....
docker pull jboss/apiman-wildfly
docker run -it -p 8080:8080 -p 8443:8443 jboss/apiman-wildfly
....

[NOTE]
====
You can find apiman on https://registry.hub.docker.com/repos/apiman/[docker hub].
====

== Logging In
Once apiman is running, you should be able to log in to the API Manager by pointing your
browser at the following URL:

....
http://localhost:8080/apimanui/
....

You may log in with credentials *admin/admin123!*.
[NOTE]
====
We strongly advise that you immediately change the Keycloak admin user password, as well
{'fraction_non_alphanumeric': 0.11320754716981132, 'fraction_numerical': 0.02954068991804841, 'mean_word_length': 3.9092609915809167, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2874885', 'n_tokens_mistral': 1807, 'n_tokens_neox': 1656, 'n_words': 584}