Add Windows Support

Registered by Claudiu Belu

The purpose of this blueprint is to add the necessary changes needed in order to have monasca-agent running on Windows.

In order to achieve this, there are a couple of things that needs to be done:

* Replace monasca_agent.collector.virt.hyperv.utilsv2 and its usage with os_win utils and add os-win as a dependency in requirements.txt. os-win is an official OpenStack library containing Windows / Hyper-V specific code and it's currently a dependency in nova, cinder, ceilometer, networking-hyperv, and compute-hyperv.

* Avoid accesing Linux-specific modules, attributes, or functions on Windows. Examples include:
** signal.SIGUSR1 used in collector's daemon.
** os.statvfs function used in the disk checker.
** Different cpu stats used in the cpu checker that do not exist on Windows: nice, irq, softirq, iowait, steal.

* Refactor libvirt checker in a more generic and extendible one, so that Hyper-V, VMWare, and XenAPI checkers can easily be added.

Blueprint information

Status:
Started
Approver:
Roland Hochmuth
Priority:
Medium
Drafter:
Claudiu Belu
Direction:
Approved
Assignee:
Claudiu Belu
Definition:
Approved
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Claudiu Belu

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/add-windows-support,n,z

Addressed by: https://review.openstack.org/317919
    Adds config-file arg option

Addressed by: https://review.openstack.org/317920
    Properly get the conf.d folder

Addressed by: https://review.openstack.org/317921
    Skip setting up handler for SIGUSR1 on Windows

Addressed by: https://review.openstack.org/317922
    Adds Windows support for cpu checker

Addressed by: https://review.openstack.org/311925
    Hyper-V: replaces in-tree hyper-v utils usage with os_win

Addressed by: https://review.openstack.org/317965
    WIP: Refactors libvirt checker

Addressed by: https://review.openstack.org/320924
    Adds Windows support for disk checker

Addressed by: https://review.openstack.org/323034
    Adds factory method to AgentChecker

Addressed by: https://review.openstack.org/323563
    Fully abstracts the hypervisor checker

Addressed by: https://review.openstack.org/323564
    WIP: Adds Hyper-V as a hypervisor checker

Addressed by: https://review.openstack.org/323598
    Adds older psutil support to process checker

Addressed by: https://review.openstack.org/323828
    Refactors hypervisor checker inspections

Addressed by: https://review.openstack.org/353381
    Adds hypervisor checker factory method

Addressed by: https://review.openstack.org/359453
    Fixes WMI related checkers

Addressed by: https://review.openstack.org/370066
    Adds documentation for monasca-agent on Windows

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.