User Tools

Site Tools


soft:utilities

CONFINE utilities

confine-utils contains several utility libraries and scripts for working with CONFINE testbeds.

confine.api

A Python namespace package with some definitions to work with CONFINE REST APIs.

confine.client

A Python namespace package with some functions to program CONFINE REST API clients.

confw

XXXX TODO

Gateway scripts

list-nodes

A Python script using confine.client to create a list of the management addresses of the nodes in a CONFINE testbed group that match certain restrictions. For instance, to get the management addresses of nodes having direct interfaces with names starting with wlan in Community-Lab's Pangea group one could run:

$ python list-nodes.py -d 'wlan.*' https://controller.community-lab.net/api/groups/2
fdf5:5351:1dfd:7::2
fdf5:5351:1dfd:c0::2

Together with some parallel SSH client like PSSH, this can ease running maintenance tasks for non-superuser technicians. For instance, the following example provides similar results to the ConfineCatPlugin hack in Community-Lab, i.e. adding some /etc/hosts entries for nodes in certain islands (the sed invocation to append a :22 port number is a workaround for pssh bad handling of IPv6 addresses, see Debian bug #741537):

$ python list-nodes.py -i 1 5 -- https://controller.community-lab.net/api/groups/2 | sed 's/$/:22/' > NODE_ADDRS
$ cat COMMAND.sh
hosts="repo.confine-project.eu=10.228.207.12 distro.confine-project.eu=10.228.207.4"
for host in $hosts; do
    if ! grep -qe "^[^#]*\b${host%=*}\b" /etc/hosts; then
        echo "${host#*=} ${host%=*}" >> /etc/hosts
    fi
done
$ parallel-ssh -l root -h NODE_ADDRS -I < COMMAND.sh
[1] 15:58:20 [SUCCESS] fdf5:5351:1dfd:7::2:22

In the extreme, this tool may be coupled with some configuration management system like Ansible which only requires SSH and Python in administered hosts.

tinc-autoconfig

XXXX TODO

vct-lxc-builder

XXXX TODO

vnode

This directory contains utilities to help manage virtual CONFINE nodes (VMs) running in a physical machine, either using QEMU/KVM or VirtualBox. See vnode's readme file for more information.

soft/utilities.txt · Last modified: 2016/12/20 11:35 by ivilata