Local Windows 10 Machine Installation

Note that Appway 2022.2 has been renamed FNZ Studio 2022.2. In this article it is also referred to, generically, as Platform. Appway Studio (development environment) has been renamed FNZ Studio Composition.

Problem

I need to install a local instance of the Platform on my Windows 10 64-bit OS. What steps do I need to follow?

Solution

This recipe provides a step-by-step guide to installing the Platform as a local instance, running on a Windows 10 Pro 64-bit machine. This recipe complements the more general installation guidelines, and provides the specific parameterizations needed for installation on Windows.

Step 1: Setting Up Apache Tomcat

In order to run the Platform on a local machine, you need to install and run a Tomcat Apache server:

  1. Check the exact version of Apache Tomcat compatible with the version of the Platform you are installing in the Technical Requirements article. The following steps use version 8.5.11 as an example.
  2. Go to http://tomcat.apache.org > Downloads > Tomcat 8.0 > 8.5.11 (where is the latest upgrade number) > Binary Distributions > Core > "ZIP" package (preferred 64-bit Windows zip) (e.g. apache-tomcat-8.5.11{xx}.zip).
  3. Create your project directory (e.g: C:\myApache or C:\myProject) and unzip the downloaded file into your project directory. Tomcat will be unzipped into directory c:\myApache\apache-tomcat-8.5.11{xx}.
  4. For ease of use, shorten and rename this directory to C:\myApache\tomcat.
IMPORTANT! Do not use spaces or special characters in the name of your project directory. Names which contain spaces may cause issues with running the server.

Take a look at the installed Tomcat directory. It contains the following sub-directories:

  • bin: Contains the startup script (startup.bat for Windows and startup.sh for Unix and Mac OS X), shutdown script (shutdown.bat for Windows and shutdown.sh for Unix and Mac OS X) binaries, as well as other binaries and scripts.
  • conf: Contains the system-wide configuration files, such as server.xml, web.xml, context.xml, and tomcat-users.xml.
  • lib: Contains the Tomcat system-wide JAR files, accessible by all web apps. External JAR files (such as MySQL JDBC Driver) can be placed here manually.
  • logs: Contains Tomcat log files. You may need to check for error messages here.
  • webapps: Contains the web apps to be deployed. You can also place the WAR (web app Aachive) file for deployment here.
  • work: Tomcat's working directory used by JSP, for JSP-to-Servlet conversion.
  • temp: Contains temporary files.

Step 2: Setting up the Java JDK

In order to have Tomcat running on your system, make sure that you have installed the latest Java JDK. Go to the Oracle Download Area and download the latest version for your machine (e.g. jdk-8u121-windows-x64.exe).

Note: Check the exact Java JDK versions compatible with the version of the Platform you are installing in the Technical Requirements article.

You now need to create an Environment Variable, JAVA_HOME:

  1. Find your JDK installed directory. The default is C:\Program Files\Java\jdk1.8.0_{xx}, where {xx} is the upgrade number. Take note of your JDK installed directory.

  2. To set the environment variable "JAVA_HOME" in Windows 7/8/10, go to: Control Panel > System > Advanced system settings > Advanced tab > Environment Variables > System Variables > New.

    • In Variable Name, enter JAVA_HOME.

    • In Variable Value, navigate with the browse button to your JDK installed directory.

  3. To verify, re-start a CMD shell (a restart is needed to refresh the environment) and issue:

    Copy
    > SET JAVA_HOME
    > java -version
    JAVA_HOME=c:\Program Files\Java\jdk1.8.0_{xx}

    Verify that the JAVA_HOME is YOUR JDK installed directory.

This Environment Variable is needed for starting Tomcat through the Command Line/PowerShell in Windows. Starting Tomcat this way means that it is not running in the background as a service, and can be terminated if the connection with the host is lost.

Enabling Tomcat to be able to run as a service through the Task Manager of Windows (without the need of the CMD/PowerShell) is covered later in this recipe.

Step 3: Starting the Tomcat Apache Server

IMPORTANT! Before starting the Tomcat server you need to copy the file `setenv.sh` to `C:\myApache\tomcat\bin`
  1. After copying the file to that location, open Windows' PowerShell and navigate to the folder where you have unzipped Tomcat. Run the startup.bat as follows: ..\tomcat\bin> .\startup.bat
  2. Allow access if firewall protection pops-up.
  3. Open a web browser and navigate to: localhost:8080 If everything is OK, you should see the following page: starting_tomcat.png

Step 4: Configuring One Node

IMPORTANT! To complete the setup, you require configuration files, license files, and key files. The configuration files are included here: GuideInstallAppwayonWindows (ZIP file). License and key files are not included, but existing customers may request these via their assigned Customer Support Manager.
  1. Create a new folder inside C:/myApache/ with the name: cluster-storage. This folder is used to model the cluster-wide persistent store. All the nodes need to have access to the same folder: the persistent store.

  2. Next, create a new folder inside C:/myApache/ with the name: node1. This folder is used to model a node.

  3. Copy the Tomcat folder to node1.

  4. Create a folder in C:/myApache/node1 with the name: data-home.

  5. Create two subfolders within this data-home folder: conf and extensions. conf-extensions.png

  6. Copy the following "extension" files from the .zip file to the extensions folder you have just created. extensions-jar.png

  7. Copy the conf.properties, content.properties, hazelcast.xml, and jaas.conf files into the conf folder.

  8. Copy the license file to …/data-home/conf/license.properties. For a single-node test installation, use the license file which comes packaged in the WAR file. For all other cases, contact Support to request a license file.

  9. Open the conf.properties file with a Text Editor program and change the nodename and UID prefix: nodename-UID.png

IMPORTANT! The name of the cluster and the prefix must be unique! The prefix and nodename should be identical, except for capitalization.
  1. Add the following line of code to the content.properties file:

    Copy
    nm.system.id = My Local Appway Node
  2. Verify that the license is still valid in the license.properties file.

  3. Copy the WAR file (e.g. nm-6.3.4.war) into the tomcat/webapps folder, rename it to ROOT.war, and remove the existing ROOT folder.

  4. Copy the NmJAASLoginModules.jar to tomcat/lib

  5. Define the nmdev realm in tomcat/conf/server.xml

  6. In the same file, add a parameter with your data-home location. Your server.xml file should look like this: catalina-xml.png

  7. Open a new PowerShell in Windows, navigate to your Tomcat bin folder: C:\myApache\node1\tomcat\bin and start up the server with : ...\tomcat\bin>.\startup.bat

Go back to your browser and navigate to localhost:8080. If everything is working correctly, you should see the following message: itworks.png

Now go to the localhost:8080/admin page and you should see the login page of FNZ Studio Composition: localhost.png

Step 5: Running One Appway Node as a Service

  1. To install Tomcat as a service, open a PowerShell and navigate to C:\myApache\node1\tomcat\bin

  2. Execute: .\service.bat install

  3. Double-click the tomcat8w.exe file. Navigate to the Java tab and add the following command in the Java Options field:

    Copy
    -Dnm.data.home=C:\myApache\node1\data-home"

    tomcat8-5.png

  4. Go to the Windows Task Manager > Services tab. Find the Tomcat8 service, right-click and start the process. task-manager.png

  5. Navigate to localhost:8080/admin, and log in to FNZ Studio Composition.