赞
踩
Github:datahub-project/datahub: The Metadata Platform for the Modern Data Stack (github.com)
功能指南:功能指南 |数据中心 (datahubproject.io)
Github:https://github.com/open-metadata/OpenMetadata
功能指南:OpenMetadata 文档:立即获得帮助 (open-metadata.org)
Demo:开放元数据 (open-metadata.org)
windows11 家庭版
查教程提示我第一步要先启动windows功能中的hyper-V,并没有,遂产生如下心路历程
在记事本中复制以下代码 → 保存为Hyper-V.cmd → 以管理员身份运行
- pushd "%~dp0"
-
- dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
-
- for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
-
- del hyper-v.txt
-
- Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
运行完成之后,会添加一些映像服务和管理工具的程序包
- ...\hyper-v>dism /online /norestart /add-package:"C:\Windows\servicing\Packages\Microsoft-Hyper-V-Services-Package~31bf3856ad364e35~amd64~~10.0.17134.1.mum"
-
- 部署映像服务和管理工具
- 版本: 10.0.17134.1
-
- 映像版本: 10.0.17134.407
-
- 正在处理 1 (共 1) - 正在添加程序包 Microsoft-Hyper-V-Services-Package~31bf3856ad364e35~amd64~~10.0.17134.1
- [==========================100.0%==========================]
- 操作成功完成。
配置完成之后,输入 Y 重启电脑,电脑会自动进行配置更新,重启之后即可看到Hyper-V管理器已经安装成功。
安装过程我主要参考的这篇教程【全面详细】Windows10 Docker安装详细教程 - 知乎 (zhihu.com)
安装完成之后可以打开 任务管理器——性能 可以看到虚拟化已启用
之后安装Docker Desktop并启动,桌面右下角状态栏图标出现Docker Desktop running,即说明启动成功
打开命令行 运行 docker run hello-world 出现以下界面,说明安装成功,并正常工作
- Hello from Docker!
- This message shows that your installation appears to be working correctly.
-
- To generate this message, Docker took the following steps:
- 1. The Docker client contacted the Docker daemon.
- 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
- (amd64)
- 3. The Docker daemon created a new container from that image which runs the
- executable that produces the output you are currently reading.
- 4. The Docker daemon streamed that output to the Docker client, which sent it
- to your terminal.
-
- To try something more ambitious, you can run an Ubuntu container with:
- $ docker run -it ubuntu bash
-
- Share images, automate workflows, and more with a free Docker ID:
- https://hub.docker.com/
-
- For more examples and ideas, visit:
- https://docs.docker.com/get-started/
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
终于走到了正题,接下来就可以跟着官网上的教程去安装了!
(首先还是得保证电脑上已经安装了Python 3.7以上的版本)使用命令 python -V
官网教程:DataHub Quickstart Guide | DataHub (datahubproject.io)
官网对电脑的配置要求:2 个 CPU、8GB RAM、2GB 交换区域和 10GB 磁盘空间
逐条使用命令
- pip install --upgrade pip wheel setuptools
- pip install --upgrade acryl-datahub
- datahub version
安装完成之后,如果在命令行出现以下,则说明安装成功
(此处使用的python版本为3.8.17)
- DataHub CLI version: 0.12.0.2
- Python version: 3.8.17 (default, Jul 5 2023, 20:44:21) [MSC v.1916 64 bit (AMD64)]
在命令行运行简单的一条指令
datahub docker quickstart
这句指令将使用 docker-compose 部署一个 DataHub 实例
然后就是漫长的部署过程(2 days later——)
(不出意外的话就要出意外了)
之前电脑上默认运行MySql的端口为3306,好巧不巧,Datahub启用的Mysql端口也是3306,端口冲突直接gg,pull mysql 失败无法 pull datahub
- time="2023-11-24T16:20:33+08:00" level=warning msg="The \"HOME\" variable is not set. Defaulting to a blank string."
- time="2023-11-24T16:20:33+08:00" level=warning msg="The \"HOME\" variable is not set. Defaulting to a blank string."
- [+] Building 0.0s (0/0) docker:default
- [+] Running 8/8
- ✔ Container mysql Created 0.0s
- ✔ Container zookeeper Healthy 0.0s
- ✔ Container elasticsearch Healthy 0.0s
- ✔ Container broker Running 0.0s
- ✔ Container elasticsearch-setup Started 0.0s
- ✔ Container mysql-setup Created 0.0s
- ✔ Container schema-registry Created 0.0s
- ✔ Container kafka-setup Created 0.0s
- Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:3306 -> 0.0.0.0:0: listen tcp 0.0.0.0:3306: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
- .
此时,需要找到 计算机管理——服务——MySQL——关闭此服务
解决掉端口冲突的问题之后, 就很大概率能够成功运行datahub(出现了以下界面)
Running!
此时可以访问地址:http://localhost:9002/
完结撒花*★,°*:.☆( ̄▽ ̄)/$:*.°★* 。
PS:
- username: datahub
- password: datahub
- # 可以引入示例元数据作测试
- datahub docker ingest-sample-data
- # 停止 DataHub
- datahub docker quickstart --stop
- # 重置 DataHub
- datahub docker nuke
- # 升级 DataHub
- datahub docker quickstart
- # 备份 DataHub
- datahub docker quickstart --backup
- # 自定义安装 Datahub
- datahub docker quickstart --quickstart-compose-file <path to compose file>
- # 自定义备份 Datahub
- datahub docker quickstart --backup --backup-file <path to backup file>
- # 还原备份
- datahub docker quickstart --restore
- # 自定义还原备份
- datahub docker quickstart --restore --restore-file /home/my_user/datahub_backups/quickstart_backup_2002_22_01.sql
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。