This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-21. For the latest, interactive version please visit https://mariadb.com/kb/.

Creare pacchetti dello Storage Engine Cassandra

Ecco le istruzioni su come creare pacchetti di CassandraSE.

Preparare l'ambiente di build

Si veda la pagina How_to_access_buildbot_VMs nel wiki interno. La VM di build da utilizzare è:

ezvm  precise-amd64-build

Si acceda alla VM e si passi alla prossima sezione.

Configurare Thrift

mkdir build
cd build
wget https://dist.apache.org/repos/dist/release/thrift/0.8.0/thrift-0.8.0.tar.gz

sudo apt-get install bzr
sudo apt-get install flex

tar zxvf thrift-0.8.0.tar.gz 
cd thrift-0.8.0/

./configure --prefix=/home/buildbot/build/thrift-inst --without-qt4 --without-c_glib --without-csharp --without-java --without-erlang --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --without-go --without-d
make
make install

# liberiamo spazio
make clean
cd .. 

Ottenere un checkout su bzr

  • Creare un'altra connessione SSH a terrier, eseguire lo script suggerito da motd.
  • Premere (C-a C-c) per creare un'altra finestra
  • Copiare il repository base di bazaar nella vm VM:
scp /home/psergey/5.5-cassandra-base.tgz runvm:

Poi tornare alla finestra con la VM ed eseguire nella VM:

tar zxvf ../5.5-cassandra-base.tgz
rm -rf ../5.5-cassandra-base.tgz
cd 5.5-cassandra/
bzr pull lp:~maria-captains/maria/5.5-cassandra

Compilare

export LIBS="-lthrift"
export LDFLAGS=-L/home/buildbot/build/thrift-inst/lib

mkdir mkdist
cd mkdist
cmake ..
make dist
basename mariadb-*.tar.gz .tar.gz > ../distdirname.txt

cp mariadb-5.5.25.tar.gz ../
cd ..
tar zxf "mariadb-5.5.25.tar.gz"
mv "mariadb-5.5.25" build
cd build
mkdir mkbin
cd mkbin
cmake -DBUILD_CONFIG=mysql_release ..
make -j4 package

Dovrebbe terminare con:

CPack: - package: /home/buildbot/build/5.5-cassandra/build/mkbin/mariadb-5.5.25-linux-x86_64.tar.gz generated.

Per liberare un po' di spazio su disco:

rm -fr ../../mkdist/
mv mariadb-5.5.25-linux-x86_64.tar.gz ../..
cd ../..
rm -rf build

Patch del tarball per includere Thrift

mkdir fix-package
cd fix-package
tar zxvf ../mariadb-5.5.25-linux-x86_64.tar.gz 

Verificare che mysqld sia stato compilato con CassandraSE:

ldd mariadb-5.5.25-linux-x86_64/bin/mysqld

This should point to libthrift-0.8.0.so.

cp /home/buildbot/build/thrift-inst/lib/libthrift* mariadb-5.5.25-linux-x86_64/lib/
tar czf mariadb-5.5.25-linux-x86_64.tar.gz mariadb-5.5.25-linux-x86_64/
cp mariadb-5.5.25-linux-x86_64.tar.gz ..

Copiare i dati dalla VM

Nella seconda finestra (quella su terrier, ma non nella VM), si esegua:

mkdir build-cassandra
cd build-cassandra
scp runvm:/home/buildbot/build/5.5-cassandra/mariadb-5.5.25.tar.gz .
scp runvm:/home/buildbot/build/5.5-cassandra/mariadb-5.5.25-linux-x86_64.tar.gz .

Riferimenti

  1. http://buildbot.askmonty.org/buildbot/builders/kvm-tarbake-jaunty-x86/builds/2578
  2. http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-hardy-amd64/builds/1907
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.