Skydive Service#

Skydive Service Class#

Classes:

Skydive(*[, analyzers, agents, networks, ...])

Deploy Skydive (see http://skydive.network/).

class enoslib.service.skydive.skydive.Skydive(*, analyzers: Iterable[Host] | None = None, agents: Iterable[Host] | None = None, networks: Iterable[Network] | None = None, priors: List[actions] | None = None, extra_vars: Dict | None = None)#

Deploy Skydive (see http://skydive.network/).

This assumes a debian/ubuntu base environment and aims at producing a quick way to deploy a skydive stack on your nodes. It’s opinionated out of the box but allow for some convenient customizations.

It is based on the Ansible playbooks found in skydive-project/skydive

Parameters:
  • analyzers – list of enoslib.Host where the skydive analyzers will be installed

  • agents – list of enoslib.Host where the agent will be installed

  • networks – list of networks as returned by a provider. This is visually see them in the interface

  • priors – prior to apply before deploying this service

  • extra_vars (dict) – extra variables to pass to the deployment

Examples

 1import logging
 2
 3import enoslib as en
 4
 5en.init_logging(level=logging.INFO)
 6en.check()
 7
 8
 9conf = (
10    en.VagrantConf()
11    .add_machine(roles=["control"], flavour="tiny", number=1)
12    .add_machine(roles=["compute"], flavour="tiny", number=1)
13    .add_network(roles=["mynetwork"], cidr="192.168.42.0/24")
14    .finalize()
15)
16
17# claim the resources
18provider = en.Vagrant(conf)
19roles, networks = provider.init()
20
21# generate an inventory compatible with ansible
22roles = en.sync_info(roles, networks)
23
24s = en.Skydive(analyzers=roles["control"], agents=roles["compute"] + roles["control"])
25s.deploy()
26
27ui_address = roles["control"][0].address
28print("The UI is available at http://%s:8082" % ui_address)
29
30s.backup()
31s.destroy()
32
33# destroy the boxes
34provider.destroy()
backup()#

(abstract) Backup the service.

deploy()#

Deploy Skydive service.

destroy()#

(abstract) Destroy the service.