forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
52 lines (41 loc) · 2.17 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
# vi: set ft=ruby :
#
# See HACKING.md for how to use this Vagrantfile.
#
Vagrant.configure(2) do |config|
config.vm.box = "fedora-23-cloud-base"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/cockpit", type: "rsync", rsync__exclude: ['/src/', '/test/', '/node_modules/', '/doc/', '/examples/', '/images/', '/build/', '/x86_64/' ]
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.provider "libvirt" do |libvirt, override|
override.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-libvirt.box"
libvirt.memory = 1024
end
config.vm.provider "virtualbox" do |virtualbox, override|
override.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-virtualbox.box"
virtualbox.memory = 1024
end
config.vm.provision "shell", inline: <<-SHELL
set -eu
echo foobar | passwd --stdin root
getent passwd admin >/dev/null || useradd -u 1000 -c Administrator -G wheel admin
echo foobar | passwd --stdin admin
mkdir -p /root/.local/share /home/admin/.local/share /usr/local/share
ln -snf /cockpit/pkg /usr/local/share/cockpit
ln -snf /cockpit/pkg /root/.local/share/cockpit
ln -snf /cockpit/pkg /home/admin/.local/share/cockpit
dnf copr enable -y @cockpit/cockpit-preview
dnf install -y docker kubernetes atomic subscription-manager etcd pcp realmd \
NetworkManager storaged storaged-lvm2 git yum-utils
dnf install -y cockpit cockpit-pcp
debuginfo-install -y cockpit cockpit-pcp
systemctl enable cockpit.socket
systemctl start cockpit.socket
mkdir -p /etc/systemd/system/cockpit.service.d
printf "[Service]\nExecStartPre=/cockpit/tools/git-version-check\n" > \
/etc/systemd/system/cockpit.service.d/version.conf
systemctl daemon-reload
SHELL
end