This topic describes how to install the obshell RPM package on each node by using the obshell-sdk-python.
Note
Before you proceed, we recommend that you read the Quick Start topic to learn how to use the obshell-sdk-python.
Considerations
Before you install obshell, download the required RPM package to the local machine. You can manually download the package or use the obshell-sdk-python to download it. For more information about how to use the obshell-sdk-python to download the RPM package, see Download an RPM package.
Sample code
from obshell import install_obshell, NodeConfig
def init_nodes():
ips = [
"10.10.10.1",
"10.10.10.2",
"10.10.10.3",
]
work_dir = "/data/ob" # OceanBase Database working directory
nodes_config = []
for _, ip in enumerate(ips):
node = NodeConfig(ip, work_dir)
nodes_config.append(node)
# Install obshell
install_obshell("/tmp/obshell-4.2.4.2-12024102115.el7.x86_64.rpm", nodes_config)
References
For more information about how to request APIs by using the obshell-sdk-go, see Install obshell.