From 2e7c9f783d821cc114fb8bde476bc1e785cc69fe Mon Sep 17 00:00:00 2001 From: Hakan Bayindir Date: Fri, 21 Jul 2023 10:55:35 +0300 Subject: [PATCH] feat: Add debian12-maven machine to the repository. This commit adds a new debian12-maven VM, which installs a vanilla Maven on top of Debian 12. No other config is done. --- README.md | 2 + debian12-maven/Vagrantfile | 90 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 debian12-maven/Vagrantfile diff --git a/README.md b/README.md index 71b2f86..84d443a 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Currently contains the following VMs: - **debian12-backintime-lab:** Debian Bookworm 64bit which updates itself and installs XFCE4 desktop with Back in Time from repositories. Designed to test the version bundled in the OS repositories. The machine has 4GB RAM and 128MB VRAM. - **debian11-sphinx-builder:** Debian Bullseye 64bit which updates itself and installs Sphinx, Read the Docs theme, Sphinx Toggle Button and an Apache server to build and test Sphinx documentation builds. The machine has 1GB RAM. - **Note:** `requirements.txt` file under `files/` folder is unused (it appears verbatim inside `Vagrantfile`) during build, but it's kept for reference purposes, since the exact versions are necessary for correct builds. +- **debian12-maven:** Debian Bookworm 64bit which updates itself and installs Maven, to be able to build Java projects. ## Private IP List Following list contains the Private IP addresses of the host-only networking interfaces of the machines: @@ -54,3 +55,4 @@ Following list contains the Private IP addresses of the host-only networking int - **debian11-backintime-lab:** `192.168.56.76` - **debian12-backintime-lab:** `192.168.56.75` - **debian-sphinx-builder:** `192.168.56.74` +- **debian12-maven:** `192.168.56.73` diff --git a/debian12-maven/Vagrantfile b/debian12-maven/Vagrantfile new file mode 100644 index 0000000..f261b19 --- /dev/null +++ b/debian12-maven/Vagrantfile @@ -0,0 +1,90 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# All Vagrant configuration is done below. The "2" in Vagrant.configure +# configures the configuration version (we support older styles for +# backwards compatibility). Please don't change it unless you know what +# you're doing. +Vagrant.configure(2) do |config| + # The most common configuration options are documented and commented below. + # For a complete reference, please see the online documentation at + # https://docs.vagrantup.com. + + # Every Vagrant development environment requires a box. You can search for + # boxes at https://atlas.hashicorp.com/search. + config.vm.box = "debian/bookworm64" + + # Give a proper hostname to the box + config.vm.hostname = "debian-maven" + + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + # config.vm.network "forwarded_port", guest: 80, host: 8080 + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + config.vm.network "private_network", ip: "192.168.56.73" + + # 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 "../data", "/vagrant_data" + + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + # Example for VirtualBox: + # + config.vm.provider "virtualbox" do |vb| + # Change the network cards to VirtIO for better performance: + # Two network cards since I also have a host-only network. + vb.customize ["modifyvm", :id, '--nictype1', 'virtio'] + vb.customize ["modifyvm", :id, '--nictype2', 'virtio'] + + # Customize the amount of memory on the VM: + vb.memory = "1024" + end + # + # View the documentation for the provider you are using for more + # information on available options. + + # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies + # such as FTP and Heroku are also available. See the documentation at + # https://docs.vagrantup.com/v2/push/atlas.html for more information. + # config.push.define "atlas" do |push| + # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" + # end + + # Enable provisioning with a shell script. Additional provisioners such as + # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the + # documentation for more information about their specific syntax and use. + config.vm.provision "shell", inline: <<-SHELL + # Update repositiories before installing anything. + apt-get update + + # Update system to latest packages. + DEBIAN_FRONTEND=noninteractive apt-get --yes dist-upgrade + + # Then install convenience packages which makes our life easier. + DEBIAN_FRONTEND=noninteractive apt-get install --yes vim screen ncftp mc git build-essential linux-headers-amd64 multitail + + # Install Maven and related machinery. + DEBIAN_FRONTEND=noninteractive apt-get install --yes maven + + # Downloading and installing things have ended, clean the downloaded packages. + apt-get clean + SHELL + + config.vm.post_up_message = "Your Debian 12 (Bookworm) Maven box is ready. You can vagrant ssh into it." +end -- 2.45.2