Sign inSign up

internap/virtualpdu

By internap

•Updated over 9 years ago

This project builds a Docker image running VirtualPDU, a Power Distrbution Unit (PDU) simulator.

Image
1

441

internap/virtualpdu repository overview

⁠virtualpdu-container

This project builds a Docker image running VirtualPDU⁠, a Power Distrbution Unit (PDU) simulator.

As of today, only the SNMPv2 protocol over UDP is supported and it has the ability simulates the following PDUs:

⁠Quick start

⁠Using Docker
⁠From source
$ docker build -t virtualpdu .
$ docker run virtualpdu
⁠From Docker Hub
$ docker run internap/virtualpdu:latest
⁠Using Docker-Compose
⁠From source
$ docker-compose up --build
    
⁠From Docker Hub
$ docker-compose -f docker-compose.yml -f docker-compose.prebuilt.yml up -d

    

⁠Configuration

To configure the service, some environment variables must be set. It is possible to pass a complete configuration to simulate multiple units or only the settings to override if there is only one unit to simulate.

⁠Full configuration

In this mode, the config environment variable must be set with the content of the configuration file that VirtualPDU⁠ expects.

Example from docker-compose.yml:

services:
  virtualpdu:
    image: "internap/virtualpdu:latest"
    ports:
     - '9997:9997/udp'
    environment:
      config: |
        [global]
        libvirt_uri=test:///default
        outlet_default_state=ON

        [my_second_pdu]
        listen_address=0.0.0.0
        listen_port=9997
        community=public
        ports=2:test
⁠Single PDU configuration

In this mode, only the configuration that needs to be changed has to be declared as an environment variable.

VariableDefault value
outlet_default_stateON
libvirt_uritest:///default
listen_address0.0.0.0
listen_port161
communitypublic
ports0:default

Example from docker-compose.yml:

services:
  virtualpdu:
    image: "internap/virtualpdu:latest"
    ports:
     - '9997:9997/udp'
    environment:
      libvirt_uri: test:///default
      outlet_default_state: OFF
      listen_address: 0.0.0.0
      listen_port: 9997
      community: public
      ports: 2:test

⁠Advanced usage with libvirt⁠

By default, the simulator will not interact with outside resources, unless a proper libvirt_uri⁠ is defined, and a outlet:domain mapping is provided in the ports environment variable. In that case, the corresponding libvirt domain will be started and stopped based on the outlet state.

This container image does not provide a libvirt-server, it's up to the user to provide their own libvirt provider.

Tag summary

Content type

Image

Digest

Size

113.2 MB

Last updated

over 9 years ago

docker pull internap/virtualpdu