forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
71 lines (58 loc) · 2.2 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
61
62
63
64
65
66
67
68
69
70
71
# vi: set ft=ruby :
#
# See HACKING.md for how to use this Vagrantfile.
#
Vagrant.configure(2) do |config|
config.vm.box = "fedora/26-cloud-base"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "./dist", "/cockpit/dist", type: "rsync", create: true, rsync__args: ["--verbose", "--archive", "--delete", "-z"]
config.vm.network "private_network", ip: "192.168.50.10"
config.vm.network "forwarded_port", guest: 9090, host: 9090
config.vm.hostname = "cockpit-devel"
config.vm.post_up_message = "You can now access Cockpit at http://localhost:9090 (login as 'admin' with password 'foobar')"
config.vm.provider "libvirt" do |libvirt|
libvirt.memory = 1024
libvirt.nested = true
libvirt.cpu_mode = "host-model"
end
config.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = 1024
end
config.vm.provision "shell", inline: <<-SHELL
set -eu
dnf update -y
dnf install -y util-linux-user # for chfn
echo foobar | passwd --stdin root
getent passwd admin >/dev/null || useradd -c Administrator -G wheel admin
echo foobar | passwd --stdin admin
usermod -a -G wheel vagrant
chfn -f Vagrant vagrant
mkdir -p /root/.local/share /home/admin/.local/share /usr/local/share
ln -snf /cockpit/dist /usr/local/share/cockpit
ln -snf /cockpit/dist /root/.local/share/cockpit
ln -snf /cockpit/dist /home/admin/.local/share/cockpit
dnf copr enable -y @cockpit/cockpit-preview
dnf install -y \
atomic \
docker \
etcd \
firewalld \
git \
kubernetes \
NetworkManager \
pcp \
qemu \
realmd \
storaged \
storaged-lvm2 \
subscription-manager \
tuned libvirt \
yum-utils
dnf install -y cockpit
debuginfo-install -y cockpit cockpit-pcp
systemctl enable cockpit.socket
systemctl start cockpit.socket
printf "[WebService]\nAllowUnencrypted=true\n" > /etc/cockpit/cockpit.conf
systemctl daemon-reload
SHELL
end