Recently, I started working in software development (QA). Unfortunately, on my new job, not enough automation for testing purpose. I decided (with the consent of the head) to create an automatically updated repository of virtual machines that automatically repackaged into Vagrant boxes. Later, I am planning to start using testing framework, which will be executed through Vagrant provisioning mechanism.
I wrote several scripts for automation process of update and rebuild virtual machines. Scripts allow to update operating system and/or additions into automatic mode. Besides all of virtual machines will be created from a template (disk partitioning, users, ssh, selinux etc). Our team will be able to effectively fill the repository of virtual machines/testing environments.
Predefined templates settings:
- SELinux: Completely disabled.
- Syslog: Increased rate limit for rsyslogd.
- Localization: Russian, English. Timezone: Europe/Moscow.
sda1: /boot - 1G
sda2: swap - 1G
lv_root - 30G
lv_data - 10G
- Mount points: Only by name. Example: /dev/sda1, /dev/mapper/vg_sys-lv_root. Not use: UUID, LABEL, /dev/disk/by-id.
- Network interface names: eth0, eth1 (ln -s /dev/null /etc/udev/rules.d/70-persistent-net.rules).
- Services: sshd (must be running and available over network).
- Desktop environment: KDE, Gnome, Unity, default for distribution.
- Debug: ulimit -c unlimited for all users.
- Boot priority: HDD first.
- Certification Authority: add whatever.
user1 ALL=(ALL) ALL
user2 ALL=(ALL) ALL
vagrant ALL=(ALL) NOPASSWD: ALL
- ssh: All users can access through ssh. Every user have insecure keys
- Required software RPM: make, gcc, kernel-devel, sudo, lsb_release, python-pip, robotframework
- Required software DEB: make, gcc, linux-source, sudo, lsb-release, python-pip, robotframework
- Required software FreeBSD: make, gcc, kernel.src.txz, sudo, py27-pip, robotframework
- Auxiliary set of software: atop, bwn-ng, cmake, curl/libcurl, dnsutils, dstat, ethtool, gdb, htop, iperf, lftp, mc, mlocate, mtr, nc, ncdu, netstat, nmap, ntpdate, parallel, pbzip2, perf, strace, sysstat, tcpdump, telnet, tmux, valgrind, vim, wget.
- Domain names in complex configurations: Domain names are dependent on the number of bundle of complex configuration: bundle1-maild6, bundle1-mua -> testlab1.test; bundle2-nss6, bundle2-w7 -> testlab2.test
- Developers can access to virtual machines over RDP/SSH, VirtualBox support this natively.
- Updates of hypervisor should be done synchronously.
- New virtual environments can be uploaded to repository by vagrant-boxer.
- All configurations of virtual environments (Vagrantfile) saved in Git.