Prophet is a tool to discover resources detailed for cloud migration, cloud backup and disaster recovery

Related tags

Miscellaneousprophet
Overview

HyperBDR

云迁移/云灾备必备的调研工具

 release Stars


目录

项目说明

prophet是一个用于云迁移与云灾备前期技术调研使用的工具,目前主要对源端主机的基本情况进行采集,通过技术指标的比对,确保被调研的源端主机能够正确被HyperMotion/HyperBDR工具正确迁移或灾备。该项目目前已经在多个实际的云迁移和云灾备项目中得到验证,可以放心使用。

该项目未来发展的愿景是提供一站式调研平台,包括但不限于如下资源:各种云平台资源使用状况、文件存储、对象存储、容器平台、大数据平台、中间件、数据库等。同时也将提供蓝图画板,方便在项目前期进行方案编写使用,降低云迁移与云灾备过于冗长的前期调研周期。

目前prophet主要有以下功能组成:

  • 通过nmap指令扫描全网存活的主机,并尽量通过包信息分析主机的基本情况
  • (稳定)通过VMWare API接口采集主机的详细信息,包含计算、存储和网络等与主机迁移
  • (测试)通过Ansible获取Linux主机的详细信息,包含计算、存储和网络等与主机相关信息
  • (测试)通过Windows WMI接口采集Windows主机的详细信息,包含计算、存储和网络等与主机相关信息
  • (稳定)将采集后的结果以yaml格式进行打包和压缩,并进行脱敏处理(移除用户相关信息)
  • (稳定)对采集后的结果进行分析,得出最终的技术调研结论

安装说明

代码安装

git clone https://github.com/Cloud-Discovery/prophet

cd prophet
virtualenv venv
source venv/bin/activate

pip install -r requirements.txt
pip install .

容器方式

目前该项目每次提交后都会自动进行构建并推送到国内容器源中,可以直接使用

docker pull registry.cn-beijing.aliyuncs.com/oneprocloud-opensource/cloud-discovery-prophet:latest

使用说明

基本使用流程

  1. 扫描指定的IP地址段
  2. 在扫描结果的csv中,填写需要获取详情的主机鉴权信息
  3. 批量采集
  4. 分析, 得到结果

(稳定)功能一:扫描全网运行的实例

功能说明

通过网络扫描发现某一网段内存活的主机,并进行记录,可以作为后续更详细信息采集的输入。扫描完成后,将自动在指定路径下生成scan_hosts.csv文件,用于存储信息。

***** 注意:为了防止对生产环境造成较大压力,扫描时采用单进程方式,所以扫描进度较慢,经过测算扫描一个子网掩码为24的子网所需要30分钟左右的时间。**

usage: prophet-collect scan [-h] --host HOST [--arg ARG] --output-path
                            OUTPUT_PATH

optional arguments:
  -h, --help            show this help message and exit
  --host HOST           Input host, example: 192.168.10.0/24, 192.168.10.1-2
  --arg ARG             Arguments for nmap, for more detailed, please check
                        nmap document
  --output-path OUTPUT_PATH
                        Generate initial host report path

示例一: 获取子网主机

扫描192.168.10.0/24所有存活主机信息,并将csv文件生成在/tmp目录中。

prophet-collect scan --host 192.168.10.0/24 --output-path /tmp/

示例二: 获取指定IP网段主机

扫描192.168.10.2-192.168.10.50所有存活主机信息,并将csv文件生成在/tmp目录中。

prophet-collect scan --host 192.168.10.2-50 --output-path /tmp/

csv结构说明

字段名称 字段说明
hostname 主机名,可以为空
ip 用户IP地址,必须
username 用户名,如果为VMware,则为ESXi或者vCenter的用户名
password 密码,如果为VMware,则为ESXi或者vCenter的用户名
ssh_port Linux,该字段为ssh端口VMware ESXi或vCenter则为连接端口,默认为443Windows则默认为空
key_path 如果为密钥登陆,需要指定密钥的绝对路径,否则为空
mac 主机MAC地址,可以为空
vendor 生产厂商,可以为空,如果是VMware运行的虚拟机则为VMware
check_status 是否需要采集详细信息, 如果需要则设置为check,否则工具将自动跳过
os 操作系统类型,目前支持的类型为:Linux/Windows/VMware,大小写敏感
version 操作系统的版本,可以为空
tcp_ports 对外开放的端口,可以为空
do_status 详细信息采集状态,表示是否完成采集或者失败,默认为空

参考样例

(稳定)功能二:详细信息采集

功能说明

用户在模板填入鉴权信息后,进行进一步详细扫描。

注意:

  • 如果是VMware的虚拟机,则只会通过所在的ESXi主机进行扫描
  • 如果是Windows主机,需要Administrator用户进行扫描
  • 采集主机如果成功,则再次运行脚本时不会再进行采集,除非用户指定force-check参数
  • 采集失败的主机在下一次采集时,会重新采集
  • 最终生产的压缩包,一切与用户鉴权相关的敏感信息都已经被移除
  • (稳定)目前VMware采集部分是稳定的
  • (测试)目前Linux和Windows采集部分仍然是测试版本
usage: prophet-collect collect [-h] --host-file HOST_FILE --output-path
                               OUTPUT_PATH [-f]

optional arguments:
  -h, --help            show this help message and exit
  --host-file HOST_FILE
                        Host file which generated by network scan
  --output-path OUTPUT_PATH
                        Output path for batch collection
  -f, --force-check     Force check all hosts

示例:执行采集

首先需要在生成的scan_csv.csv中更新要采集主机的鉴权信息。

