Installation And Administration Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 9

DownloadInstallation And Administration Guide
Open PDF In BrowserView PDF
Private Public Partnership Project (PPP)
Large-scale Integrated Project (IP)

Installation & Administration Manual
Author: AEON Cloud Messaging GE development team (javier.garcia@atos.net)

Contents
AEON platform (Cloud Messaging GE) installation and configuration

2

Requires: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

Setting up the environment: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

Setting up the EVENTS-MANAGER module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

Setting up the REST module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

Setting up the FRONTEND module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

Deploy Cloud Messaging GE using Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

Deploy Cloud Messaging GE using Docker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

Sanity Check Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

End to End tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

List of running processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

Opened Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

Remote Service Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

Diagnosis Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

Resource Consumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

I/O flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

1

AEON platform (Cloud Messaging GE) installation and configuration
To get a wider information about aeon, please, go to the README.md file.

Requires:
• Node.js (version 0.10)
• RabbitMQ (version 3.1.2)
• MongoDB

Setting up the environment:
To install the whole platform project, it is necessary to download the code from three different modules: the
frontend, the rest and the events-manager module.
Setting up the EVENTS-MANAGER module.
Download the code:
1

$ git clone git@github.com:atos-ari-aeon/fiware-cloud-messaging-events-manager.git
Install necessary packages for node.js accordingly package.json:

1
2

$ cd ./fiware-cloud-messaging-events-manager/
$ npm install
Configure ./config/brokerconnetor_[environment].js with proper rabbitMQ values:
module.exports.url = “amqp://[user:password@]hostname[:port]”
Configure ./config/db_[environment].js with proper mongoDB values:
module.exports.host = “”;
module.exports.port = “”;
module.exports.db = “AEON”;
module.exports.username = “”;
module.exports.password = “”;
module.exports.collectionUsers = “AEONUsers”;
module.exports.collectionEntities = “AEONEntities”;
module.exports.collectionChannels = “AEONChannels”;
module.exports.collectionLogs = “AEONLogs”;
Run EVENTS-MANAGER:

1

$ node app.js &

2

Setting up the REST module.
Download the code:
1

$ git clone git@github.com:atos-ari-aeon/fiware-cloud-messaging-api.git
Install necessary packages for node.js accordingly package.json:

1
2

$ cd ./fiware-cloud-messaging-api/
$ npm install
Configure ./config/brokerconnetor_[environment].js with proper RabbitMQ values:
module.exports.url = “amqp://[user:password@]hostname[:port]”
Configure ./config/app_[environment].js with proper values:
module.exports.extHost = [externalHost]; //Rest API server IP
module.exports.host = [internalHost]; //Rest API server internal IP (if different)
module.exports.socket_server_host = [externalHost]; //Events-Manager server IP
module.exports.extHostGUI = [externalHost]; //Dashboard server IP
Configure ./config/db_[environment].js with proper mongoDB values:
module.exports.host = “”;
module.exports.port = “”;
module.exports.db = “AEON”;
module.exports.username = “”;
module.exports.password = “”;
module.exports.collectionUsers = “AEONUsers”;
module.exports.collectionEntities = “AEONEntities”;
module.exports.collectionChannels = “AEONChannels”;
module.exports.collectionLogs = “AEONLogs”;
Run REST:

1

$ node app.js &

3

Setting up the FRONTEND module.
Download the code:
1

$ git clone git@github.com:atos-ari-aeon/fiware-cloud-messaging-dashboard.git
Navigate to the specific folder:

1

$ cd ./fiware-cloud-messaging-dashboard/
Configure ./app/controllers/config.js with proper values:
RECAPTCHA_PUBLIC_KEY: ‘captchaKey’
AEON_HOST: [externalHost], //Rest API server IP
AEON_PORT: [externalHost], //Rest API server PORT
Run FRONTEND:

1

$ node scripts/web-server.js &
To get the live demo running, it is necessary to create an entity and a channel after setting up an account. After
that, go to the ./app/controllers/config.js and set the values:
LIVE_DEMO_PUBURL: “Channel publication url”
LIVE_DEMO_SUBURL: “Channel subscription url”

Deploy Cloud Messaging GE using Image
To deploy the Cloud Messaging GE using the image recipes, it is necessary to download them from the repo:
1

$ git clone https://github.com/atos-ari-aeon/fiware-cloud-messaging-platform.git
Navigate to the development environment folder:

1

