Project

Profile

Help

How to connect?
Download (2.07 KB) Statistics View on GitHub Reload from mirrored respository
| Branch: | Tag: | Revision:

root / SLAVE_PREPARATION_FOR_RUN_TEST.md @ master

Prepare slave for run test

Preparation scripts and sequence (+current order is important+)

Generate and copy slave ssh key to max-tst-01:

ssh-keygen -t rsa
cat .ssh/id_rsa.pub | ssh vagrant@max-tst-01.mariadb.com 'cat >> .ssh/authorized_keys' # will ask for vagrant password

Run scripts(from MDBCI folder) in next order:

./scripts/install_mdbci_dependencies.sh
./scripts/slave_setting/repo_setup.sh
./scripts/slave_setting/install_run_test_dependencies.sh
./scripts/slave_setting/create_auxiliary_dirs.sh
./scripts/slave_setting/import_gpg.sh
./scripts/slave_setting/configure_ctest_parsing_and_performance.sh

After that you need to logout and login

exec su $USER

IMPORTANT Vagrant needs additional package - nfs-server-kernel:

sudo apt-get install nfs-kernel-server

And you need to prepare vagrant user with all needed privileges

Add to the /etc/sudoers.d/vagrant next lines:

Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
Cmnd_Alias VAGRANT_EXPORTS_COPY = /bin/cp /tmp/exports /etc/exports
Cmnd_Alias VAGRANT_NFSD_CHECK = /etc/init.d/nfs-kernel-server status
Cmnd_Alias VAGRANT_NFSD_START = /etc/init.d/nfs-kernel-server start
Cmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -r -e * d -ibak /tmp/exports
%sudo ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD_CHECK, VAGRANT_NFSD_START, VAGRANT_NFSD_APPLY, VAGRANT_EXPORTS_REMOVE, VAGRANT_EXPORTS_COPY

Relogin

exec su $USER

Disable some authentifications for ssh (without it Jenkins unable to connect to slave)

Find in '/etc/ssh/sshd_config' on slave this lines and comment them:

Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1

Restart ssh:

service ssh restart
(5-5/8)