genvid.toolbox.LinuxServiceInstaller

class genvid.toolbox.LinuxServiceInstaller(**kwargs)

Bases: ServiceInstaller

Install the supervisor services on a Linux server.

NAME = 'service-installer-linux'

The name of the logger for this tool. Must be redefined in children.

SERVICES = ('consul', 'nomad', 'vault', 'docker')

The list of all services.

SERVICE_CLASSES = {'consul': <class 'genvid.toolbox.linuxservice.LinuxConsulService'>, 'docker': <class 'genvid.toolbox.linuxservice.LinuxDockerService'>, 'nomad': <class 'genvid.toolbox.linuxservice.LinuxNomadService'>, 'vault': <class 'genvid.toolbox.linuxservice.LinuxVaultService'>}

The base class associated with each service.

get_service_class(service)

Returns the class of the named service.

add_consul_dns()
restart_dhclient()
add_commands()

Add service installer and Consul commands.

run_command(command, options)

Run command with those options.

You must override this method.

Parameters
  • command – The name of the command to run.

  • options – A argparse.Namespace object with the options pass in arguments.

class linuxservice.LinuxServiceInstaller

Implementation of genvid.toolbox.LinuxServiceInstaller