You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/05/08 01:45:25 UTC
[incubator-nlpcraft-website] branch master updated: WIP.
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft-website.git
The following commit(s) were added to refs/heads/master by this push:
new 98b9b79 WIP.
98b9b79 is described below
commit 98b9b792ba64f3dce42d9dd2c5b20509ef814cf7
Author: Aaron Radzinski <ar...@apache.org>
AuthorDate: Fri May 7 18:45:13 2021 -0700
WIP.
---
_layouts/documentation.html | 7 ++
server-and-probe.html => configuration.html | 9 +-
installation.html | 8 +-
server-and-probe.html | 136 ++--------------------------
4 files changed, 24 insertions(+), 136 deletions(-)
diff --git a/_layouts/documentation.html b/_layouts/documentation.html
index 49b26e7..d4e87e0 100644
--- a/_layouts/documentation.html
+++ b/_layouts/documentation.html
@@ -92,6 +92,13 @@ layout: interior
{% endif %}
</li>
<li>
+ {% if page.id == "configuration" %}
+ <a class="active" href="/configuration.html">Configuration</a>
+ {% else %}
+ <a href="/configuration.html">Configuration</a>
+ {% endif %}
+ </li>
+ <li>
{% if page.id == "metrics" %}
<a class="active" href="/metrics-and-tracing.html">Metrics <span class="amp">&</span> Tracing</a>
{% else %}
diff --git a/server-and-probe.html b/configuration.html
similarity index 99%
copy from server-and-probe.html
copy to configuration.html
index fe7ae09..2da2328 100644
--- a/server-and-probe.html
+++ b/configuration.html
@@ -1,7 +1,7 @@
---
-active_crumb: Server <span class="amp">&</span> Probe
+active_crumb: Configuration
layout: documentation
-id: server_and_probe
+id: configuration
---
<!--
@@ -21,7 +21,7 @@ id: server_and_probe
limitations under the License.
-->
-<div id="server-and-probes" class="col-md-8 second-column">
+<div id="configuration" class="col-md-8 second-column">
<section>
<h2 class="section-title">Overview <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
@@ -555,11 +555,8 @@ nlpcraft {
<div class="col-md-2 third-column">
<ul class="side-nav">
<li class="side-nav-title">On This Page</li>
- <li><a href="#server">REST Server</a></li>
- <li><a href="#probe">Data Probe</a></li>
<li><a href="#config">Configuration</a></li>
<li><a href="#ansi">ANSI Colors</a></li>
- <li><a href="#testing">CI Testing</a></li>
{% include quick-links.html %}
</ul>
</div>
diff --git a/installation.html b/installation.html
index 5b6034f..b057ae5 100644
--- a/installation.html
+++ b/installation.html
@@ -69,8 +69,8 @@ id: installation
By default, this external configuration is hosted on GitHub (in <code>external_config</code> branch of NLPCraft project) from where it will
be automatically downloaded on the first start: <a target="github" href="https://github.com/apache/incubator-nlpcraft/raw/external_config/external">https://github.com/apache/incubator-nlpcraft/raw/external_config/external</a>.
You can change this location, e.g. move the external configuration behind your firewall or onto your local file system,
- as well as change other parameters related to auto-download of the external configuration
- in <code>nlpcraft.conf</code> file (see <code>nlpcraft.extConfig</code> property).
+ as well as change other parameters related to auto-download of the external <a href="configuration.html">configuration</a>
+ in <code>*.conf</code> file (see <code>nlpcraft.extConfig</code> property).
</p>
</section>
<section id="ignite">
@@ -80,13 +80,15 @@ id: installation
NLPCraft uses <a target=_ href="https://ignite.apache.org/">Apache Ignite 2.x</a> project as its
underlying in-memory distributed storage and cluster computing framework. When running Apache Ignite 2.x
on Java 11 you need to follow these
- <a target=_ href="https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11">instructions.</a>
+ <a target=_ href="https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11">instructions</a> which
+ are automatically followed when you use <a href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script.
</p>
<div class="bq info">
<p>
<b>NOTE:</b> It is NOT recommended to change the version of Apache Ignite inside NLPCraft project.
</p>
</div>
+ <br/>
</section>
</div>
<div class="col-md-2 third-column">
diff --git a/server-and-probe.html b/server-and-probe.html
index fe7ae09..4a872ad 100644
--- a/server-and-probe.html
+++ b/server-and-probe.html
@@ -47,7 +47,7 @@ id: server_and_probe
<h2 class="section-sub-title">All-Inclusive JAR <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
<a href="/download.html#zip">Binary</a> NLPCraft ZIP download comes with a single executable JAR file that includes all
- necessary dependencies: <code>build/<b>apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar</b></code>.
+ necessary dependencies (except for examples): <code>build/<b>apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar</b></code>.
This single all-inclusive JAR file can be used to start any NLPCraft runtime components as standard
Java applications and includes binary classes for:
</p>
@@ -62,6 +62,12 @@ id: server_and_probe
get the <code>apache-nlpcraft-incubating-<b>{{site.latest_version}}</b>-all-deps.jar</code>
file. It will be located in <code>nlpcraft/target</code> sub-folder.
</p>
+ <h2 class="section-sub-title">Examples JARs <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
+ <p>
+ If you downloaded binary release the examples JARs are pre-built and shipped within it. They are located in <code>build/nlpcraft-examples/xxx</code> folder
+ for each <code>xxx</code> example. If you downloaded a source release you will need to run <code class="script">mvn clean package</code>
+ and examples JARs will be located in each individual module under its <code>target</code> sub-folder.
+ </p>
</section>
<section id="server">
<h2 class="section-title">REST Server <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
@@ -181,7 +187,7 @@ id: server_and_probe
</p>
<ul>
<li>
- <<a href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script automatically uses
+ <a href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script automatically uses
<code>-Xms1024m</code> for <code>start-server</code> command.
</li>
</ul>
@@ -305,129 +311,6 @@ id: server_and_probe
</div>
</div>
</section>
- <section id="config">
- <h2 class="section-title">Configuration <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
- <p>
- Both REST server and the data probe use <a target=_ href="https://github.com/lightbend/config/">Typesafe Config</a> for their configuration:
- </p>
- <ul>
- <li>Both the server and the data probe come with default configuration available in <code>build/<b>nlpcraft.conf</b></code> file.</li>
- <li>Custom configuration or default overrides can be placed into a file or provided via environment variables.</li>
- <li>Configuration files use <a target=_ href="https://github.com/lightbend/config/blob/master/HOCON.md">HOCON</a> file format.</li>
- <li>
- Server and probe configuration can be placed in the same file (as it is shipped by default in <code>build/nlpcraft.conf</code> file)
- or kept in separate files. When kept in separate files each file would have either <code>nlpcraft.server</code>
- or <code>nlpcraft.probe</code> sub-section.
- </li>
- </ul>
- <p>
- By default, when REST server or data probe start they look for <code>nlpcraft.conf</code> configuration file in the same directory
- as <code>apache-nlpcraft-incubating-<b>{{site.latest_version}}</b>-all-deps.jar</code> file and the on their classpath. You can change this behavior with
- <code>-config=path</code> parameter.
- </p>
- <h2 class="section-sub-title">Separate Configurations <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
- <p>
- Default configuration is available in <code>build/<b>nlpcraft.conf</b></code> file and it is extensively documented. It has subsections
- for the server and probe configuration. You can also separate server and probe configurations into their own
- separate files. Each file would have a subsection of configuration for either server or data probe.
- </p>
- <p>
- Server configuration file (e.g. <code>server_nlpcraft.conf</code>):
- </p>
- <pre class="brush: js">
-nlpcraft {
- server {
- ...
- }
-}
- </pre>
- <p>
- Probe configuration file (e.g. <code>probe_nlpcraft.conf</code>):
- </p>
- <pre class="brush: js">
-nlpcraft {
- probe {
- ...
- }
-}
- </pre>
- </section>
- <section id="override">
- <h2 class="section-sub-title">Custom Configuration <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
- <p>
- While you can change configuration file or files for your own needs (and use <code>-config=...</code>
- parameter described above to provide path to that file) it is often more convenient to use the default configuration file and
- change one or two properties in it. You can accomplish this by using standard
- <a target=_ href="https://github.com/lightbend/config#optional-system-or-env-variable-overrides">HOCON overriding</a>
- via environment variables:
- </p>
- <ol>
- <li>
- Set probe or server JVM system property <code>-Dconfig.override_with_env_vars=true</code> which will instruct
- configuration framework to look for external overrides.
- </li>
- <li>For each configuration property <code>x.y.z</code> set the overriding environment variable <code>CONFIG_FORCE_x_y_z=some_value</code></li>
- <li>See more details on <a target=_ href="https://github.com/lightbend/config#optional-system-or-env-variable-overrides">HOCON documentation</a>.</li>
- </ol>
- <p>
- Consider the following snippet of NLPCraft configuration:
- </p>
- <pre class="brush: js">
-nlpcraft {
- probe {
- models = "com.nlp.MyModel"
- }
-
- server {
- lifecycle = "org.apache.nlpcraft.server.lifecycle.opencensus.NCJaegerExporter"
-
- rest {
- host = "0.0.0.0"
- port = 8081
- apiImpl = "org.apache.nlpcraft.server.rest.NCBasicRestApi"
- }
- }
-}
- </pre>
- <p>
- You can override these properties with the following environment variables:
- </p>
- <p>
- <code>CONFIG_FORCE_<b>nlpcraft_server_rest_host</b>=1.2.3.4</code><br>
- <code>CONFIG_FORCE_<b>nlpcraft_server_lifecycle</b>="org.nlp.Lifecycle1, org.nlp.Lifecycle1"</code><br>
- <code>CONFIG_FORCE_<b>nlpcraft_probe_models</b>="com.nlp.MyModel, com.nlp.AnotherModel"</code>
- </p>
- <div class="bq info">
- <b>Examples</b>
- <p>
- Note that all examples that come with NLPCraft have instructions that use environment variable overriding
- for running their data probes. They use default <code>nlpcraft.conf</code> file and override
- one <code>nlpcraft.probe.models</code> property (see above) to specify what model the data probe
- needs to deploy.
- </p>
- </div>
- </section>
- <section id="ansi">
- <h2 class="section-title">ANSI Colors <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
- <p>
- Both NLPCraft server and probe use ANSI coloring via
- <a target=_ href="https://en.wikipedia.org/wiki/ANSI_escape_code">ANSI escape sequences</a> for their log
- output by default. ANSI coloring provides easer console log comprehension and modern esthetics:
- </p>
- <p>
- <img class="non-fluid-img" src="/images/ansi_colors.png" alt="">
- </p>
- <p>
- However, there are
- cases when either specific console does not support ANSI escape sequences, or specific color schema
- isn't suitable or log being redirected to a file or piped to downstream system. In these cases you need to
- disable ANSI coloring to avoid polluting log with unprocessed ANSI escape codes.
- </p>
- <p>
- You can disable ANSI coloring in either server, probe or both by supplying the following system
- property to JVM process: <code>-D<b>NLPCRAFT_ANSI_COLOR_DISABLED</b>=true</code>
- </p>
- </section>
<section id="testing">
<h2 class="section-title">CI Testing <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
@@ -550,6 +433,7 @@ nlpcraft {
</li>
</ul>
</div>
+ <br/>
</section>
</div>
<div class="col-md-2 third-column">
@@ -557,8 +441,6 @@ nlpcraft {
<li class="side-nav-title">On This Page</li>
<li><a href="#server">REST Server</a></li>
<li><a href="#probe">Data Probe</a></li>
- <li><a href="#config">Configuration</a></li>
- <li><a href="#ansi">ANSI Colors</a></li>
<li><a href="#testing">CI Testing</a></li>
{% include quick-links.html %}
</ul>