# -*- mode: ruby -*- # vi: set ft=ruby : # Default user # ---------------------- # login: vagrant # pass: vagrant Vagrant.configure("2") do |config| # Basic configuration config.vm.provider "virtualbox" config.vm.box = "generic/rhel8" config.ssh.forward_agent = true # Create a public network, which generally matched to bridged network. # Bridged networks make the machine appear as another physical device on # your network. config.vm.network "public_network" # Share an additional folder to the guest VM. The first argument is # the path on the host to the actual folder. The second argument is # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. config.vm.synced_folder "../../..", "/home/vagrant/Rublon-Linux" # config.vm.synced_folder "../../../../socket.io", "/home/vagrant/socket.io" config.vm.provider "virtualbox" do |vb| vb.gui = false vb.memory = 2048 vb.cpus = 2 # Fix for 'SSH auth method: Private key' stuck vb.customize ["modifyvm", :id, "--cableconnected1", "on"] end # Enable provisioning with a shell script. Additional provisioners such as # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the # documentation for more information about their specific syntax and use. config.vm.provision "shell", inline: <<-SHELL export BASE=/home/vagrant/Rublon-Linux export DISTRO=rhel8 export BUILDDIR=/home/vagrant/build cp ${BASE}/helpers/centos-base.repo /etc/yum.repos.d/ yum update yum install -y openssl-devel libcurl systemd-pam cmake pam-devel libcurl-devel rpm-build redhat-lsb-core # remove old build if exists rm ${BUILDDIR} -Rf || true # build package cmake -B ${BUILDDIR} ${BASE} cmake --build ${BUILDDIR} -j$(nproc) cmake --build ${BUILDDIR} --target package -j$(nproc) # Register Rublon pam yum -y install ${BUILDDIR}/rublon-ssh*.el8.rpm useradd -s /bin/bash -m bwi echo "bwi:bwi"|chpasswd SHELL end