Drop vagrant support

Nobody in the development team has ever really used that, it needs a ton
of dependencies, and doesn't work in toolbox/Silverblue. Vagrantfile has
not been updated for a long time (Fedora 29 is EOL).

Our own image-prepare/vm-run/image-customize etc. machinery is efficient
enough, and proven to work.

Closes #14369
This commit is contained in:
Martin Pitt 2020-07-20 09:10:52 +02:00 committed by GitHub
parent 8441b69d55
commit 97a0e1c9f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 98 deletions

View File

@ -206,35 +206,6 @@ You need to disable SELinux with
for this to work, as your local build tree does not otherwise have the expected
SELinux type.
## Working on Cockpit using Vagrant
It is also possible to use a Vagrant virtual machine to develop Cockpit.
Most of Cockpit is written in JavaScript. Almost all of this code is found
in the packages in the pkg/ subdirectory of the Cockpit git checkout.
To use Vagrant to develop Cockpit, run in its top level git checkout.
In some cases you may need to use `sudo` with vagrant commands:
$ vagrant up
Now you can edit files in the `pkg/` subdirectory of the Cockpit sources. Use
`make` to build those sources. The changes should take effect after syncing
them to the Vagrant VM. For example:
$ make && vagrant rsync
Now log into Cockpit on the vagrant VM to see your changes. Use the
user name 'admin' and the password 'foobar' to log in. The Cockpit
instance in vagrant should be available at the following URL:
http://localhost:9090
If you want to setup automatic syncing as you edit JavaScript files
you can run:
$ vagrant rsync-auto &
## Installation from upstream sources
$ make

69
Vagrantfile vendored
View File

@ -1,69 +0,0 @@
# vi: set ft=ruby :
#
# See HACKING.md for how to use this Vagrantfile.
#
Vagrant.configure(2) do |config|
config.vm.box = "fedora/29-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: 9091
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 \
NetworkManager \
pcp \
qemu \
realmd \
storaged \
storaged-lvm2 \
subscription-manager \
tuned libvirt \
yum-utils
dnf install -y cockpit
systemctl enable cockpit.socket
systemctl start cockpit.socket
printf "[WebService]\nAllowUnencrypted=true\n" > /etc/cockpit/cockpit.conf
systemctl daemon-reload
SHELL
end