Execution-Manager
Server which keeps track of the Status of the Users' APPs
1.- Introduction
The PHANTOM Execution Manager server is composed of two components: a web server and a data storage system. 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:8700" by default.
The Execution Manager process the collected data by the Monitoring-Server.
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/Execution-Manager.git;
Dependencies
This project requires the following dependencies to be installed:
Component | Homepage | Version |
---|---|---|
Monitoring-Server | https://github.com/PHANTOM-Platform/Monitoring | |
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 8600, which can be modified at the file repo_app.js.
2.- The PHANTOM Execution-Manager 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:
- Elasticsearch in Action
- Elasticsearch Essentials
- Elasticsearch Server
- Elasticsearch: The Definitive Guide
- Elasticsearch Cookbook
4.- Start/Stop the server
1.- The PHANTOM Execution-Manager relies on the Elasticsearch running on the SAME server.
bash start-es.sh;
2.- Start a PHANTOM Execution-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-execmanager.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:8700;
Test if the Front-end has access to the Elasticsearch DataBase Server.
curl -s http://localhost:8600/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-execmanager.sh;
5.- 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-execmanager-server.sh
NOTICE: For securoity reasons, users' accounts can be ONLY registered on the server. Requests from different IPs will be rejected.
6.- 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.
7.- Example of use
The folders api_command_line, api_bash_scripts, and api_java shows examples of using the PHANTOM Execution-Manager
Please access to those folders to get more details.
Video: Examples of use
There are some video tutorials available at Youtube and this 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 |
---|---|---|
2019-05-15 | 1.0.0 | Tested with Real Use Cases |
License
Copyright (C) 2018 University of Stuttgart