Configurare Buildbot per le Macchine Virtuali - Ubuntu 9.04 i386

Stai visualizzando una vecchia versione di questo article. Visualizza la versione più recente.

Questa VM viene usata per creare il tarball dei sorgenti e per i .deb di Ubuntu 9.04 32-bit.

Prima creare e installare l'immagine:

qemu-img create -f qcow2 vm-jaunty-i386-base.qcow2 8G
kvm -m 2047 -hda vm-jaunty-i386-base.qcow2 -cdrom ubuntu-9.04-server-i386.iso -redir tcp:2222::22 -boot d -cpu qemu32,-nx
# Installare

Creare una nuova VM, basata sulla prima, che è configurata per la porta seriale.

qemu-img create -b vm-jaunty-i386-base.qcow2 -f qcow2 vm-jaunty-i386-serial.qcow2
kvm -m 2047 -hda vm-jaunty-i386-base.qcow2 -redir tcp:2222::22 -boot c -cpu qemu32,-nx

Per configurare il kernel e grub per la console seriale, aggiungere quanto segue a /boot/grub/menu.lst:

serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=3 serial console

Aggiungere in menu.lst alla riga del kernel (cancellando `quiet splash'):

console=tty0 console=ttyS0,115200n8

Creare /etc/event.d/ttyS0:

# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /sbin/getty 115200 ttyS0

Aggiungere un account:

sudo adduser --disabled-password buildbot

Coppiare la chiave ssh pubblica in /.ssh/authorized_keys

Abilitare sudo senza password:

sudo adduser buildbot sudo
# decommentare `%sudo ALL=NOPASSWD: ALL' line in `visudo`, and move to end.

Creare una nuova VM per creare i tarball dei sorgenti:

qemu-img create -b vm-jaunty-i386-serial.qcow2 -f qcow2 vm-jaunty-i386-deb-tarbake.qcow2

Installare i compilatori:

sudo apt-get build-dep mysql-5.1-server
sudo apt-get install devscripts hardening-wrapper bzr

Copiare in un repository condiviso di bzr, in buildbot/.bzr (o eseguire bzr init-repo e bzr branch --no-tree lp:maria).

Creare una nuova VM per creare i .deb:

qemu-img create -b vm-jaunty-i386-serial.qcow2 -f qcow2 vm-jaunty-i386-deb-build.qcow2

Installare i compilatori:

sudo apt-get build-dep mysql-5.1-server
sudo apt-get install devscripts hardening-wrapper

Creare una nuova VM per testare l'installazione dei .deb:

qemu-img create -b vm-jaunty-i386-serial.qcow2 -f qcow2 vm-jaunty-i386-deb-install.qcow2

Installare gli strumenti e il repository apt locale.

sudo apt-get install debconf-utils
cat >>/etc/apt/sources.list <<END
deb file:///home/buildbot/buildbot/debs binary/
deb-src file:///home/buildbot/buildbot/debs source/
END

Configurare il config di default dei pacchetti per debconf. Copiare in my.seed (vedi sopra) nella VM.

sudo debconf-set-selections /tmp/my.seed

Creare una nuova VM per testare gli aggiornamenti:

qemu-img create -b vm-jaunty-i386-deb-install.qcow2 -f qcow2 vm-jaunty-i386-deb-upgrade.qcow2

Preparare un'installazione iniziale di MySQL con alcuni dati di prova.

sudo apt-get install mysql-server-5.1
mysql -uroot -prootpass -e "create database mytest; use mytest; create table t(a int primary key); insert into t values (1); select * from t"

Commenti

Sto caricando i commenti......
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.