Server Guide : Testing server applications : Running a packaged image
Running a packaged image
The packager writes your server application into an image file. In addition, the packager writes a snapshot file (.snp) for a server application which belongs in the development environment and facilitates debugging. At a minimum, you will also need an .ini file to run your server application.
You will need to have other files than just the runtime image in place to successfully run your packaged image. See “Files to distribute with your application” in the Smalltalk User Guide for more information on what files are needed to run a packaged image.
More complicated reduced runtime images may need more resources. For instance, some applications require third party resources. Any such requirements in the examples will be noted in the example itself.
Development Environment
Although the examples can be run in the development environment by paring the package image with the abt.ni belonging to the development environment a shown below, best practice indicates constructing a separate target environment in which to test the server application.
For Windows: esvio -i<image name> -ini:abt.ini
For Linux (UNIX): abtnx -i<image name> -ini:abt.ini
Server Runtime
Instantiations provides such a target environment; Server Runtime (available on Instantiations download page) can be used to start a directory of resources. The packaged image file should be moved to the root of the decompressed Server Runtime tree.
The most general steps to preparing a context in which to run your packaged image are
1. Get an INI file
Windows
newimage\esvio.ini
UNIX
newimage/abtnx.ini
The locations of the .ini files in the above table are relative to the root of the Server Runtime.
Once you locate the proper .ini file, copy it to the same directory as your packaged image, and then rename it to match the package image file.
2. Open a command terminal
For Windows:
The command terminal may be a VAST command terminal, which is available through a shortcut on the Start menu or through Environments ‘open command window’ menu item in the context menu any selected environment. If running in a server runtime, a generic command terminal is sufficient
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\tips.gif
Pick the same VAST command terminal with the same bitness as that of the VA Smalltalk Development Image which produced the reduced runtime image.
3. Launch the packaged image from the command line.
In the command terminal, cd to the directory with, the reduced runtime image, and then use the appropriate command below. The commands start VA Smalltalk headlessly
For Windows: bin\nodialog.exe –i<image name>
For Linux (UNIX): newimage/nodialog –i<image name>
Problems
It is possible that your application can successfully package, yet fail to run. Startup failures often show themselves with informational dialogs or walkback logs.
See the “Troubleshooting” section in the Smalltalk User Guide for more information.
Server Workbench feature provides tools to test server applications.
Examples in this Guide
For simplicity, the examples in this guide are packaged and run on the same machine. If you choose to run the packaged image in the development environment, the development image and the runtime image belong to the same VA Smalltalk installation. This means the development environment and target environment are the same. Running the packaged image in the Server Runtime context separates the development environment and target environment.
Making these choices reduces the burden of setting up the examples.
 
Last modified date: 07/24/2020