[TemplateProjectDeployment.htm - uqlpayne 22 Aug 2013]
The GlassFish Server Open Source Edition 4.0 is installed and running.
The UQ-iLab-BatchLabServer-Java GitHub repository has been downloaded as a ZIP file from:
https://github.com/uqlpayne/UQ-iLab-BatchLabServer-Java
The Template LabServer Database has been created and configured (see TemplateLabServerDatabase.pdf).
The Dummy ServiceBroker Database has been created and configured (see DummyServiceBrokerDatabase.pdf).
The folder D:\iLabs\Template has been created for the Template project application files.
The folder D:\iLabs\Dummy has been created for the Dummy ServiceBroker application files.
Run the GlassFish Server Administration Console by entering the following URL in a web browser.
http://localhost:4848/
If prompted, log in to the Administration Console.
There are four web applications that need to be deployed to the GlassFish Server.
Packaged File: | UQ-iLab-BatchLabServer-Java/Builds/Template_LabEquipment.war |
Local Folder: | D:\iLabs\Template\LabEquipment |
Context Path: | /TemplateLabEquipment |
Packaged File: | UQ-iLab-BatchLabServer-Java/Builds/Template_LabServer.war |
Local Folder: | D:\iLabs\Template\LabServer |
Context Path: | /TemplateLabServer |
Packaged File: | UQ-iLab-BatchLabServer-Java/Builds/Template_LabClient.war |
Local Folder: | D:\iLabs\Template\LabClient |
Context Path: | /TemplateLabClient |
Packaged File: | UQ-iLab-BatchLabServer-Java/Builds/Dummy_ServiceBroker.war |
Local Folder: | D:\iLabs\Dummy\ServiceBroker |
Context Path: | /DummyServiceBroker |
Create the folder LabEquipment in the folder D:\iLabs\Template so that the folder D:\iLabs\Template\LabEquipment exists.
Extract the web archive file Builds/Template_LabEquipment.war to the folder D:\iLabs\Template\LabEquipment.
Go to the GlassFish Server Admininistration Console. In the Common Tasks panel, click on Applications.
In the Applications panel, click the Deploy... button.
In the Deploy Applications or Modules panel, select Local Packaged File or
Directory That Is Accessible from GlassFish Server and enter D:\iLabs\Template\LabEquipment
in the field.
Alternatively, click the Browse Folders... button to select the folder.
For Type: select Web Application from the dropdown list. More fields are then displayed.
For Context Root: enter TemplateLabEquipment
in the field.
Also for Application Name: enter TemplateLabEquipment
in the
field.
Leave the other fields with their default values.
Click the OK button to deploy the application.
Create the folder LabServer in the folder D:\iLabs\Template so that the folder D:\iLabs\Template\LabServer exists.
Extract the web archive file Builds/Template_LabServer.war to the folder D:\iLabs\Template\LabServer.
Go to the GlassFish Server Admininistration Console. In the Applications panel, click the Deploy... button.
In the Deploy Applications or Modules panel, select Local Packaged File or
Directory That Is Accessible from GlassFish Server and enter D:\iLabs\Template\LabServer
in the field.
Alternatively, click the Browse Folders... button to select the folder.
For Type: select Web Application from the dropdown list. More fields are then displayed.
For Context Root: enter TemplateLabServer
in the field.
Also for Application Name: enter TemplateLabServer
in the field.
Leave the other fields with their default values.
Click the OK button to deploy the application.
Create the folder LabClient in the folder D:\iLabs\Template so that the folder D:\iLabs\Template\LabClient exists.
Extract the web archive file Builds/Template_LabClient.war to the folder D:\iLabs\Template\LabClient.
Go to the GlassFish Server Admininistration Console. In the Applications panel, click the Deploy... button.
In the Deploy Applications or Modules panel, select Local Packaged File or
Directory That Is Accessible from GlassFish Server and enter D:\iLabs\Template\LabClient
in the field.
Alternatively, click the Browse Folders... button to select the folder.
For Type: select Web Application from the dropdown list. More fields are then displayed.
For Context Root: enter TemplateLabClient
in the field.
Also for Application Name: enter TemplateLabClient
in the field.
Leave the other fields with their default values.
Click the OK button to deploy the application.
Create the folder ServiceBroker in the folder D:\iLabs\Dummy so that the folder D:\iLabs\Dummy\ServiceBroker exists.
Extract the web archive file Builds/Dummy_ServiceBroker.war to the folder D:\iLabs\Dummy\ServiceBroker.
Go to the GlassFish Server Admininistration Console. In the Applications panel, click the Deploy... button.
In the Deploy Applications or Modules panel, select Local Packaged File or
Directory That Is Accessible from GlassFish Server and enter D:\iLabs\Dummy\ServiceBroker
in the field.
Alternatively, click the Browse Folders... button to select the folder.
For Type: select Web Application from the dropdown list. More fields are then displayed.
For Context Root: enter DummyServiceBroker
in the field.
Also for Application Name: enter DummyServiceBroker
in the field.
Leave the other fields with their default values.
Click the OK button to deploy the application.
Launch the Template LabEquipment client by entering the following URL in a web browser:
http://localhost:8080/TemplateLabEquipment/
The web page simply displays Template LabEquipment. This is sufficent to show that the Template LabEquipment application has been deployed correctly. At this point in time, the Template LabEquipment service has not been invoked.
Launch the Template LabServer client by entering the following URL in a web browser:
http://localhost:8080/TemplateLabServer/
The web page displays the Template LabServer login. This is sufficent to show that the Template LabServer application has been deployed correctly. At this point in time, the Template LabServer service has not been invoked.
Log in to the Template LabServer with the following username and password:
Username: |
manager
|
Password: |
ilab
|
The menu provides a number of items to configure the LabServer.
Self Registration - Configure the LabServer by specifying the name, guid, service URL and email address.
Lab Equipment - Configure one or more LabEquipment services by specifying the service URL and passkey.
ServiceBrokers - Specify the details of one or more ServiceBrokers that are permitted to access the LabServer.
My Account - Specify the LabServer manager's account information.
Logout - Log out of the LabServer.
Select the My Account menu item.
Change the Contact Email to your email address or some other appropriate email address.
Change the Password to something else especially if the LabServer is deployed on a networked server.
Click the Update button to save the changes.
Select the Self Registration menu item.
Change the Contact Email to your email address or some other appropriate email address. This is the LabServer's email address and not the LabServer Manager's email address although they could be the same.
If you require the LabServer to send an email when an experiment completes, enter an email address in the Completed Email field.
If you require the LabServer to send an email when an experiment fails, enter an email address in the Failed Email field.
Leave the Name, Guid and Service Url fields with their default values.
Click the Update button to save the changes.
Select the Lab Equipment menu item. Select LabEquipment Unit 1 from the dropdown list and click the Select button.
Leave the fields with their default values.
Click the Test button. This makes a web service call to the LabEquipment to retrieve the LabEquipment status. A message is displayed showing the status of the LabEquipment.
If the message indicates that the LabEquipment is Offline, wait a few seconds for the LabEquipment web service to initialise and start and then click the Test button again.
Open the logfile for the LabEquipment located at D:\iLabs\Template\LabEquipment\LogFiles\LabEquipment.log to view the activity of the LabEquipment service.
Select the Self Registration menu item again.
Click the Test button. This makes a web service call to the LabServer to retrieve the LabServer status as well as the status of the LabEquipment services that are enabled. It may take a few seconds for the LabServer web service to initialise and start.
Open the logfile for the LabServer located at D:\iLabs\Template\LabServer\LogFiles\LabServer.log to view the activity of the LabServer service.
Select the ServiceBrokers menu item. Select the ServiceBroker localhost from the dropdown list and click the Select button.
Leave the fields with their default values.
If a Service Url is specified then the LabServer will notify the ServiceBroker that an experiment has completed successfully or failed.
Log out of the Template LabServer.
Launch the Dummy ServiceBroker client by entering the following URL in a web browser:
http://localhost:8080/DummyServiceBroker/
The web page simply displays Dummy ServiceBroker. This is sufficent to show that the Dummy ServiceBroker application has been deployed correctly. At this point in time, the Dummy ServiceBroker service has not been invoked.
Launch the Template LabClient by entering the following URL in a web browser:
http://localhost:8080/TemplateLabClient/LabClient.do?CouponId=12345&Passkey=qwerty
The title Template should be displayed at the top of the web page and a version number near the top-right of the page.
Select the Status menu item.
The LabServer status should be Online
Open the logfile for the LabClient located at D:\iLabs\Template\LabClient\LogFiles\LabClient.log to view the activity of the LabClient application.
Select the Setup menu item.
To run an experiment, select the Setup for Equipment experiment setup from the Setup dropdown list. Enter a value for SomeParameter and then click the Submit button. The experiment setup should be successfully submitted and an experiment number presented.
Select the Status menu item.
The experiment number should automatically appear in the Experiment Id field. Click the Check button to check the status of the experiment.
Click the Check button to check the status of the experiment repeatedly until the experiment completes.
Select the Results menu item.
When the experiment completes, the experiment number should automatically appear in the Experiment Id field. Click the Retrieve button to retrieve the experiment results.
Save the results to a comma-separated-value (CSV) file by clicking the Save button.
Select the Setup menu item again.
Run another experiment but this time, select the Setup for Simulation experiment setup from the Setup dropdown list. Enter a value for SomeParameter and then click the Submit button. The experiment setup should be successfully submitted and an experiment number presented.
Check the status of the experiment repeatedly until the experiment completes.
Retrieve the experiment results.