For the convenience of the end-users, an official Docker image is provided. Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualisation on Linux 1.
In order to deploy the VIM monitoring back-end, be sure to deploy the necessary Docker containers and to configure accordingly the monitoring agents.
The monitoring back-end requires an InfluxDB instance to host the monitoring data. The official Docker image is used in the T-NOVA testing infrastructure and is highly recommended.
Run it with the following command:
docker run -d --name influxdb \
--restart always \
-p 8083:8083 -p 8086:8086 -p 25826:25826/udp \
-v $PWD/influxdata:/var/lib/influxdb \
-v $PWD/types.db:/usr/share/collectd/types.db \
-e INFLUXDB_REPORTING_DISABLED=true \
-e INFLUXDB_COLLECTD_ENABLED=true \
-e INFLUXDB_COLLECTD_BIND_ADDRESS=":25826" \
-e INFLUXDB_COLLECTD_DATABASE="statsdb" \
-e INFLUXDB_COLLECTD_TYPESDB="/usr/share/collectd/types.db" \
influxdb:alpine
The docker run
command above had the following options:
-d
: This is to start the container in detached mode.--name influxdb
: This is an identifier of the Docker container.--restart=always
: Always restart the container regardless of the exit status. This is to ensure starting the container during the Docker daemon start, in case the host restarts.--volume
option: The only data volume is used here to persist the database files.-p
options: The published port 8083 provides an HTTP user interface, port 8096 an HTTP API and port 25826 the collectd interface.--env
options: This is to create the database (statsdb in the example) that is going to be used for storing collectd data, and to set the listening port for collectd connections.
Run the following command:
docker run --name monitoring_backend -d --restart=always \
--env 'CEILOMETER_ENABLED=true' \
--env 'CEILOMETER_HOST=localhost' --env 'CEILOMETER_PORT=8777' \
--env 'POLLING_INTERVAL=600000' \
--env 'NOVA_HOST=localhost' --env 'NOVA_PORT=8774' \
--env 'IDENTITY_HOST=localhost' --env 'IDENTITY_PORT=5000' \
--env 'IDENTITY_TENANT=tenant' \
--env 'IDENTITY_USERNAME=username' --env 'IDENTITY_PASSWORD=pass' \
--env 'ALARM_POLLING_INTERVAL=10000' \
--volume /srv/docker/tnova_vim/subscriptions.json:/subscriptions.json \
--link influxdb:influxdb \
--publish 8080:3000 \
spacehellas/tnova-vim-backend:latest
The docker run
command above had the following options:
--name monitoring_backend
: This is an identifier of the Docker container.-d
: This is to start the container in detached mode.--restart=always
: Always restart the container regardless of the exit status. This is to ensure starting the container during the Docker daemon start, in case the host restarts.--env
options: The environment variables are explained in the next section.--volume
option: The only data volume is used here to persist the/subscriptions.json
file, so that subscriptions are not lost between restarts.--link influxdb:influxdb
: This option links the back-end container with the InfluxDB one. Docker bridges this way the two containers automatically and the back-end container can detect which ports InfluxDB listens to.--publish 8080:3000
: The back-end application listens to port 3000 inside the container.
Name | Description |
---|---|
CEILOMETER_ENABLED | Defines if the monitoring backend polls the OpenStack Ceilometer service (default: true) |
CEILOMETER_HOST | Defines the host of the OpenStack Ceilometer service |
CEILOMETER_PORT | Defines the port of the OpenStack Ceilometer service |
POLLING_INTERVAL | Defines the polling interval to the OpenStack Ceilometer service (in milliseconds) |
NOVA_HOST | Defines the host of the OpenStack Nova service |
NOVA_PORT | Defines the port of the OpenStack Nova service |
IDENTITY_HOST | Defines the host of the OpenStack Identity (Keystone) service |
IDENTITY_PORT | Defines the port of the OpenStack Identity (Keystone) service |
IDENTITY_TENANT | Defines the OpenStack tenant's name |
IDENTITY_USERNAME | Defines the OpenStack username |
IDENTITY_PASSWORD | Defines the OpenStack password |
ALARM_POLLING_INTERVAL | Defines the polling interval for alarm triggering (in milliseconds) |
Feel free to use Grafana for visualising the available monitoring data:
docker run --name grafana -d --restart=always \
--publish 3000:3000 \
grafana/grafana:latest
The VIM Monitoring Back-End uses collectd to collect the VNF instance monitoring data. Most importantly, it requires the collectd network plugin to be setup against the InfluxDB in order to send monitoring data:
<Plugin network>
Server "<influxdb_host>" "<influxdb_port>"
ReportStats false
</Plugin>
where <influxdb_host> and <influxdb_port> are the hostname and the port that are set previously for the InfluxDB Docker container.
For a more complete collectd configuration file, please refer to the recommended collectd configuration template.
The official Docker image is based on a minimal Node.js Docker image. It was selected due to its small size: it does not exceed 40 MB. This image is built on Alpine Linux and contains additionally just the node as a static binary with no npm.
As such, it is required to run npm install
locally before running docker build
, so that Docker just copies all the necessary files and the image will
not need npm
installed in.
Having ensured that docker
and npm
are working, run the following commands
in the project's root directory:
npm install
docker build --tag=spacehellas/tnova-vim-backend .
Footnotes
-
O'Gara, Maureen (26 July 2013). "Ben Golub, Who Sold Gluster to Red Hat, Now Running dotCloud". SYS-CON Media. Retrieved 2016-01-15. ↩