快速入门¶
本指南将引导您完成设置协调器、通过gsctl连接并执行第一个命令的全过程。
准备工作¶
提示
命令行工具:GraphScope 提供了名为 gsctl 的命令行工具,该工具包含一系列功能以便更便捷地使用 GraphScope,例如管理和操作 GraphScope Flex 实例。如需详细了解该工具的使用方法,请访问 gsctl 的文档页面。
通常,Coordinator会与GraphScope Flex架构下的产品(如Interactive)一起打包提供,因此在继续操作前请确保已安装特定产品。如果尚未安装,请按照以下代码部署实例。
注意
在本地模式下,GraphScope会将主机端口映射到docker容器。记得使用gsctl instance deploy --help获取更多信息。
如果在部署实例时遇到端口绑定问题,请先销毁实例然后重新部署。
pip3 install gsctl
# Deploy the Interactive instance in local mode
gsctl instance deploy --type interactive
有关如何安装和部署Interactive的更多详细信息,请参阅安装指南。
通过gsctl连接到Coordinator服务(交互式)¶
您可以通过gsctl连接到coordinator service。
gsctl connect --coordinator-endpoint http://127.0.0.1:8080
# change the port number if you have customized the coordinator port.
检查服务状态¶
连接到Coordinator Service后,您现在可以查看我们为您准备的初始内容。
gsctl ls -l
实际上,系统内置了一个名为gs_interactive_default_graph的图。现在您可以切换到该图上下文:
gsctl use GRAPH gs_interactive_default_graph
gsctl service status # show current service status
从输出可以看出,Interactive服务已在内置图上运行。更多命令请参考具体的Flex产品。
关闭连接¶
如果想断开与协调器的连接,只需输入
gsctl close
销毁交互式实例¶
如果您想关闭并卸载Interactive实例,
gsctl instance destroy --type interactive
这将删除Interactive实例中的所有图和数据。