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

贡献者

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

Collection of Beginner to Intermediate level Python scripts contributed by members and participants.

Hacktoberfest2021-Python Hello there! This repository contains a 'Collection of Beginner to Intermediate level Python projects', created specially for

12 May 25, 2022
Script to quickly get the metrics from Github repos to analyze.

commit-prefix-analysis Script to quickly get the metrics from Github repos to analyze. Setup Install the Github CLI. You'll know its working when runn

David Carpenter 1 Dec 17, 2022
Simple but maybe too simple config management through python data classes. We use it for machine learning.

👩‍✈️ Coqpit Simple, light-weight and no dependency config handling through python data classes with to/from JSON serialization/deserialization. Curre

coqui 67 Nov 29, 2022
NewsBlur is a personal news reader bringing people together to talk about the world.

NewsBlur NewsBlur is a personal news reader bringing people together to talk about the world.

Samuel Clay 6.2k Dec 29, 2022
Fried Chicken Programming Language

Fried-Chicken Fried Chicken Programming Language How To Run Once downloaded and opened, choose any file for code. Any file extensions work. Just make

Attachment Studios 9 Jul 11, 2022
A pomodoro app written in Python

Pomodoro It's a pomodoro app written in Python. You can minimize it while you're working if you want to, it'll pop up on your screen when the timer is

Yiğit 1 Dec 20, 2021
Manjaro CN Repository

Manjaro CN Repository Automatically built packages based on archlinuxcn/repo and manjarocn/docker. Install Add manjarocn to /etc/pacman.conf: Please m

Manjaro CN 28 Jun 26, 2022
30DaysOfCode-PhoenixClub - Solution of everyday coding problem given in 30DaysofCode contest held on Hackerrank

30DaysOfCode-PhoenixClub 👨‍💻 Every day problems solution given in 30DaysOfCode

Urveshkumar 8 Jan 30, 2022
A modern Python build backend

trampolim A modern Python build backend. Features Task system, allowing to run arbitrary Python code during the build process (Planned) Easy to use CL

Filipe Laíns 39 Nov 08, 2022
Python script for diving image data to train test and val

dataset-division-to-train-val-test-python python script for dividing image data to train test and val If you have an image dataset in the following st

Muhammad Zeeshan 1 Nov 14, 2022
A beacon generator using Cobalt Strike and a variety of tools.

Beaconator is an aggressor script for Cobalt Strike used to generate either staged or stageless shellcode and packing the generated shellcode using your tool of choice.

Capt. Meelo 441 Dec 17, 2022
[x]it! support for working with todo and check list files in Sublime Text

[x]it! for Sublime Text This Sublime Package provides syntax-highlighting, shortcuts, and auto-completions for [x]it! files. Features Syntax highlight

Jan Heuermann 18 Sep 19, 2022
SHF TEST BACKEND

➰ SHF TEST BACKEND ➿ 🐙 Goals Dada una matriz de números enteros. Obtenga el elemento máximo en la matriz que produce la suma más pequeña al agregar t

Wilmer Rodríguez S 1 Dec 19, 2021
A free micro-blog written in Python and powered by Heroku. *Merge requests are appreciated!*

Background Hobo is an ultra-lightweight blog engine written in Python. It has two dependencies, fully integrated into the codebase with no additional

Andrew Nelder 48 Jan 28, 2021
Attempt at a Windows version of the plotman Chia Plot Manager system

windows plotman: an attempt to get plotman to work on windows THIS IS A BETA. Not ready for production use just yet. Almost, but not quite there yet.

59 May 11, 2022
Christmas tree on the desktop.

new-year-tree Christmas tree on the desktop. [Ссылка на статью habr]

Daniil Gorbenko 10 Dec 29, 2022
ticguide: quick + painless TESS observing information

ticguide: quick + painless TESS observing information Complementary to the TESS observing tool tvguide (see also WTV), which tells you if your target

Ashley Chontos 5 Nov 05, 2022
VHDL to Discrete Logic on PCB Flow

PCBFlow Highly experimental set of scripts to transform a digital circuit described in a hardware description language (VHDL or Verilog) into a discre

Tim 77 Nov 04, 2022
Strong Typing in Python with Decorators

typy Strong Typing in Python with Decorators Description This light-weight library provides decorators that can be used to implement strongly-typed be

Ekin 0 Feb 06, 2022
1. 네이버 카페 댓글을 빨리 다는 기능

naver_autoprogram 기능 설명 네이버 카페 댓글을 빨리 다는 기능 네이버 카페 자동 출석 체크 기능 동작 방식 카페 댓글 기능 기본 동작은 주기적인 스케쥴 동작으로 해당 카페 ID 와 특정 API 주소로 대상이 새글을 작성했는지 체크. 해당 대상이 새글 등

1 Dec 22, 2021