$ cd ./fiware-cloud-messaging-platform/development_environment/AeonInstallAndConfig
Execute the script aeon.sh:

1

$ ./aeon.sh
When the script finishes, navigate to the aeonConfiguration folder:

1

$ cd /home/aeon/aeonConfiguration
Once here, it is necessary to configure the puppet files with your external and internal IPs. The files that need
to be edited are:

1
2
3

$ vim /home/aeon/aeonConfiguration/aeon_dashboard/manifests/main.pp
$ vim /home/aeon/aeonConfiguration/aeon_api/manifests/main.pp
$ vim /home/aeon/aeonConfiguration/aeon_events_manager/manifests/main.pp
and the varibles to be set are $internalIP and $externalIP.
Finally, execute the puppet apply commands:

1
2
3

$ sudo puppet apply --modulepath /home/aeon/aeonConfiguration/aeon_api/modules /home/aeon/aeonCo
nfiguration/aeon_api/manifests/main.pp
$ sudo puppet apply --modulepath /home/aeon/aeonConfiguration/aeon_events_manager/modules /home/
aeon/aeonConfiguration/aeon_events_manager/manifests/main.pp
$ sudo puppet apply --modulepath /home/aeon/aeonConfiguration/aeon_dashboard/modules /home/aeon/
aeonConfiguration/aeon_dashboard/manifests/main.pp
After finishing, the Cloud Messaging will be accesible.
4

Deploy Cloud Messaging GE using Docker
It is possible to deploy the Cloud Messaging GE using Docker. Here you have the steps:
Download the Cloud Messaging GE from the repo:
1

$ git clone https://github.com/atos-ari-aeon/fiware-cloud-messaging-platform.git
Navigate to the docker folder

1

$ cd ./fiware-cloud-messaging-platform/docker
Edit the docker-compose.yml file. Add your ip in the field “docker_host”:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

mongo:
container_name: "mongo"
build: env/mongodb
ports:
- "27017:27017"
rabbitmq:
image: rabbitmq
container_name: "rabbitmq"
ports:
- "5672:5672"
- "15672:15672"
events:
container_name: "events"
build: ./aeon-events-manager
ports:
- "7789:7789"
links:
- mongo
- rabbitmq
dashboard:
container_name: "dashboard"
build: ./aeon-dashboard
ports:
- "8080:8000"
rest:
container_name: "rest"
build: ./aeon-api
ports:
- "3000:3000"
links:
- mongo
- rabbitmq
- events
- dashboard
extra_hosts:
- "docker_host: "
Run the script file:

1

$ ./deploy_aeon.sh
This script will download the source code from the different repositories and will execute the docker-compose.yml
file to run the Cloud Messaging GE.

Sanity Check Procedures
The Sanity Check Procedures are the steps that a System Administrator will take to verify that an installation
is ready to be tested. This is therefore a preliminary set of tests to ensure that obvious or basic malfunctioning
is fixed before proceeding to unit tests, integration tests and user validation.
5

End to End tests
It is possible to test the Cloud Messaging GE by accessing to its dashboard:
1

http://\:8080
To test if everything is running properly, try to create a new user by clicking the “Sign Up” button. After the
registration process, you will be redirected to the main page. Once here do the following:
•
•
•
•
•
•
•

Create a new entity with a given name
Create a new channel for that entity with a given name
From the menu bar, open the publication and the subscription demo apps.
In the subscription demo app, select the existing channel and press the “Subscribe” button.
In the publication demo app, select the existing channal and press the “Attach” button.
Send some position messages.
In the subscription demo app, verify that the positions sent appears in the map.

Everything is working fine!
List of running processes
To check if the Cloud Messaging is running, three processes must be running:
1
2
3

 4386 0.0 0.6 658976 6492 ? Sl 09:55 0:00 node scripts/web-server
 5046 0.2 2.5 672980 26304 ? Sl 09:56 0:00 node app.js
 5281 0.4 6.7 728852 68896 ? Sl 09:56 0:00 node app.js
Those three processes belong to the three modules that are part of the Cloud Messaging GE. Apart from them,
it is necessary to have a RabbitMQ server and a MongoDB up and running:

1
2
3

