Menu

Installation - 2. Installation

Manuel Spoerer Sushant Pandey

Chapter navigation menu:
[Installation - 1. Introduction]
[Installation - 2. Installation]
[Installation - 3. Getting the use cases]

[Architecture - 1. Introduction]
[Architecture - 2. Initial situation and objective]
[Architecture - 3. Architecture & Technologies]
[Architecture - 4. Use cases]
[Architecture - 5. Security relevant requirements]

Document navigation:

2. Installation

2.1 Glassfish

The following steps need to be performed in order to successfully install Glassfish:

After running the previous command, the Glassfish installer will start initializing (Figure 1).

Glassfish installer will start initializing
** Figure 1 : GlassFish installer will start initializing**

After a few seconds, we should see the installer’s welcome screen (Figure 2).

Glassfish installer welcome screen
** Figure 2 : Glassfish installer welcome screen **

After clicking Next, we move to the installation selection (Figure 3).

Installation
** Figure 3 : Installation **

The next screen in the installer prompts us for an installation directory. The installation directory defaults to a directory called glassfish3 under our home directory. It is by default, but we are free to change it (Figure 4).

Installation directory
** Figure 4 : Installation directory **

At this point in the installation, we need to indicate if we would like to install the GlassFish update tool. The update tool allows us to easily install additional GlassFish modules. Therefore, unless disk space is a concern, it is recommended to install it. If we access the internet through a proxy server, we can enter its host name or IP address and port at this point in the installation (Figure 5).

Update configuration
** Figure 5 : Update configuration**

At this point, the installer summarizes the steps it is about to take. Clicking on the Installieren button initiates the installation (Figure 6)

Ready to install
** Figure 6 : Ready to install **

The progress of the installation is shown in the next screenshot (Figure 7).

Progress
** Figure 7 : Progress **

The next page in the installer allows us to customize Glassfish’s administration and HTTP ports. Additionally, it allows us to provide a username and password for the administrative user. By default, no login credential is required to log into the admin console. This default setting is appropriate for development systems. We can choose to provide username and password as shown in this step of the installation wizard (Figure 8)

Administration settings
** Figure 8 : Administration settings **

At this point in the installer window shows an overview of the configuration summary (Figure 9).

Configuration results
** Figure 9 : Configuration results **

The next page in the installer shows complete installation summary. Now, click on the Beenden button to exit the installer (Figure 10).

Summary
** Figure 10 **

2.2 JDBC Connection in GlassFish server

Prior to installing our OMPISpecto software an empty database/schema in MySql and a connection pool configuration in Glassfish server is required. Below listed are the following required steps.

  • Create a database in MySql
  • Open a browser to access the admin console of Glassfish server and type in http://localhost:4848/
  • Log in as administrator
  • Locate and click on JDBC option in left panel and then click on JDBC Connection pools option under JDBC as shown in Figure 11.

JDBC
** Figure 11 : JDBC **

  • Click on New tab and provide Pool name, resource type and database driver vendor which in this case will be MySql and click Next (Figure 12).

New JDBC - Connection Pool (1/2)
** Figure 12 : New JDBC - Connection Pool (1/2) **

  • Provide the below mentioned additional properties(with sample data) to create connection pool (Figure 13):
    • URL - jdbc:mysql://localhost:3306/ompispecto
    • Password – root
    • Username – root
    • PortNumber – 3306
    • DatabaseName – ompispecto

New JDBC - Connection Pool (2/2)
** Figure 13 : New JDBC - Connection Pool (2/2) **

  • Save and ping the connection pool to check its validity.
  • Click on JDBC Resources under JDBC option in left panel. Click on New tab to create a JNDI name.
  • Provide a JNDI name and select the connection pool which we created in connection pool as shown in Figure 14.

JDBC Resource which we created in connection pool
** Figure 14 : JDBC Resource which we created in connection pool **

** Configure Persistance.xml file **
When running the application for the first time the persistence.xml should have following property

<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />

This ensures the proper creation of tables in the database. However, it is strongly recommended to change this value of "drop-and-create-tables" to just "create-tables" after the first installation of the software to avoid dropping all the tables in database and re-creating them which will lead to loss of all the data.

2.3 WAR file deployment

We provide a WAR file (ompispectowebapp.war) which can be directly deployed to the glassfish server. For it to work correctly, make sure that your ** JDBC Resource ** is named * jdbc/ompispecto . After the deployment has finished, you can open the web application under ** http:// your-url */ompispectowebapp ** .

2.4 Mobile application

The web interface of OMPISpecto was developed considering the paradigm ** One code fits all **.
The application runs on each main browser as well on any mobile device. The following subsections describe the process of installing the OMPISpecto application as a mobile app.

2.4.1 iOS mobile app

To link the web application directly to your iOS mobile device home screen, follow the below listed 5 steps:

  1. Visit the website ** http:// your-url /ompispectowebapp ** .
  2. Tap the Share button at the bottom of the Safari screen.
  3. Tap the icon labeled ** Add to Home Screen **.
  4. Tap the Add button in the upper right corner.
  5. Launch the website from your Home screen by tapping its icon.

For further instructions go to http://www.apple.com/ios/add-to-home-screen/ .

2.4.2 Android App

The android application package (MPIApp.apk) can be downloaded from https://sourceforge.net/projects/ompispecto/files. This package can be installed on any android mobile devices, which is running at least android 2.3 (Gingerbread).
There are different ways to install an apk file on an android mobile device. The following two subsections describe two different ways to install an android application package.

