[RadioactivityProjectDeployment.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 Radioactivity LabServer Database has been created and configured (see RadioactivityLabServerDatabase.pdf).
The Dummy ServiceBroker Database has been created and configured (see DummyServiceBrokerDatabase.pdf).
The folder D:\iLabs\Radioactivity has been created for the Radioactivity 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/Radioactivity_LabEquipment.war |
Local Folder: | D:\iLabs\Radioactivity\LabEquipment |
Context Path: | /RadioactivityLabEquipment |
Packaged File: | UQ-iLab-BatchLabServer-Java/Builds/Radioactivity_LabServer.war |
Local Folder: | D:\iLabs\Radioactivity\LabServer |
Context Path: | /RadioactivityLabServer |
Packaged File: | UQ-iLab-BatchLabServer-Java/Builds/Radioactivity_LabClient.war |
Local Folder: | D:\iLabs\Radioactivity\LabClient |
Context Path: | /RadioactivityLabClient |
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\Radioactivity so that the folder D:\iLabs\Radioactivity\LabEquipment exists.
Extract the web archive file Builds/Radioactivity_LabEquipment.war to the folder D:\iLabs\Radioactivity\LabEquipment.
Go to the GlassFish Server Admininistration Console. In the Common Tasks panel, click on Applications. If you have already completed the Template Project Deployment tutorial then there will be some deployed applications shown.
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\Radioactivity\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 RadioactivityLabEquipment
in the field.
Also for Application Name: enter RadioactivityLabEquipment
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\Radioactivity so that the folder D:\iLabs\Radioactivity\LabServer exists.
Extract the web archive file Builds/Radioactivity_LabServer.war to the folder D:\iLabs\Radioactivity\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\Radioactivity\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 RadioactivityLabServer
in the field.
Also for Application Name: enter RadioactivityLabServer
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\Radioactivity so that the folder D:\iLabs\Radioactivity\LabClient exists.
Extract the web archive file Builds/Radioactivity_LabClient.war to the folder D:\iLabs\Radioactivity\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\Radioactivity\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 RadioactivityLabClient
in the field.
Also for Application Name: enter RadioactivityLabClient
in the
field.
Leave the other fields with their default values.
Click the OK button to deploy the application.
This LabClient uses the RESTful services of the Dummy ServiceBroker to communicate.
Create the folder LabClientRest in the folder D:\iLabs\Radioactivity so that the folder D:\iLabs\Radioactivity\LabClientRest exists.
Extract the web archive file Builds/Radioactivity_LabClient.war to the folder D:\iLabs\Radioactivity\LabClientRest.
Go to the D:\iLabs\Radioactivity\LabClientRest\WEB-INF folder and replace the ConfigProperties.xml file with the ConfigProperties_Rest.xml file. There are two entries in the file that are different: ServiceUrl and ServiceType.
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\Radioactivity\LabClientRest
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 RadioactivityLabClientRest
in the field.
Also for Application Name: enter RadioactivityLabClientRest
in the field.
Leave the other fields with their default values.
Click the OK button to deploy the application.
If you have already completed the Template Project Deployment tutorial then you will have already deployed the Dummy ServiceBroker and can skip this section.
The relevant section from the Template Project Deployment tutorial has been reproduced here.
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 Radioactivity LabEquipment client by entering the following URL in a web browser:
http://localhost:8080/RadioactivityLabEquipment/
The web page simply displays Radioactivity LabEquipment. This is sufficent to show that the Radioactivity LabEquipment application has been deployed correctly. At this point in time, the Radioactivity LabEquipment service has not been invoked.
Launch the Radioactivity LabServer client by entering the following URL in a web browser:
http://localhost:8080/RadioactivityLabServer/
The web page displays the Radioactivity LabServer login. This is sufficent to show that the Radioactivity LabServer application has been deployed correctly. At this point in time, the Radioactivity LabServer service has not been invoked.
Log in to the Radioactivity 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\Radioactivity\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\Radioactivity\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 Radioactivity 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 Radioactivity LabClient by entering the following URL in a web browser:
http://localhost:8080/RadioactivityLabClient/LabClient.do?CouponId=12345&Passkey=qwerty
The title Radioactivity 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\Radioactivity\LabClient\LogFiles\LabClient.log to view the activity of the LabClient application.
Select the Setup menu item.
To run an experiment, select the Radioactivity over Time experiment setup from the Setup dropdown list. Leave the fields with their default values 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 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 Radioactivity versus Distance experiment setup from the Setup dropdown list. Leave the fields with their default values 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.
This LabClient uses the REST services interface of the Dummy ServiceBroker whereas the LabClient in the previous section Launch Radioactivity LabClient uses the SOAP web services interface. The only difference that can be seen is the URL in the web browser.
Launch the Radioactivity LabClient Rest by entering the following URL in a web browser:
http://localhost:8080/RadioactivityLabClientRest/LabClient.do?CouponId=12345&Passkey=qwerty
The title Radioactivity should be displayed at the top of the web page and a version number near the top-right of the page.
Continue as in the previous section Launch Radioactivity LabClient.