vlf for web multi-tier
TRANSCRIPT
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 1/29
Purpose
The purpose of this document is to provide advice for Configuring the Visual LANSA Framework (VLF) for the Web in a multi-tier environment using the new “remote SSI” feature in the IIS Plugin. This new featureremoves the necessity to map network drives across servers where the application server is iSeries and the webserver is Windows.
Architecture
Application Server iSeriesApache Web server LANSA SP5 + LANSA Web
Web Server Microsoft Windows (XP SP2 and up)Microsoft Windows IIS (Microsoft Internet Information Server)Microsoft .NET Framework 2.0 Service Pack 2LANSA SP5 IIS Plugin
Developer PCMicrosoft Windows (XP SP2 and up)Microsoft Windows IIS (Microsoft Internet Information Server)Microsoft .NET Framework 2.0 Service Pack 2Visual LANSA Development EnvironmentVisual LANSA Framework (EPC843 and up)LANSA SP5 IIS PluginLANSA Web Administrator
Client Browser
Microsoft Internet Explorer 7 (IE6 + SP1 “ok” if not using RAMP-TS)
Applicable Documentation Guides
Installing LANSA on iSeriesInstalling LANSA on WindowsVisual LANSA Framework Guide (Getting Started)
Before you Start
Review the documentation guides above to get an idea of the requirements to install this software. The setupdescribed here involves 3 separate physical machines and includes a complete development environment,application server, and web server (for testing purposes you could use your developer IDE as your web server).
There is an assumption in this document that you ALREADY have installed the software you need onto theapplicable platforms and that the rest is just configuration steps to setup and get the VLF running.
1
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 2/29
Prerequisites
LANSA on iSeries installed.LANSA for the Web installed.Apache web server configured to run LANSA for the Web.
Visual LANSA Development Environment (Including LANSA for Web)
LANSA for the Web IIS PluginLANSA for the Web Administrator Both of these are on the web server (or developer) machine.
We assume at this point that you can
a) create a function or wam, check it in, and execute it directly on iSeries through the Apache web server
The VLF setup assumes that you can do ALL of the above before continuing. There is no point in even messing with the VLF until you can accomplish all of the above. The VLF is an application framework developed using
LANSA which sits on top of the LANSA environment.
Steps Overview
1. Create a module and data library (these can be the same library)2. Create a partition in LANSA (partition must be multi-lingual)3. Add at least 1 language to the partition4. Web enable the partition5. Create the partition on your IDE by doing a system init6. Do a partition init for the partition in your IDE to web enable it7. Create a hello world function or wam in the partition [this step is not shown here]8. Check it into the iSeries (to verify that it can run) [this step is not shown here]
9. Transfer VLF to iSeries10. Import VLF on iSeries11. Create IFS directories for session information and deployment of VLF12. Adjust IFS Authorities13. Modify Apache Config14. Modify iSeries Web Administrator Settings15. Configure VLF temp folder and verify VLF16. Deploy VLF application from Developer IDE to iSeries17. Test Framework Single Tier 18. Configure Multi-tier 19. Test Framework Multi-Tier
2
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 3/29
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 4/29
Screen 2
Screen 3
4
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 5/29
Screen 4
Screen 5
5
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 6/29
Screen 6
At this point your partition is created.Press the F12 function key to return to the Housekeeping Menu.Choose option Change partition being worked with to select the partition you just created.
6
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 7/29
Step 3 – Add Language
Choose option Work with partition multilingual attributes.
Press the F6 function key. Enter the below as shown.Press function key F12 to return to the main menu.
Step 4 – Enable Partition for Web
Choose menu option Work with Administration Tasks. Choose menu option Initialize Partition.
Type option 7 next to LWEBSF in the list show and press ENTER to initialize the partition for Web.
7
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 8/29
Step 5 – Create Partition on Developer Workstation
Create the partition on the PC
Double click the LANSA icon on your PC to launch the IDEEnter your password (do not press ENTER yet)Click the System Init button.
Click the Options Tab
Check Enrolled PC Names : Check Enrolled PC Users : Check Current Task List
Enter the names of the new partition(s) you have created.
8
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 9/29
Click the Connection Tab
Enter your User and Password and press OK
Step 6 – Initialize Partition on Developer Workstation
Now Click Partition Init
9
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 10/29
Check Visual LANSA Framework
Check Enable for the Web
Click OK Button
Step 9 - Transfer VLF import to iSeries
Our next step is to import the VLF from the PC onto the iSeries. This is non-intuitive step, as you would assumethat the installed iSeries software would include the VLF as part of its install. However in this case due tohistorical reasons, the VLF must be installed first on the PC, then manually moved up to the iSeries. Then itneeds to be imported into each partition manually.
Locate the VLF software on the PC. It is inside of a zip file relative to the root of your VL IDE install.C:\Program Files\LANSAPDO\LANSA\Imports\VLFRAMEWORK\VLF_SV11.ZIP
If you unzip this, you will find a binary file called VLF_SV11 inside. Unzip this file and place the binary filesomewhere you can find it on your PC.
We now need to transfer this file to the iSeries. Here is a sample of the ftp commands to do this
First create a savefile on the iSeries.CRTSAVF FILE(QGPL/VLF_SV11)
From a command line on your PC
ftp yoursystem (this is your system DNS name or ip address){ user }
{ pwd }
bin (use binary mode)lcd c:\ftp (this is where I moved the binary image on PC)
literal site namefmt 1 (use IFS file system)cd / (move to root)cd qsys.lib (move to QSYS)literal site namefmt 0 (use QSYS file system)cd qgpl (where I created the savefile)put vlf_sv11 (send the file)
Now use the following command to verify the file was transferred correctly.DSPSAVF FILE(QGPL/VLF_SV11)
10
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 11/29
Step 10 - Import VLF on iSeries
Now we will import the VLF into the partition we just createdLANSA PARTITION(VF1) DEVELOPER(A)
Choose menu option Work with Housekeeping Tasks
Choose menu option Import objects into this partition
Change the parameter Import from save file named to QGPL/VLF_SV11 (or the name or location where youuploaded your savefile).
Press ENTER to submit the import.
After the import runs for the partition we can test as follows (adjusting the partition and system name and portfor your particular install of LANSA). You should see a screen as below. This is the VLF operational link which tells you the version of the VLF installed into the partition. The VLF is installed (imported) into each partition individually. In the past you could have different EPC levels of the VLF in different partitions. This is NO LONGER SUPPORTED.
http://mysystem/cgi-bin/lansaweb?procfun+VF_PR004+VFU0401+ppp+ENG
The second link is the VLF administration console link. This is used to setup the temporary session directory forthe VLF for a given partition. There is a DIFFERENT temp folder per partition.
http://mysystem/cgi-bin/lansaweb?procfun+VF_PR004+VFU0402+ppp+ENG
The third link is only used if you are using webevent functions in the VLF. For most new customers this wouldnot be the case (they would be using WAMs).
http://mysystem/cgi-bin/lansaweb?procfun+VF_PR004+VFU0403+ppp+ENG
11
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 12/29
Step 11 - Create IFS Directories
Because we want to support simultaneously running single-tier and multi-tier in multiple partitions at the sametime with no configuration changes, we will name the directories in a particular manner.
Create the following directories (relative to your own install…this is just an example).You need 1 temporary folder per partition running the VLF.You need 1 folder for the deployed applications.
MKDIR DIR('/LANSA_pdopgmlib/webserver/images/vlf')
MKDIR DIR('/LANSA_pdopgmlib/webserver/images/vlf/vf1')
MKDIR DIR('/LANSA_pdopgmlib/webserver/images/vlf/vf1/temp')
MKDIR DIR('/LANSA_pdopgmlib/webserver/images/vlf/vf1/demo')
MKDIR DIR('/LANSA_pdopgmlib/webserver/images/vlf/vf2')
MKDIR DIR('/LANSA_pdopgmlib/webserver/images/vlf/vf2/temp')
MKDIR DIR('/LANSA_pdopgmlib/webserver/images/vlf/vf2/demo')
Step 12 - IFS Authorities
At design time you need to have write authority to the application folder (demo in this case).At runtime the webuser profile needs to have write authority to the temp folder.
Use option 9 via the WRKLNK command for the folder to edit the authority.
In this case for simplicity I have used *RWX authority for *PUBLIC as this is a test box. In production youwould use either PDOPGMLIB (actually the corresponding security officer for your install) or EVERY webuser profile as specified in the web administrator which runs the VLF for Web.
WRKLNK '/LANSA_pdopgmlib/webserver/images/vlf/vf1/temp'
12
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 13/29
Then take option 9Adjust these authorities as needed.
Step 13 - Modify Apache
WRKLNK '/LANSA_pdopgmlib/webserver/www/conf/httpd.conf'
Take an option 2
13
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 14/29
Add the following lineSetOutputFilter INCLUDES
Also modify the Options line. It should read:Options -ExecCGI -FollowSymLinks -SymLinksIfOwnerMatch +Includes -Indexes -MultiViews
Press F3 to exit and save
14
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 15/29
WRKACTJOB SBS(QHTTPSVR)
Page down to find your running webserver (in my case PDOPGMLIB)
End the webserver ENDTCPSVR SERVER(*HTTP) HTTPSVR(PDOPGMLIB)
Start the webserver (verify it is completely stopped and all the jobs are gone)
STRTCPSVR SERVER(*HTTP) HTTPSVR(PDOPGMLIB)
Step 14 – Modify iSeries Web Administrator Settings
Now launch the LANSA for Web Administrator from your PC.Take menu option Options / Connect
15
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 16/29
What you type here is dependent upon your install.The LANSA System name is the same one you used to configure your IDE. Click the 3 dots prompt next to thefield to see a list of possible values.The host type is iSeriesThe partition can be any partition. Almost all of the settings are global in the Web Administrator so the partitiondoes not matter for our purposes.You must be the LANSA security officer to modify settings in the Web Administrator
Click OK to continue and connect.
Menu option Security / User Registration
Remember earlier we mentioned that the temp folder would need to have write access for the webuser? This iswhere the webusers are defined. At runtime LANSA lweb_jobs swap to this profile and as a result are subject tosecurity considerations for that user profile. Any user profile (LANSA User ID column) in here might need tohave access to the folder. Go back and adjust authorities as needed.
Menu option Tools / Maintain Systems
This screen defines a few properties for which might vary per host name or port. In this case there is only oneentry so we select it.
Highlight the line and click the Change Button
16
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 17/29
Check the Server Side Includes (SSI) support checkboxClick OK to save changes
Click close
Menu option Tools / Configure System / Data Application Server
Check the Allow Files to be Served to Web Server checkboxCheck the Specify radio buttonEnter the path /LANSA_PDOPGMLIB/webserver into the text box as shown (this will vary per your install path)Click OK to save changes and then close the Web Administrator.
17
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 18/29
Step 15 - Configure VLF temp folder and verify VLF
Note: This step is used to configure the temp folder for a partition. It needs to be a different physical location for EVERY partition.
Run this url adjusting for your system server name and port.
http://mysystem/cgi-bin/lansaweb?procfun+VF_PR004+VFU0402+ppp+ENG
Modify the following parameters (path relative to your install)
Apache Web Server? Yes
Real directory for temporary files /LANSA_PDOPGMLIB/webserver/images/vlf/vf1/temp/
Virtual directory for temporary files /images/vlf/vf1/temp/
Your screen should look like the following….
18
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 19/29
Press Save and verify values button
If you do not see this screen then you have missed a step somewhere. Go back and review all steps. Do notcontinue until you can pass this step.
19
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 20/29
Step 16 – Configure VLF Application and Deploy
It is now time to configure and publish the VLF for Web from your IDE.Open the demo VLF application from your IDE.Choose menu option Tools / VL Framework as Designer
Once the Framework is launchedChoose menu option (Framework) / (Properties)
Select Developer Preferences – Web Server 1 tab
Note: Z:\ maps to the root of the IFS on the iSeries in this exampleYou will need to get the iSeries administrator for help with this if you don’t already know how to do this.
Note: these parameters will need to be modified relative to your install
Host Name or IP Address support.lansa.com:8584
Images Folder images
Private Working Folder images/vlf/vf1/demo
Mapped Drives…
Images Folder z:\LANSA_PDOPGMLIB\webserver\imagesPrivate Working Folder z:\LANSA_PDOPGMLIB\webserver\images\vlf\vf1\demo
Script Type DOS File Copy Commands
Click the Generate Example button
20
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 21/29
Select Developer Preferences – Web Server 2 tab
Note: these parameters will need to be modified relative to your install
Host Name or IP Address localhost
Images Folder images
Private Working Folder images/vlf/vf1/demo
Mapped Drives
Images Folder C:\Program Files\LANSAPDO\WebServer\ImagePrivate Working Folder C:\Program Files\LANSAPDO\WebServer\Images\vlf\vf1\demo
Script Type DOS File Copy Commands
Click the Generate Example button
Note: notice that the Images and Private working folders are identical (boxes 2 and 3) for both webserver definitions even thought the REAL path is different for both. Webserver 1 points to our iSeries while Webserver
2 points to our local machine. Remember we are going to use our local machine as a test webserver in this case.
In the screen shot below we show the vlf folder we created under the images folder in our main install. We willcreate the folders as shown under images to mirror the directory path setup on the iSeries. Also note that we donot need a temp folder as these files will be included and served from the iSeries.
21
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 22/29
Create these folders as shown below (relative to your install) now.
Choose menu option(s) (Framework) / (Save)
Click Yes Button
Click OK Button
22
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 23/29
Confirmation Screen (click OK to close)
Check the actual demo folders on both the iSeries and PC to verify the framework was saved to both
locations.
Step 17 – Test Framework Single Tier
In the VLF choose menu option (Framework) / (Execute as a Web Application) – Webserver 1
Click the OK button to launch the Framework.This will run the VLF for Web against the Apache webserver on iSeries
23
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 24/29
If you are not running this in the DEM partition then you will not have the Personnel Demo Files so many of theexamples will not be useable. Use the option shown highlighted below to test that the Framework runs.
Step 18 – Configure Multi-tier
Open the Lansa for Web Administrator
Choose menu option Options / Local Configuration / Open
Browse to the l4w3serv.cfg file and click open. Note the path in the status bar on the bottom of the window.This path is relative to your install.
24
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 25/29
Choose menu option Tools / Maintain Systems
Select the line and click Change Button
Make a note of the settings on tabs Web Server and Data/Application Server
You may want to set this back later for local testing.
Fill in Fields as shown
Key Values
SSI Always Done
Allow Files… Checked
25
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 26/29
Click Data / Application Server Tab
Fill in fields as shown (relative to the system you are connecting to)
Click Test Connection button
Click OK Click Close
From this screen choose menu option Options / Save
Note: The changes made here are not committed until you save them as above. Additionally they do not takeeffect until you stop and start the www service.
26
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 27/29
In WindowsLeft click Start
Right click MyComputer Choose Manage
You should see this window
Expand the Services and Applications nodeClick Services
Right click World Wide Web Publishing and select Stop then Start
After this step the changes made to the l4w3serv.cfg file will have taken effect.
IIS Plugin Test One
http://localhost/cgi-bin/about
27
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 28/29
IIS Plugin Test Twohttp://localhost/cgi-bin/lansaweb?about
IIS Plugin Test Threehttp://localhost/cgi-bin/lansaweb?procfun+lansaweb+about+dem
28
8/8/2019 VLF for Web Multi-Tier
http://slidepdf.com/reader/full/vlf-for-web-multi-tier 29/29
Step 19 – Test Framework Multi-Tier
Once all of the above steps are completed successfully, you are ready to test the framework via the multi-tier.
In the VLF choose menu option (Framework) / (Execute as a Web Application) – Webserver 2
Click the OK Button to launch.
If it does not run you have probably missed a step somewhere. Go back an carefully review all steps.