-
Notifications
You must be signed in to change notification settings - Fork 21
Infrastructure Abstraction Build and Installation
Infrastructure Abstraction is developed in Java and packaged as two Docker containers, one for the VIM-Adaptor and one for the WIM-adaptor. These two containers use the SP's '''PostgreSQL''' database to store infrastructure related information and the SP's '''RabbitMQ''' message bus is used to exchange messages with the other SP modules.
To build the VIM-Adaptor simply move into the VIM-Adaptor sub-folder of this repo and run:
docker build -t VIM-Adaptor .
To start the VIM-Adaptor run:
docker run -d --name VIM-Adaptor VIM-Adaptor /docker-entrypoint.sh
The relevant environment variables you can pass to the container are:
broker_host=son-broker
broker_uri=amqp://guest:guest@son-broker:5672/%2F
repo_host=x.x.x.x
repo_port=5432
repo_user=sonatatest
repo_pass=sonata
To build the VIM-Adaptor simply move into the WIM-Adaptor sub-folder of this repo and run:
docker build -t wim-adaptor .
To start the VIM-Adaptor run:
docker run -d --name wim-adaptor wim-adaptor /docker-entrypoint.sh
The relevant environment variables you can pass to the container are:
broker_host=son-broker
broker_uri=amqp://guest:guest@son-broker:5672/%2F
repo_host=x.x.x.x
repo_port=5432
repo_user=sonatatest
repo_pass=sonata
Basic configurations are limited to the connectivity parameters to these two entities. What follows is valid for both the VIM-Adaptor and the WIM-Adaptor container. These configuration parameters are stored in relevant configuration files (broker.config and postgres.config) that are passed to the container in the container building phase.
{
"repo_host": "REPOHOST",
"repo_port": "REPOPORT",
"user": "REPOUSER",
"pass": "REPOPASS",
}
{
"broker_url": "BROKERURL",
"exchange": "BROKEREXCHANGE"
}
Anyway, those values can be set dinamically through the docker environment variables stated below, together with their default values:
ENV broker_host broker
ENV broker_port 5672
ENV broker_exchange son-kernel
ENV broker_uri amqp://guest:guest@broker:5672/%2F
ENV repo_host postgres
ENV repo_port 5432
ENV repo_user sonatatest
ENV repo_pass sonata
These values are set inside the 'dockerised' configuration files through the following script, also packaged in the container.
#!/bin/bash
sed "s#BROKERURL#$broker_uri#" -i /etc/son-mano/broker.config
sed -i "s/BROKEREXCHANGE/$broker_exchange/" /etc/son-mano/broker.config
sed -i "s/REPOHOST/$repo_host/" /etc/son-mano/postgres.config
sed -i "s/REPOPORT/$repo_port/" /etc/son-mano/postgres.config
sed -i "s/REPOUSER/$repo_user/" /etc/son-mano/postgres.config
sed -i "s/REPOPASS/$repo_pass/" /etc/son-mano/postgres.config
Once the two containers of the abstraction layer are running and configured, there is still no information stored in the Infrastructure repository on the VIMs/WIMs to be used as NFVI. Since this information is more structured and can change at runtime, the IA provides a set of API through which those can be configured. Anyway, the only endpoint that the IA offers is through the message bus, therefore this configuration is facilitated for the users through the Gatekeeper module Gtk_vim and the Sonata GUI, which provides a more user-friendly way of configuring NFVI. The following image exemplifies the minimum configuration steps required to configure a simple NFVI composed by one NFVI PoP and one WIM.
