rublon-ssh/os/debian/11/Vagrantfile
rublon-bwi af64f8e9e3
Bwi/v2.2.0 (#16)
* Remove dynamic memory usage from core

* Refacor status check to use json pointers

* Move access token to session

* Remove code duplication

* Fix compile warnings from rapidjson sources

* Add 'interactive mode option to session configuration

* Implement non interactive mode connector

* Add 'non interactove' implementation

* Apply rapidjson patch

* Build on all cores

* Rename build script

* Split configure and build steps

* Add scripts for building all images

* Change bash to python for build scripts

* Stop printing methods name in non interactive mode

* Add trace log level, adn more params to init message

* Fix build

* Fix non interactive method selection and refactor vagrant files for debian like systems

* Refactor log messages

* Remove exces dependencies from vagrant configuration files

* Fixed vagrantfiles

* Added repo for rhel

* Add nonInteractiveMode option

* Added instalation script for pubkey

* Fixed pubkey install script and postrm for rhel
2025-03-07 11:41:12 +01:00

65 lines
2.0 KiB
Ruby
Executable File

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Default
# ----------------------
# login: root
# pass: vagrant
Vagrant.configure("2") do |config|
# Basic configuration
config.vm.provider "virtualbox"
config.vm.box = "debian/bullseye64"
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.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=debian11
export BUILDDIR=/home/vagrant/build
DEBIAN_FRONTEND=noniteracactive \
apt-get update && apt-get install -y \
build-essential \
openssh-server \
libcurl4-openssl-dev \
libpam0g-dev \
libssl-dev \
cmake
# 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
useradd -s /bin/bash -m bwi
echo "bwi:bwi"|chpasswd
sudo dpkg -i ${BUILDDIR}/rublon*.deb
SHELL
end