-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
56 lines (48 loc) · 1.66 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "debian/bookworm64"
config.vm.hostname = "debian12"
config.vm.provider "virtualbox" do |v|
v.name = "debian12"
v.memory = 1024
v.cpus = 1
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL]
end
config.vm.network "forwarded_port", guest: 8443, host: 8443
config.vm.synced_folder ".", "/vagrant", SharedFoldersEnableSymlinksCreate: true
config.vm.provision "shell", inline: <<-SHELL
# Setup Base Packages
ACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get upgrade -y && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates \
tzdata \
htop \
jq && \
apt-get clean
# Install Docker-CE Engine
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
rm -f ./get-docker.sh
# Setup pal
dpkg -i /vagrant/pal*amd64.deb
# Add pal to Docker group
usermod -aG docker pal
# Create Self-Signed Certs
openssl req -x509 -newkey rsa:4096 -nodes -keyout /etc/pal/localhost.key -out /etc/pal/localhost.pem -days 365 -sha256 -subj '/CN=localhost' -addext "subjectAltName=IP:127.0.0.1,DNS:localhost"
# Copy Insecure Test Configs
cp -f /vagrant/test/pal.yml /etc/pal/
cp -f /vagrant/test/*.yml /etc/pal/actions/
# Ensure permissions are correct
chown -Rf pal:pal /etc/pal /pal
# Run pal Systemd Service
systemctl daemon-reload
systemctl enable pal
systemctl restart pal
SHELL
end