-
Notifications
You must be signed in to change notification settings - Fork 1
IA Build and Installation
Infrastructure Abstraction is developed in Java and packaged as Docker containers, one for the IA-NBI and others for the VIM/WIM Wrappers. These 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 IA-NBI simply move into the ia-nbi
sub-folder of this repo and run:
docker build -t ia-nbi .
To start the IA-NBI run:
docker run -d --name ia-nbi ia-nbi /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/Wim Wrappers that are developed in Java the procedure was the same like IA-NBI.
Basic configurations are limited to the connectivity parameters to these entities. What follows is valid for both the IA-NBI and the VIM/WIM Wrappers containers. 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 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 REST API through which those can be configured.