root 4424 1.1 4.1 530056 41824 ? Ssl 09:55 0:14 mongod
999 4240 0.0 0.0 4084 300 ? Ss 09:55 0:00 tini -- rabbitmq-server
999 4258 0.1 6.6 130448 67508 ? Sl 09:55 0:02 /usr/lib/erlang/erts-6.4.1/bin/beam -W w -A
64 -P 1048576 -K true -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.4/sbin/../ebin -noshell -noinput -s rabbit boot
-sname rabbit@e3909f035dc1 -boot start_sasl -config /etc/rabbitmq/rabbitmq -kernel inet_def
ault_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger tty -r
abbit error_logger tty -rabbit sasl_error_logger tty -rabbit enabled_plugins_file "/etc/rabb
itmq/enabled_plugins" -rabbit plugins_dir "/usr/lib/rabbitmq/lib/rabbitmq_server-3.5.4/sbin
/../plugins" -rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@e3909f035dc1-plugin
s-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false
-mnesia dir "/var/lib/rabbitmq/mnesia/rabbit@e3909f035dc1" -kernel inet_dist_listen_min 256
72 -kernel inet_dist_listen_max 25672

Opened Ports
To get the needed ports used by the Cloud Messaging GE, we have executed the next command:
1

netstat -plnt
As a result, we identified the processed related to nodejs, rabbitmq and mongod:

1
2
3
4
5
6
7
8

Proto Recv-Q Send-Q Local Address
tcp
0
0 :3000
tcp
0
0 0.0.0.0:8080
tcp
0
0 0.0.0.0:7789
tcp
0
0 0.0.0.0:15672
tcp
0
0 0.0.0.0:27017
tcp
0
0 0.0.0.0:28017
tcp6
0
0 :::5672

Foreign Address
0.0.0.0:*
0.0.0.0:*
0.0.0.0:*
0.0.0.0:*
0.0.0.0:*
0.0.0.0:*
:::*

6

State
LISTEN
LISTEN
LISTEN
LISTEN
LISTEN
LISTEN
LISTEN

PID/Program name
6913/nodejs
6898/nodejs
6898/nodejs
18565/beam.smp
1555/mongod
1555/mongod
18565/beam.smp

Remote Service Access
To check if the Cloud Messaging GE is updated and up & running, it is necessary to invoke the service:
1

http://130.206.81.70:3000/version
The output of this execution should be the actual version of AEON.

1

{
"code": 200,
"desc": "ok",
"result": [
{
"version": "0.2.2",
"codename": "Bolt"
}
]

2
3
4
5
6
7
8
9
10

}

Diagnosis Procedures
Resource Consumptions
The Cloud Messaging GE is prepared to be deployed in a cloud environment. It can be installed in a phisical
machine with the following characteristics:
Machine Type
CPU
RAM
HDD
Operating System

Physical Machine
Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
4 GB
500 GB
Ubuntu 14.04

We have test the two main modules of the platform:
Idle services:
CPU (%)
Rest Interface
Events-Manager

0%
0%

RAM (MB)
70 MB
65 MB

1000 publishing request from 3 clients
CPU (%)
Rest Interface
Events-Manager

7%
2%

RAM (MB)
100 MB
70 MB

50000 publishing requests from 100 clients
CPU (%)
Rest Interface
Events-Manager

40 %
12 %

RAM (MB)
100 MB
70 MB

7

I/O flows
Use the following commands to manage the Cloud Messaging modules respectively:
For the Events Manager:
1
2
3
4

$
$
$
$

sudo
sudo
sudo
sudo

service
service
service
service

aeon_events
aeon_events
aeon_events
aeon_events

start
stop
restart
status

For the REST API:
1
2
3
4

$
$
$
$

sudo
sudo
sudo
sudo

service
service
service
service

aeon_rest
aeon_rest
aeon_rest
aeon_rest

start
stop
restart
status

For the Front-end:
1
2
3
4

$
$
$
$

sudo
sudo
sudo
sudo

service
service
service
service

aeon_frontend
aeon_frontend
aeon_frontend
aeon_frontend

start
stop
restart
status

The Cloud Messaging GE logs file are stored in the folder /var/log/ under the files:
/var/log/aeon_events.log
/var/log/aeon_rest.log
/var/log/aeon_frontend.log

8



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Modify Date                     : 2016:01:08 12:52:13Z
Create Date                     : 2016:01:08 12:52:13Z
Creator                         : pdftk 2.01 - www.pdftk.com
Producer                        : itext-paulo-155 (itextpdf.sf.net-lowagie.com)
Page Count                      : 9
EXIF Metadata provided by EXIF.tools

Navigation menu