-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathVagrantfile
60 lines (50 loc) · 1.92 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright Confidential Containers Contributors
#
# SPDX-License-Identifier: Apache-2.0
#
# This is a Vagrant configuration file.
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Read the runtimeClassName (e.g. kata-qemu, kata-clh, etc) from RUNTIMECLASS.
runtimeclass = ENV['RUNTIMECLASS'] || "kata-qemu"
guest_home_dir = '/home/vagrant'
host_arch = `uname -m`.strip
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# By default vagrant sync the current directory. Let's disabled it because the directory
# will be synced later to the proper destination.
config.vm.synced_folder ".", "/vagrant", disabled:true
config.vm.synced_folder "../../", "#{guest_home_dir}/src/confidential-containers/operator", type:"rsync"
config.vm.provider "libvirt" do |lv|
lv.driver = "kvm"
lv.cpus = "4"
lv.memory = "8192"
# Domains on Libvirt will be created with the following prefix.
lv.default_prefix = "cc-operator_test-"
if host_arch == "x86_64"
lv.machine_type = "q35"
end
end
config.vm.define "tests-e2e-ubuntu2004", autostart: false do |ubuntu|
ubuntu.vm.box = "generic/ubuntu2004"
ubuntu.vm.provision "shell", inline: <<-SHELL
sudo apt-get -y update
sudo apt-get -y install ansible
cd "#{guest_home_dir}/src/confidential-containers/operator/tests/e2e"
./run-local.sh -r "#{runtimeclass}"
SHELL
end
config.vm.define "tests-e2e-ubuntu2204", autostart: false do |ubuntu|
ubuntu.vm.box = "generic/ubuntu2204"
ubuntu.vm.provision "shell", inline: <<-SHELL
sudo apt-get -y update
sudo apt-get -y install ansible
cd "#{guest_home_dir}/src/confidential-containers/operator/tests/e2e"
./run-local.sh -r "#{runtimeclass}"
SHELL
end
end