diff --git a/README.md b/README.md index 4f8ab14eb82..ef79502156d 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Database. ### Build from source -You can follow [these guides](./readmes) to build the Cloudberry Database on +You can follow [these guides](./deploy/build) to build the Cloudberry Database on Linux OS(including CentOS, RHEL/Rocky Linux, and Ubuntu) and macOS. ### Try out quickly diff --git a/readmes/README.CentOS.bash b/deploy/build/README.CentOS.bash similarity index 100% rename from readmes/README.CentOS.bash rename to deploy/build/README.CentOS.bash diff --git a/readmes/README.Linux.md b/deploy/build/README.Linux.md similarity index 96% rename from readmes/README.Linux.md rename to deploy/build/README.Linux.md index 8221bc33be5..db087b5a81e 100644 --- a/readmes/README.Linux.md +++ b/deploy/build/README.Linux.md @@ -30,10 +30,10 @@ Enter the repository and install dependencies according to your operating system The following steps work on CentOS 7. For other CentOS versions, these steps might work but are not guaranteed to work. -1. Run the bash script `README.CentOS.bash` in the `readmes` directory of the `cloudberrydb/cloudberrydb` repository. To run this script, password is required. Then, some required dependencies will be automatically downloaded. +1. Run the bash script `README.CentOS.bash` in the `deploy/build` directory of the `cloudberrydb/cloudberrydb` repository. To run this script, password is required. Then, some required dependencies will be automatically downloaded. ```bash - cd cloudberrydb/readmes + cd cloudberrydb/deploy/build ./README.CentOS.bash ``` @@ -81,16 +81,16 @@ The following steps work on CentOS 7. For other CentOS versions, these steps mig 3. Install more dependencies by running the `README.Rhel-Rocky.bash` script. ```bash - ~/cloudberrydb/readmes/README.Rhel-Rocky.bash + ~/cloudberrydb/deploy/build/README.Rhel-Rocky.bash ``` ### For Ubuntu 18.04 or later -1. Install dependencies by running the `README.Ubuntu.bash` script in the `readmes` directory. +1. Install dependencies by running the `README.Ubuntu.bash` script in the `deploy/build` directory. ```shell # You need to enter your password to run. - sudo ~/cloudberrydb/readmes/README.Ubuntu.bash + sudo ~/cloudberrydb/deploy/build/README.Ubuntu.bash ``` > [!Note] diff --git a/readmes/README.Rhel-Rocky.bash b/deploy/build/README.Rhel-Rocky.bash similarity index 100% rename from readmes/README.Rhel-Rocky.bash rename to deploy/build/README.Rhel-Rocky.bash diff --git a/readmes/README.Ubuntu.bash b/deploy/build/README.Ubuntu.bash similarity index 100% rename from readmes/README.Ubuntu.bash rename to deploy/build/README.Ubuntu.bash diff --git a/readmes/README.macOS.bash b/deploy/build/README.macOS.bash similarity index 100% rename from readmes/README.macOS.bash rename to deploy/build/README.macOS.bash diff --git a/readmes/README.macOS.md b/deploy/build/README.macOS.md similarity index 98% rename from readmes/README.macOS.md rename to deploy/build/README.macOS.md index ccce250957c..3231f983486 100644 --- a/readmes/README.macOS.md +++ b/deploy/build/README.macOS.md @@ -9,7 +9,7 @@ According to our test, these steps work well on macOS Ventura 13.4+ with both In Run the following command to install the needed dependencies. You will be asked to enter the `sudo` password of your macOS system. ```bash -source readmes/README.macOS.bash +source deploy/build/README.macOS.bash ``` > [!NOTE] @@ -66,7 +66,7 @@ source $(cd ~; pwd)/install/cbdb/greenplum_path.sh # 4. Install the Python dependencies. -pip3 install --user -r readmes/python-dependencies.txt +pip3 install --user -r python-dependencies.txt # 5. Start a demo cluster. diff --git a/readmes/README.md b/deploy/build/README.md similarity index 91% rename from readmes/README.md rename to deploy/build/README.md index a02926fa43e..50a78710222 100644 --- a/readmes/README.md +++ b/deploy/build/README.md @@ -5,8 +5,8 @@ Greenplum Database READE.md here. Thanks all the original writers.--> This guides describes how to build Cloudberry Database from source code. -- For building on Linux systems, see [Compile and Install Cloudberry Database on Linux](/readmes/README.Linux.md). -- For building on macOS system, see [Compile and Install Cloudberry Database on macOS](/readmes/README.macOS.md). +- For building on Linux systems, see [Compile and Install Cloudberry Database on Linux](./README.Linux.md). +- For building on macOS system, see [Compile and Install Cloudberry Database on macOS](./README.macOS.md). ## Build the database @@ -98,7 +98,7 @@ make distclean PXF is an extension framework for Greenplum Database/Cloudberry Database to enable fast access to external Hadoop datasets. Refer to -[PXF extension](../gpcontrib/pxf/README.md) for more information. +[PXF extension](../../gpcontrib/pxf_fdw/README.md) for more information. Currently, CBDB is built with PXF by default (--enable-pxf is on). In order to build CBDB without pxf, simply invoke `./configure` with additional option `--disable-pxf`. @@ -108,9 +108,9 @@ PXF requires curl, so `--enable-pxf` is not compatible with the `--without-libcu Cloudberry Database supports Python3 with plpython3u UDF -See [how to enable Python3](../src/pl/plpython/README.md) for details. +See [how to enable Python3](../../src/pl/plpython/README.md) for details. # Development with Vagrant -There is a Vagrant-based [quickstart guide for developers](../src/tools/vagrant/README.md). +There is a Vagrant-based [quickstart guide for developers](../vagrant/README.md). diff --git a/src/tools/vagrant/.gitignore b/deploy/vagrant/.gitignore similarity index 100% rename from src/tools/vagrant/.gitignore rename to deploy/vagrant/.gitignore diff --git a/src/tools/vagrant/README.md b/deploy/vagrant/README.md similarity index 100% rename from src/tools/vagrant/README.md rename to deploy/vagrant/README.md diff --git a/src/tools/vagrant/centos/Vagrantfile b/deploy/vagrant/centos/Vagrantfile similarity index 100% rename from src/tools/vagrant/centos/Vagrantfile rename to deploy/vagrant/centos/Vagrantfile diff --git a/src/tools/vagrant/centos/vagrant-configure-os.sh b/deploy/vagrant/centos/vagrant-configure-os.sh similarity index 100% rename from src/tools/vagrant/centos/vagrant-configure-os.sh rename to deploy/vagrant/centos/vagrant-configure-os.sh diff --git a/src/tools/vagrant/centos/vagrant-setup.sh b/deploy/vagrant/centos/vagrant-setup.sh similarity index 100% rename from src/tools/vagrant/centos/vagrant-setup.sh rename to deploy/vagrant/centos/vagrant-setup.sh diff --git a/src/tools/vagrant/common/vagrant-build-gpdb.sh b/deploy/vagrant/common/vagrant-build-gpdb.sh similarity index 100% rename from src/tools/vagrant/common/vagrant-build-gpdb.sh rename to deploy/vagrant/common/vagrant-build-gpdb.sh diff --git a/src/tools/vagrant/common/vagrant-build-gporca.sh b/deploy/vagrant/common/vagrant-build-gporca.sh similarity index 100% rename from src/tools/vagrant/common/vagrant-build-gporca.sh rename to deploy/vagrant/common/vagrant-build-gporca.sh diff --git a/src/tools/vagrant/common/vagrant-common.rb b/deploy/vagrant/common/vagrant-common.rb similarity index 100% rename from src/tools/vagrant/common/vagrant-common.rb rename to deploy/vagrant/common/vagrant-common.rb diff --git a/src/tools/vagrant/common/vagrant-local-example.yml b/deploy/vagrant/common/vagrant-local-example.yml similarity index 100% rename from src/tools/vagrant/common/vagrant-local-example.yml rename to deploy/vagrant/common/vagrant-local-example.yml diff --git a/src/tools/vagrant/debian/Vagrantfile b/deploy/vagrant/debian/Vagrantfile similarity index 100% rename from src/tools/vagrant/debian/Vagrantfile rename to deploy/vagrant/debian/Vagrantfile diff --git a/src/tools/vagrant/debian/vagrant-setup.sh b/deploy/vagrant/debian/vagrant-setup.sh similarity index 100% rename from src/tools/vagrant/debian/vagrant-setup.sh rename to deploy/vagrant/debian/vagrant-setup.sh diff --git a/src/tools/vagrant/pictures/gpdb_processes.png b/deploy/vagrant/pictures/gpdb_processes.png similarity index 100% rename from src/tools/vagrant/pictures/gpdb_processes.png rename to deploy/vagrant/pictures/gpdb_processes.png diff --git a/src/tools/vagrant/ubuntu/Vagrantfile b/deploy/vagrant/ubuntu/Vagrantfile similarity index 100% rename from src/tools/vagrant/ubuntu/Vagrantfile rename to deploy/vagrant/ubuntu/Vagrantfile diff --git a/src/tools/vagrant/ubuntu/vagrant-setup.sh b/deploy/vagrant/ubuntu/vagrant-setup.sh similarity index 100% rename from src/tools/vagrant/ubuntu/vagrant-setup.sh rename to deploy/vagrant/ubuntu/vagrant-setup.sh diff --git a/readmes/python-dependencies.txt b/python-dependencies.txt similarity index 100% rename from readmes/python-dependencies.txt rename to python-dependencies.txt diff --git a/readmes/README.Conda.md b/readmes/README.Conda.md deleted file mode 100644 index 74693583c98..00000000000 --- a/readmes/README.Conda.md +++ /dev/null @@ -1,80 +0,0 @@ -# Steps to build plpython with Anaconda - -Anaconda (https://www.continuum.io/) is an excellent Python distribution for -machine learning and analytics which also provide its own package -tracking/management tools. CBDB support plpython which can make use of all -features provided by Anaconda. Note that CBDB only supports Python 2.7 now. -Although plpython might be built with Python 3.x, other Python tools in CBDB -won't work with Python 3.x. - -You can try following steps to run Anaconda with CBDB from source code. - -## Install Anaconda. -We use miniconda here. - - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh - chmod +x Miniconda-latest-Linux-x86_64.sh - ./Miniconda-latest-Linux-x86_64.sh - -Then follow the instructions to complete the installation of Anaconda. -Assume miniconda is installed to "/PATH/TO/CONDAHOME". - -IMPORTANT: Add this path to head of PATH environment, so that Anaconda become the default Python - - export PATH=/PATH/TO/CONDAHOME/bin:$PATH - -## Install related tools -Following instructions are for Centos/RHEL/Fedora as example. - sudo yum install git - sudo yum groupinstall "Development tools" - sudo yum install curl-devel bzip2-devel openssl-devel perl-ExtUtils-Embed libxml2-devel openldap-devel pam pam-devel perl-devel readline-devel - -The python-devel is not required here because it is provided by Anaconda. - -## Download and build CBDB - git clone https://github.com/cloudberrydb/cloudberrydb.git - cd cloudberrydb - ./configure --prefix=`pwd`/greenplumdb --with-gssapi --with-pgport=5432 --with-perl --with-python --with-ssl=openssl --with-libxml --enable-cassert --enable-debug --enable-depend - make install - -Make sure "--with-python" parameter exists. Because the default Python is the Anaconda Python, It's done. - -## Test link path of Python -In following example, Anaconda is installed to /home/gpadmin/miniconda. - ldd greenplumdb/lib/postgresql/plpython.so - ... - libpython2.7.so.1.0 => /home/gpadmin/miniconda/lib/libpython2.7.so.1.0 (0x00007f1f3c40c000) - ... - -## Install Python package from Anaconda -Install numpy from Anaconda with command: - - conda install numpy - -If you run a multinode cluster, make sure the install paths of Anaconda (and -GPDB) are the same on every host. gpssh can help to install Anaconda package on -each segment: - - gpssh -f hostlistfile /PATH/TO/CONDAHOME/bin/conda install numpy - -## Init CBDB cluster - -## Run "hello world" -You can run following example to ensure Anaconda working for you. - - - DROP LANGUAGE IF EXISTS 'plpythonu' CASCADE; - CREATE PROCEDURAL LANGUAGE 'plpythonu' HANDLER plpython_call_handler; - - CREATE OR REPLACE FUNCTION testnumpy() RETURNS float AS - $$ - import time,numpy - t1 = time.time() - X = numpy.arange(10000000) - Y = numpy.arange(10000000) - Z = X + Y - return time.time() - t1 - $$ - LANGUAGE 'plpythonu' VOLATILE; - select testnumpy(); - diff --git a/hooks/install b/src/tools/hooks/install similarity index 100% rename from hooks/install rename to src/tools/hooks/install diff --git a/hooks/pre-push b/src/tools/hooks/pre-push similarity index 100% rename from hooks/pre-push rename to src/tools/hooks/pre-push