GithubHelp home page GithubHelp logo

hotteafun / obdeploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oceanbase/obdeploy

0.0 0.0 0.0 960 KB

A deployer and package manager for OceanBase open-source software.

Home Page: https://open.oceanbase.com

License: GNU General Public License v3.0

Shell 0.78% Python 98.92% PLSQL 0.30%

obdeploy's Introduction

OceanBase Deployer

OceanBase Deployer (OBD) is an installation and deployment tool for open-source OceanBase software. It is also a package manager for managing all open-source OceanBase software. This topic describes how to install OBD, how to use OBD, and OBD commands.

Install OBD

You can install OBD by using these methods:

Method 1: Install OBD by using RPM packages (only for CentOS 7 or later)

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
sudo yum install -y ob-deploy
source /etc/profile.d/obd.sh

Method 2: Install OBD by using the source code

Before you install OBD by using the source code, make sure that you have installed these dependencies:

  • gcc
  • wget
  • python-devel
  • openssl-devel
  • xz-devel
  • mysql-devel
  • pip
  • pyinstaller

Notes:

You can install pip for Python2.7 or Python3.8 refer below cmd:

curl -o get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py # for Python2.7 
curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py # for Python3.8 
sudo python get-pip.py

then install pyinstaller as below:

sudo pip install pyinstaller==3.6

To install OBD on Python2.7, run these commands:

sh rpm/build.sh build
source /etc/profile.d/obd.sh

To install OBD on Python3.8, run these commands on Python2.7 first:

sh rpm/build.sh executer

Then run these commands on Python3.8:

sh rpm/build.sh build_obd
source /etc/profile.d/obd.sh

Start an OceanBase cluster

After you install OBD, you can run these commands as the root user to start a local single-node OceanBase cluster. Before you run the commands, make sure that these conditions are met:

  • You have logged on as the root user.
  • Ports 2882 and 2883 are available.
  • Your server has at least 8 GB of memory.
  • Your server has at least 2 CPU cores.

NOTE: If the preceding conditions are not met, see Use OBD to start an OceanBase cluster.

NOTE: For the convenience of using root here, OBD and OceanBase database do not have any restrictions on running users. We do not recommend that you use root in production.

obd cluster deploy c1 -c ./example/mini-local-example.yaml
obd cluster start c1
# Connect to the OceanBase Database by using a MySQL client.
mysql -h127.1 -uroot -P2883

Use OBD to start an OceanBase cluster

If you want to know how to use OBD to start an OceanBase cluster, please see Use OBD to start an OceanBase cluster.

Other OBD commands

OBD provides multiple-level commands. You can use the-h/--help option to view the help information of sub-commands.

Q&A

Q: How can I specify the version of a component?

A: You can add the version declaration to the deployment configuration file. For example, you can specify the version of OceanBase-CE V3.1.0 in the deployment configuration file in the following format:

oceanbase-ce:
  version: 3.1.0

Q: How can I use a component of a specific version?

A: You can add the package_hash or tag declaration to the deployment configuration file. For example, if you have tagged your compiled OceanBase-CE, you can specify it by tag. For example:

oceanbase-ce:
  tag: my-oceanbase

You can also use package_hash to specify a specific version. When you run an obd mirror command, OBD will return an MD5 value of the component. The MD5 value is the value of package_hash.

oceanbase-ce:
  package_hash: 929df53459404d9b0c1f945e7e23ea4b89972069

Q: How can I modify the startup process after I modify the code of OceanBase-CE?

A: You can modify the startup plug-ins in the ~/.obd/plugins/oceanbase-ce/ directory. For example, after you add a new startup configuration item for OceanBase-CE V3.1.0, you can modify the start.py file in the ~/.obd/plugins/oceanbase-ce/3.1.0 directory.

Q:How to update OBD?

A:You can use the obd update command to update OBD. When you are done with the update, use the obd --version command to confirm the version of OBD.

Protocol

OBD complies with GPL-3.0.

TPC-C

obdeploy's People

Contributors

frf12 avatar linxiansheng avatar xjxjy avatar amber1990zhang avatar mizuhahimuraki avatar hnwyllmm avatar chrisyuan avatar donghy-coredumped avatar oceanbase-admin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.