ExceleroLatestTop Stories

How-To: Run NVMesh Management in a Container

By October 15, 2019 No Comments

Why Containers

Containers let us pack software components with their dependencies and run them with some level of isolation from other containers and the host itself.

This can help us start our software quickly with one command on different operating systems without the need to install it or handle individual OS distributions issues.

Running NVMesh Management in a container makes it easier to deploy and scale the management instance on your cluster. No installation is required and running the container requires only one command.

We would like to deploy NVMesh Management and a MongoDB instance as different containers so that we can start each on a different host providing more redundancy and flexibility.

In this article, we will go through the steps of running the Management container and a separate MongoDB container to serve as the database.

Step 1 – Deploying a MongoDB container

>>> If you already have a local mongodb server available on port 27017, you can skip to Step 2.

We will create a simple directory to use as our database location on the host:
mkdir -p /data/nvmesh

NOTE: In a production environment we would prefer the MongoDB directory to be a persistent volume that can be later mounted on a different host instead of just a local directory on that specific host.

Now we can start the mongo container:

docker run -d –net=host –name mongodb-for-nvmesh -v /data/nvmesh:/data/db mongo:3.6

Step 2 – Deploying NVMesh-Management container

On the host where the NVMesh-Management should run:

Load the Docker image

First, load the excelero/nvmesh-management:<version> image to the docker instance on your machine:

docker load -i mgmt_docker_image_1.3.2.tar

Start the container

Now we are ready to run the NVMesh-Management container:

docker run -d –net=host –name nvmesh-mgmt excelero/nvmesh-management:1.3.2 -e MONGO_SERVERS=”your.mongo.server.com:27017″ 

Replace your.mongo.server.com with the IP or hostname of the server where you deployed the mongodb container. Use the localhost if it is on the same machine as the nvmesh-management container.

NOTE: For High Availability run this command on each of the NVMesh-Management hosts

Open Management GUI

You should be able to open the NVMesh Management GUI in the browser:
https://your.management.server.com:4000

Tips for use in Kubernetes

To use the NVMesh Management container within Kubernetes, we have some Kubernetes .yaml files ready for you to deploy, you can find them here Kubernetes YAML examples.

Gil Vitzinger

Author Gil Vitzinger

Software Developer at Excelero

More posts by Gil Vitzinger