2017-02-08 17:01:59 +01:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.configure(2) do |config|
|
|
|
|
|
|
|
|
### distgit ###################################################
|
|
|
|
config.vm.define "distgit" do |distgit|
|
2018-01-13 16:41:19 +01:00
|
|
|
distgit.vm.box = "fedora/27-cloud-base"
|
2017-02-08 17:01:59 +01:00
|
|
|
|
|
|
|
distgit.vm.synced_folder ".", "/vagrant", type: "rsync"
|
|
|
|
|
2017-07-25 15:01:06 +02:00
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "echo 'nameserver 8.8.8.8' >> /etc/resolv.conf"
|
2017-02-10 12:58:09 +01:00
|
|
|
|
2017-02-08 17:01:59 +01:00
|
|
|
# Update the system
|
|
|
|
distgit.vm.provision "shell",
|
2018-01-13 16:41:19 +01:00
|
|
|
inline: "dnf clean all && dnf -y update || true" # || true cause dnf might return non-zero status (probly delta rpm rebuilt failed)
|
2017-02-08 17:01:59 +01:00
|
|
|
|
|
|
|
distgit.vm.provision "shell",
|
2017-02-11 16:07:10 +01:00
|
|
|
inline: "dnf install -y tito wget"
|
|
|
|
|
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "dnf builddep -y /vagrant/dist-git.spec",
|
2017-02-08 17:01:59 +01:00
|
|
|
run: "always"
|
|
|
|
|
2018-01-13 17:21:18 +01:00
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "rm -rf /tmp/tito/noarch",
|
|
|
|
run: "always"
|
|
|
|
|
2017-02-08 17:01:59 +01:00
|
|
|
distgit.vm.provision "shell",
|
2018-01-13 16:41:19 +01:00
|
|
|
inline: "cd /vagrant/ && tito build --test --rpm",
|
|
|
|
run: "always"
|
|
|
|
|
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "dnf install -y /tmp/tito/noarch/*.rpm",
|
2017-02-08 17:01:59 +01:00
|
|
|
run: "always"
|
|
|
|
|
2017-12-17 20:42:38 +01:00
|
|
|
# setup test user
|
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "useradd clime -G packager"
|
|
|
|
|
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "echo 'clime ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
|
|
|
|
|
2018-01-13 17:21:18 +01:00
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "rm -rf /tmp/pkgs-files",
|
|
|
|
run: "always"
|
|
|
|
|
2017-02-09 14:23:54 +01:00
|
|
|
distgit.vm.provision "file",
|
2017-12-17 20:42:38 +01:00
|
|
|
source: "./beaker-tests/pkgs-files", destination: "/tmp/pkgs-files",
|
2017-02-09 14:23:54 +01:00
|
|
|
run: "always"
|
|
|
|
|
|
|
|
distgit.vm.provision "shell",
|
2017-07-25 15:01:06 +02:00
|
|
|
inline: "mv /tmp/pkgs-files/lookaside-upload.conf /etc/httpd/conf.d/dist-git/ && restorecon -R /etc/httpd/conf.d/dist-git/",
|
2017-02-08 17:01:59 +01:00
|
|
|
run: "always"
|
|
|
|
|
2018-01-31 21:35:03 +01:00
|
|
|
distgit.vm.provision "shell",
|
|
|
|
inline: "mv /tmp/pkgs-files/ssl.conf /etc/httpd/conf.d/ssl.conf && restorecon -R /etc/httpd/conf.d/ssl.conf",
|
|
|
|
run: "always"
|
|
|
|
|
2017-07-24 14:40:13 +02:00
|
|
|
distgit.vm.provision "shell",
|
2017-07-25 15:01:06 +02:00
|
|
|
inline: "systemctl enable dist-git.socket && systemctl restart dist-git.socket",
|
2017-07-24 14:40:13 +02:00
|
|
|
run: "always"
|
|
|
|
|
2017-02-08 17:01:59 +01:00
|
|
|
distgit.vm.provision "shell",
|
2017-04-08 16:13:52 +02:00
|
|
|
inline: "systemctl enable httpd && systemctl restart httpd",
|
2017-02-08 17:01:59 +01:00
|
|
|
run: "always"
|
|
|
|
|
2017-02-11 16:16:27 +01:00
|
|
|
distgit.vm.provision "shell",
|
2017-07-25 15:01:06 +02:00
|
|
|
inline: "dnf install -y python-grokmirror",
|
|
|
|
run: "always"
|
2017-05-25 13:20:32 +02:00
|
|
|
|
2017-02-08 17:01:59 +01:00
|
|
|
end
|
|
|
|
end
|