Metadata-Version: 2.1
Name: pygbase8s
Version: 1.0.0
Summary: A package for GBase 8s database installation and cluster setup.
Home-page: https://gitee.com/momo3507/pygbase8s.git
Author: wangwei
Author-email: wangwei3@gbase.cn
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7.0
Description-Content-Type: text/markdown
License-File: LICENSE


# pygbase8s

#### 介绍
提供gbase8s数据库及相关产品的安装部署、实例、集群配置等功能


#### 安装教程

pip install pygbase8s

#### 使用说明


```python
from pygbase8s import RemoteMachine
# 创建一个服务器实例
machine = RemoteMachine(ip='xxx.xxx.xxx.xxx', password='root_password')

from pygbase8s import IDS
# 指定数据库目录
ids = IDS(path="/opt/gbase8s", machine=machine)
# 安装数据库  
ids.install(pkg_path="/data/GBase8sxxx.tar")

from pygbase8s import ServerPool
# 初始化实例池
pool = ServerPool(ids=ids, count=5)
pool.initialize()
# 从实例池获取一个实例并初始化
server = pool.get_server()
server.initialize()
# 从实例池获取一个SDS集群并初始化
cluster = pool.get_cluster("sds")
cluster.initialize()
# 给集群配置CM
from pygbase8s import CM
from pygbase8s import CSDK
csdk = CSDK(path="/opt/gbase8s", machine=machine)
csdk.install('/data/ClientSDKxxx.tar')
cm = CM(csdk=csdk, cluster=cluster)
cm.startup()
```


#### 参与贡献

1.  Fork 本仓库
2.  新建 Feat_xxx 分支
3.  提交代码
4.  新建 Pull Request


