Skip to content

Commit

Permalink
debug patch
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyue-hashdata committed Jan 26, 2025
1 parent 2ea19a0 commit 489d517
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 32 deletions.
47 changes: 24 additions & 23 deletions deploy/cbdb_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ then
fi

home_dir=/home/${user}
mapped_dir=${home_dir}/workspace/cbdb
working_dir=${home_dir}/workspace/cbdb_dev
#mapped_dir=${home_dir}/workspace/cbdb
working_dir=${home_dir}/workspace/cbdb
install_dir=${home_dir}/install

function cbdb_build() {
Expand All @@ -28,16 +28,16 @@ function cbdb_build() {
rm -rf ${install_dir}
fi

if [ -d ${working_dir} ]
then
rm -rf ${working_dir}
fi
# if [ -d ${working_dir} ]
# then
# rm -rf ${working_dir}
# fi

#copy working directory
echo "[CBDB build] init compile environment..."
mkdir ${install_dir}
mkdir ${working_dir}
cp -rf ${mapped_dir}/* ${working_dir}/
# mkdir ${working_dir}
# cp -rf ${mapped_dir}/* ${working_dir}/

#init compilation environment params
source ${working_dir}/deploy/cbdb_env.sh
Expand All @@ -55,24 +55,25 @@ function cbdb_build() {

#do compile configuration
echo "[CBDB build] start to init configuraiton for code compile..."
CFLAGS=-O0 CXXFLAGS='-O0 -std=c++14' ./configure --prefix=${install_dir}/cbdb --enable-debug --enable-cassert --enable-tap-tests --with-gssapi --with-libxml --with-quicklz --with-pythonsrc-ext --with-openssl
#CFLAGS=-O0 CXXFLAGS='-O0 -std=c++14' ./configure --prefix=${install_dir}/cbdb --enable-debug --enable-cassert --enable-tap-tests --with-gssapi --with-libxml --with-quicklz --with-pythonsrc-ext --with-openssl
CFLAGS=-O0 CXXFLAGS='-O0 -std=c++14' ./configure --prefix=${install_dir}/cbdb --enable-tap-tests --with-gssapi --with-libxml --with-quicklz --with-pythonsrc-ext --with-openssl

#do compile
echo "[CBDB build] start to compile binary file..."
make -sj 12 install

#start cluster
source ~/install/cbdb/greenplum_path.sh
export PGHOST=`hostname`
cd ${working_dir}/gpAux/gpdemo && make

#export preinstall parameters
source ${working_dir}/deploy/cbdb_env.sh

#download dbgen
cd ~/workspace
curl https://artifactory.hashdata.xyz/artifactory/greenplum/cbdb/tool/dbgen/dbgen.tar.gz -o dbgen.tar.gz
tar xzf dbgen.tar.gz -C $GPHOME/bin
make -sj8 install

# #start cluster
# source ~/install/cbdb/greenplum_path.sh
# export PGHOST=`hostname`
# cd ${working_dir}/gpAux/gpdemo && make
#
# #export preinstall parameters
# source ${working_dir}/deploy/cbdb_env.sh
#
# #download dbgen
# cd ~/workspace
# curl https://artifactory.hashdata.xyz/artifactory/greenplum/cbdb/tool/dbgen/dbgen.tar.gz -o dbgen.tar.gz
# tar xzf dbgen.tar.gz -C $GPHOME/bin
}

function cbdb_run() {
Expand Down
18 changes: 12 additions & 6 deletions deploy/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@ Vagrant.configure("2") do |config|
config.vm.box_url = "https://artifactory.hashdata.xyz/artifactory/vagrant-public/devel-devtoolset-10-cbdb-vagrant-virtualbox-centos7-2009-20221011.box"
config.vm.box_check_update = true

config.vm.hostname = "hashdata"

config.vm.provider "virtualbox" do |vb|
vb.name = "runtime_filter"
vb.gui = false
vb.cpus = 8
vb.memory = "14336"
vb.cpus = 12
vb.memory = "32192"
end

config.vm.synced_folder "../../.", "/home/gpadmin/workspace/cbdb", owner: "root", group: "root", :extra => "dmode=555,fmode=555"
config.vm.synced_folder "../../.", "/home/gpadmin/workspace/cbdb", owner: "gpadmin", group: "gpadmin"#, :extra => "dmode=555,fmode=555"
if ENV['CBDB_TEST_REPO_PATH'] != nil then
config.vm.synced_folder ENV['CBDB_TEST_REPO_PATH'], "/home/gpadmin/workspace/cbdb_testrepo", owner: "gpadmin", group: "root", :extra => "dmode=755,fmode=755"
config.vm.synced_folder ENV['CBDB_TEST_REPO_PATH'], "/home/gpadmin/workspace/cbdb_testrepo", owner: "gpadmin", group: "gpadmin"#, :extra => "dmode=755,fmode=755"
end
if ENV['CBDB_TEST_TPCH_PATH'] != nil then
config.vm.synced_folder ENV['CBDB_TEST_TPCH_PATH'], "/home/gpadmin/workspace/tpch", owner: "gpadmin", group: "root", :extra => "dmode=755,fmode=755"
config.vm.synced_folder ENV['CBDB_TEST_TPCH_PATH'], "/home/gpadmin/workspace/tpch", owner: "gpadmin", group: "gpadmin"#, :extra => "dmode=755,fmode=755"
end
config.ssh.username = "root"
config.ssh.username = "gpadmin"
config.ssh.password = "vagrant"
config.vm.provision "shell", inline: <<-SHELL
user=gpadmin
su - $user -c "sed -i 's/workspace\\/cbdb_dev\\/gpAux\\/gpdemo\\/datadirs/data0\\/database\\/datadirs/' /home/$user/.bashrc"
su - $user -c "sed -i '/^source \\/home\\/gpadmin\\/install\\/gpdb\\/greenplum_path/ d' /home/$user/.bashrc"
su - $user -c "mkdir -p /home/$user/data0/database"
su - $user -c "echo "source ~/workspace/cbdb/deploy/cbdb_env.sh" >> /home/$user/.bashrc"
chmod u+x /home/$user/workspace/cbdb/deploy/cbdb_deploy.sh &&
su - $user -c "/home/$user/workspace/cbdb/deploy/cbdb_deploy.sh build"
Expand Down
7 changes: 4 additions & 3 deletions gpAux/gpdemo/gpdemo-defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export with_openssl

export DEMO_PORT_BASE="$PORT_BASE"
export NUM_PRIMARY_MIRROR_PAIRS
export WITH_MIRRORS
export WITH_STANDBY
#export WITH_MIRRORS
#export WITH_STANDBY
export BLDWRAP_POSTGRES_CONF_ADDONS
export DEFAULT_QD_MAX_CONNECT=150
export DEFAULT_QD_MAX_CONNECT=150
export COORDINATOR_DATADIR=/home/gpadmin/data0/database/

0 comments on commit 489d517

Please sign in to comment.