Skip to content
Server which keeps track of the Status of the Users' APPs
JavaScript Shell HTML Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api_bash_scripts
api_command_line
docs
server_code
test_ws_appman
web-appmanager
LICENSE
README.md
appmanager_app.js
appmanager_view.png
elasticsearch.yml
list_of_users_github.ini
package-lock.json
package.json
setup-es-armv7-64.sh
setup-es.sh
setup-new-app-manager-server.sh
setup-nodejs-32.sh
setup-nodejs-64.sh
setup-nodejs-armv7l.sh
setup-server-armv7-64.sh
setup-server-x86-32.sh
setup-server-x86-64.sh
start-appmanager.sh
start-es.sh
stop-appmanager.sh

README.md

Application-Manager Server

PHANTOM APP_MANAGER server keepts track of the status of the running tasks (PHANTOM tools), the availability of the hardware, and historical brief reports of previous execution of applications.

This server allows users to suscribe by using websockets to get notifications on the changes on the tasks' status. Such notifications consists on forwarding a copy of the uploaded json.

1.- Introduction

The PHANTOM APP-MANAGER server is composed of two components: a web server (http://) and a WebSocket server (ws://). The web server provides various functionalities for data query and data analysis via RESTful APIs with documents in JSON format. The server's URL is "http://localhost:8500" by default.

Repository Schema

2.- Prerequisites

The server is implemented using Node.js, and connects to Elasticsearch to store and access Metadata. Before you start installing the required components, please note that the installation and setup steps mentioned below assume that you are running a current Linux as the operating system. The installation was tested with Ubuntu 16.04 LTS. Before you can proceed, please clone the repository:

git clone https://github.com/PHANTOM-Platform/Application-Manager.git;

OR alternatively, if you prefer to use svn instead of git:

svn export https://github.com/PHANTOM-Platform/Application-Manager.git/trunk Application-Manager;

Dependencies

This project requires the following dependencies to be installed:

Component Homepage Version
Elasticsearch https://www.elastic.co/products/elasticsearch = 2.4.6
Node.js https://apr.apache.org/ >= 4.5
npm https://www.npmjs.com/ >= 1.3.6

Installation of npm

When using Ubuntu, for example, please install npm as follows:

sudo apt-get install npm;

Alternatively, you can install it using your operating system's software installer.

Installation of other components

This section assumes that you've successfully installed all required dependencies as described in the previous paragraphs.

1.- To ease the installation and preparation process, there is one shell script provided, which downloads and installs all the dependencies and packages.

Installs Nodejs 9.4.0. and Elastic-Search 2.4.6 on the folder {your_local_home_folder}/phantom_server. Please choose the appropriate shell scripts depending on your Operating System:

Shell script for Intel-x86 32bits (tested on Ubuntu):

bash setup-server-x86-32.sh

or the Shell script for Intel-x86 64bits (tested on Ubuntu):

bash setup-server-x86-64.sh

or the Shell script for Armv7l 64bits (tested on Raspbian):

bash setup-server-armv7-64.sh

The default port is 8500, which can be modified at the file appmanager_app.js.

2.- The PHANTOM Repository relies on the Elasticsearch running on the SAME server, which should be installed by the previous scripts.

Please take a look on the next suggested reference books, if you face difficulties on the setup of ElasticSearch-Database server:

3.- Start/Stop the server

1.- The PHANTOM APP-MANAGER relies on the Elasticsearch running on the SAME server.

bash start-es.sh;

2.- Start a PHANTOM APP-MANAGER by executing, it is important to not do as root:

For security reasons, the services may not start if they are requested from root.

bash start-appmanager.sh;

You can use the following command to verify if the database and the server are running

Test of the Nodejs Front-end running service:

curl http://localhost:8500;

Test if the Front-end has access to the Elasticsearch DataBase Server.

curl -s http://localhost:8500/verify_es_connection;

For more details on setup the server, please look into the examples of Admin-use at api_command_line or api_bash_scripts (not developed for api_java because we will allow only the admin access on the localhost).

After the usage, the server can be stopped by:

bash stop-appmanager.sh;

4.- Configuration of USERS' accounts

After the installation, and before users can use the repository, it is needed to register the users.

The script setup-new-server.sh provides an automatic method for register multiple users. In particular, the script registers the list of users_ids and passwords from the file list_of_users.ini.

bash setup-new-app-manager-server.sh

NOTICE: For securoity reasons, users' accounts can be ONLY registered on the server. Requests from different IPs will be rejected.

5.- RESTful API Queries

Please refer to the Reference Manual of the RESTful API to get more details. The Manual contains a description of each of the implemented methods, with examples of use, and type of possible responses.

6.- Example of use

The folders api_command_line, api_bash_scripts, and api_java shows examples of using the PHANTOM REPOSITORY

Please access to those folders to get more details.

Video: Examples of use

There are some video tutorials available at Youtube and this channel:

Youtube PHANTOM Channel

Acknowledgment

This project is realized through PHANTOM. The PHANTOM project receives funding under the European Union's Horizon 2020 Research and Innovation Programme under grant agreement number 688146.

Contributing

Find a bug? Have a feature request? Please create an issue.

Main Contributors

Montanana, Jose Miguel, HLRS

Cheptsov, Alexey, HLRS

Release History

Date Version Comment
2018-03-22 0.9.0 First prototype
2019-05-15 1.0.0 Tested with Real Use Cases

License

Copyright (C) 2018 University of Stuttgart

Apache License v2.

You can’t perform that action at this time.