Whamcloud - gitweb
LU-13814 llite: refactor ll_direct_rw_pages
[fs/lustre-release.git] / Vagrantfile
1 # SPDX-License-Identifier: GPL-2.0
2
3 #
4 # This file is part of Lustre, http://www.lustre.org/
5 #
6 # contrib/coverity/Vagrantfile
7 #
8 # Vagrant definition for a CentOS VM to run a Lustre
9 # build for Coverity.
10 #
11 # Author: Timothy Day <timday@amazon.com>
12 #
13
14 Vagrant.configure("2") do |config|
15   # The most common configuration options are documented and commented below.
16   # For a complete reference, please see the online documentation at
17   # https://docs.vagrantup.com.
18
19   # Every Vagrant development environment requires a box. You can search for
20   # boxes at https://vagrantcloud.com/search.
21   config.vm.box = "centos/8"
22
23   # Customizations
24   config.vm.provider "libvirt" do |libvirt|
25     libvirt.machine_virtual_size = 40
26     libvirt.memory = 8192
27     libvirt.cpus = 4
28   end
29
30   config.vm.provision "shell", inline: <<-SHELL
31       # Volume Setup
32       sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
33       sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
34       dnf update -y
35       dnf install -y cloud-utils-growpart
36       growpart /dev/vda 1
37       xfs_growfs /dev/vda1
38
39       # Networking Setup
40       GIVEN_IP=$(ip address show eth0 | awk -F' ' '$1 == "inet" { print $2 }' | awk -F'/' '{ print $1 }')
41       grep $(hostname) /etc/hosts
42       sed -i "s/$(hostname) //g" /etc/hosts
43       echo "$GIVEN_IP $(hostname)" >> /etc/hosts
44       grep $(hostname) /etc/hosts
45
46       # Add repos
47       dnf config-manager --set-enabled powertools
48       dnf config-manager --add-repo=https://downloads.whamcloud.com/public/e2fsprogs/latest/el8
49
50       # General kernel tools
51       dnf groupinstall -y 'Development Tools'
52
53       # Debug info (needed for ldiskfs)
54       sudo dnf install -y --enablerepo=*debug* kernel-debuginfo
55
56       # Install Lustre/ZFS dependencies and tools
57       dnf install -y --nogpgcheck git libyaml-devel libnl3-devel libmount-devel \
58           wget ncurses-devel bc dwarves kernel kernel-devel openssl-devel \
59           binutils-devel lsof crash kexec-tools perf psmisc e2fsprogs-devel \
60           elfutils-libelf-devel libudev-devel libattr-devel libaio-devel libuuid-devel \
61           libblkid-devel libtirpc-devel libffi-devel ncompress python3-cffi python3-devel \
62           python3-packaging
63   SHELL
64 end