** Installing Applications With Android SDK **

  1. Download and install the Google Android SDK program and the Android USB drivers. The download links are as follows: http://developer.android.com/sdk/index.html
  2. http://dl.google.com/android/android_usb_windows.zip
  3. You need to modify your Android’s settings to allow the installation of applications from other sources. Under “Settings,” select “Application Settings” and then enable “Unknown Sources.” Also under “Settings,” select “SD Card” and “Phone Storage,” and finally enable “Disable Use for USB Storage”.
  4. This last step is easy. Open Command Prompt and type the following: adb install <1>/<2>.apk. However, when you type the command, replace <1> with the path to your apk file and replace <2> with the name of the APK file.

** Installing Applications via Email **
This short introduction probably is the easiest way to install an application package on a mobile device.

  1. You need to modify your Android’s settings to allow the installation of applications from other sources. Under “Settings,” select “Application Settings” and then enable “Unknown Sources.”
  2. Attach the apk file to an email and send to your mobile device.
  3. After your mobile device has received the email. You can download the apk file and install it.

If you are not using the above mentioned WAR file, you have to change the URL inside the android application package. You can find the android code for the application inside the zip file Android_App.

2.5 C-Client

Required software and their installation:

2.5.1 libConfuse

libConfuse is a configuration file parser library and written in C. It supports sections and (lists of) values (strings, integers, floats, booleans or other sections), as well as some other features (such as single/double-quoted strings, environment variable expansion, functions and nested include statements). It makes very easy to add configuration file capability to a program using a simple API.
In this project we use libConfuse as a configuration file parser, to parse the configuration file, which includes the information for the http connection.
The library can be downloaded at http://www.nongnu.org/confuse/.
For more information about the installation process please read the Make file which is part of the library libConfuse.

2.5.2 OpenMPI

OpenMPI is an open source MPI-2 implementation that is developed and maintained by a consortium of academic, research and industry partners. Open MPI is therefore able to combine the expertise, technologies and resources from all across the High Performance Computing community in order to build the best MPI library available.
Introduction to install OpenMPI on Linux Ubuntu:

  1. Make sure your package repository is up to date. For this you have to run the command ** sudo apt-get update **.
  2. Make sure you have installed the GNU Compiler Collection, which should be part of the Ubuntu distribution. The command ** sudo apt-get install gcc g++ ** will install the compiler.
  3. In the final step you have do call following command ** sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev **. This will install OpenMPI, all necessary libraries, and the documentation for the MPI calls.

2.5.3 mpitopoinfo

The library mpitopoinfo was written by Mr. Dr. Prof. Keller. The main functionality of this library is to create communicators for all processes belonging to one node and to allocate virtual / shared memory for this particular communicator by using mmap. This allows the processes of one specific node to share there results through the memory.
This library is part of the MPI_C_Client zip-file which can be downloaded at https://sourceforge.net/projects/ompispecto
The simplest way to compile this package is:
1. ** cd ** to the directory containing the package's source code and type ** cmake . ** to start the build process of the library. It automatically generates the required makefile and other specific project files.
2. Type ** make ** to compile the package.
3. You can remove the program binaries from the source code directory by typing ** make clean .
4. For more details type ** make help
. It shows you all targets for this specific makefile.

2.5.4 libcurl

libcurl is a free client-side URL transfer library, supporting FTP, FTPS, Gopher, HTTP, HTTPS, SCP, SFTP, TFTP, Telnet, DICT, the file URI scheme, LDAP, LDAPS, IMAP, POP3, SMTP and RTSP. The library supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, Kerberos, HTTP form based upload, proxies, cookies, user-plus-password authentication, file transfer resume, and HTTP proxy tunneling.
For more information go to http://en.wikipedia.org/wiki/CURL
To install the library libcurl under ubuntu, type the command ** sudo apt-get install libcurl **.

2.6 MPI_C_Client

The MPI_C_Client zip-file contains almost all the files which will be needed to run the application OMPIspecto. The zip-file is divided in following folder structure:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|-> MPI_Wrapper
| |-> compiled (precompiled c files)
| | |-> src
| | | |-> OpenMPIWrapper.d
| | | |-> OpenMPIWrapper.o
| | | |-> WrapperMacro.d
| | | |-> WrapperMacro.o
| |-> src (source code of c header files)
| | |-> OpenMPIWrapper.c
| | |-> OpenMPIWrapper.h
| | |-> WrapperMacro.c
| | |-> WrapperMacro.h
|-> mpi_main.c (Test MPI application)
|-> Makefile
|-> server.conf
|-> README.txt
|-> mpitopoinfo.tar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These is a generic installation instructions.

The simplest way to compile this package is:

  1. ** cd ** to the directory inside of MPI_C_Client and type ** make ** to compile the package.

  2. You can remove the program binaries from the source code directory by typing ** make clean **.

If some problems occurred during the make process, you probably have to configure the make file. Make sure that the directory paths are all point to the right direction.

To execute the MPI_C_Client test application and to connect the c-client with the application server, follow the next two steps:

  1. Please customize the server configuration file (server.conf), which can be found in MPI_C_Client.
  2. To execute the text application type the command ** mpirun -np <number of="" processes=""> MPI_C_Client --conffile=server.conf **. Note that the starting process may take a while. </number>

Related

Wiki: Architecture - 1. Introduction
Wiki: Architecture - 2. Initial situation and objective
Wiki: Architecture - 3. Architecture & Technologies
Wiki: Architecture - 4. Use cases
Wiki: Architecture - 5. Security relevant requirements
Wiki: Installation - 1. Introduction
Wiki: Installation - 2. Installation
Wiki: Installation - 3. Getting the use cases

MongoDB Logo MongoDB