prophet-collect collect --host-file /tmp/scan_hosts.csv --output-path /tmp -f

采集结果说明

采集目录结构

host_collection_info
|-- linux_hosts -> Linux主机采集信息
|-- vmware_hosts -> VMWare主机采集信息
`-- windows_hosts -> Windows主机采集信息
|-- mac_info.yaml -> 所有主机根据Mac地址进行索引,便于后续分析
|-- prophet.log -> 采集过程中的日志,便于对于未知场景分析
|-- scan_hosts.csv -> 采集的主机文件,含开放端口信息

另外在输出目录中会生成host_collection_info_xxxxxxx.zip文件,该文件为最终用于分析的压缩文件。

(稳定)功能三: 分析并输出报告

功能说明

将采集后的结果进行分析,并输出最终的可迁移性报告,该部分可以根据需求扩展。

usage: prophet-analysis report [-h] --package-file PACKAGE_FILE --output-path
                               OUTPUT_PATH [--clean]

optional arguments:
  -h, --help            show this help message and exit
  --package-file PACKAGE_FILE
                        Investigate package file which is genreated by
                        prophet-collect
  --output-path OUTPUT_PATH
                        Generate report path
  --clean               Generate report path

示例:分析并输出报告

prophet-analysis -d -v report --package-file /tmp/host_collection_info_20211215202459.zip --output-path /tmp

贡献者

感谢以下贡献者为本项目做出的贡献

Mechanized literally means automation.

Mechanized literally means automation. And this branch which you are now observing is automated by the python script. This python project actually automates my workflow related to Git & Github.

Shreejan Dolai 4 Nov 11, 2022
CuraMultiplyByGrid - Cura Плагин для размножения детали сеткой на весь стол автоматически без поворота

CuraMultiplyByGrid Cura Плагин для размножения детали сеткой на весь стол автоматически без поворота. Размножение в куре настолько ужасно реализовано,

3 Dec 02, 2022
It is a personal assistant chatbot, capable to perform many tasks same as Google Assistant plus more extra features...

PersonalAssistant It is an Personal Assistant, capable to perform many tasks with some unique features, that you haven'e seen yet.... Features / Tasks

Roshan Kumar 95 Dec 21, 2022
Home Assistant integration for spanish electrical data providers (e.g., datadis)

homeassistant-edata Esta integración para Home Assistant te permite seguir de un vistazo tus consumos y máximas potencias alcanzadas. Para ello, se ap

VMG 163 Jan 05, 2023
Hexa is an advanced browser.It can carry out all the functions present in a browser.

Hexa is an advanced browser.It can carry out all the functions present in a browser.It is coded in the language Python using the modules PyQt5 and sys mainly.It is gonna get developed more in the fut

1 Dec 10, 2021
Listen Surah, prepare for next and Endless life...

Al-Quran In this repository, I have linked up all Surah with Arabic-Bangla Audio From Youtube. So, you just need to choose and listen. and the ( surah

SpiderX 1 Sep 30, 2022
Basic infrastructure for writing scripts in Python

Base Script Python is an excellent language that makes writing scripts very straightforward. Over the course of writing many scripts, we realized that

Deep Compute, LLC 9 Jan 07, 2023
Access Modbus RTU via API call to Sungrow WiNet-S

SungrowModbusWebClient Access Modbus RTU via API call to Sungrow WiNet-S Class based on pymodbus.ModbusTcpClient, completely interchangeable, just rep

8 Oct 30, 2022
Solcast Integration for Home Assistant

Solcast Solar Home Assistant(https://www.home-assistant.io/) Component This custom component integrates the Solcast API into Home Assistant. Modified

Greg 45 Dec 20, 2022
A dead-simple service that notifies you when something goes down.

Totmannschalter Totmannschalter (German for dead man's switch) is a simple service that notifies you when it has not received any message from a servi

1 Dec 20, 2021
Passenger Car Unit (PCU) Calculator

This is a streamlit web application which can be used to calculate Passenger Car Unit (PCU) values for a selected road section.

Dineth Dhananjaya 1 Apr 26, 2022
YunoHost is an operating system aiming to simplify as much as possible the administration of a server.

YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.

YunoHost 1.5k Jan 09, 2023
Uproot - A script to bring deeply nested files or directories to the surface

UPROOT Bring deeply nested files or folders to the surface Uproot helps convert

Ted 2 Jan 15, 2022
GEGVL: Google Earth Based Geoscience Video Library

Google Earth Based Geoscience Video Library is transforming to Server Based. The

3 Feb 11, 2022
The update manager for the ERA App (era.sh)

ERA Update Manager This is the official update manager used in the ERA app (see era.sh) How it works Once a new version of ERA is available, the app l

Kian Shahriyari 1 Dec 29, 2021
On this repo, you'll find every codes I made during my NSI classes (informatical courses)

👨‍💻 👩‍💻 school-codes On this repo, you'll find every codes I made during my NSI classes (informatical courses) French for now since this repo is d

EDM 1.15 3 Dec 17, 2022
An OpenSource crowd-sourced cooking recipes website

An OpenSource crowd-sourced cooking recipes website

21 Jul 31, 2022
Free APN For Python

Free APN For Python

XENZI GANZZ 4 Apr 22, 2022
In this project, we'll be creating a virtual personal assistant for ourselves using our favorite programming language

In this project, we'll be creating a virtual personal assistant for ourselves using our favorite programming language, Python. We can perform several offline as well as online operations using the bo

Ashutosh Krishna 188 Jan 03, 2023