source: installer/vagrant/Vagrantfile-boottools-vbox

qndtest
Last change on this file was d3f623d, checked in by Irina Gómez <irinagomez@…>, 23 months ago

#1066 Changes devel branch name.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1# Vagrantfile to install OpenGnsys boot-tools .1 virtual environment using VirtualBox provider.
2
3VAGRANTFILE_API_VERSION = "2"
4# VM provider: Oracle VM VirtualBox.
5ENV['VAGRANT_DEFAULT_PROVIDER'] = "virtualbox"
6# Language.
7LANGUAGE = "es_ES"
8ENV['LC_ALL'] = LANGUAGE + ".UTF-8"
9# Amount of virtual memory.
10VMMEM = 1024
11# OpenGnsys boot-tools environment provisioning script.
12SCRIPT = <<EOT
13# Set language.
14export LANG="#{LANGUAGE}.UTF-8"
15echo "LANG=\\\"$LANG\\\"" > /etc/default/locale
16echo "LANG=\\\"$LANG\\\"" >> /etc/environment
17locale-gen --lang #{LANGUAGE}
18sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\\\"${LANG%_*}\\\"/" /etc/default/keyboard
19dpkg-reconfigure -fnoninteractive console-setup
20# Install dependencies.
21apt-get update -y
22apt-get install -y jq subversion syslinux syslinux-efi syslinux-utils
23# Prepare environment.
24groupadd opengnsys
25mkdir -p /opt/opengnsys/client /tmp/opengnsys_installer/opengnsys
26ln -fs /var/lib/tftpboot /opt/opengnsys
27BRANCH="main"
28svn export https://github.com/opengnsys/ogLive-Builder/branches/$BRANCH/ /tmp/opengnsys_installer/opengnsys/client/boot-tools
29echo "Connect to this VM, launch boot-tools generation script and follow instructions:"
30echo "    sudo /tmp/opengnsys_installer/opengnsys/client/boot-tools/boottoolsgenerator.sh"
31echo "Warning: this process may take a long time."
32echo "ogLive ISO file will be located in /opt/opengnsys/tftpboot/ogclient directory."
33EOT
34
35Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
36
37  # OpenGnsys boot-tools environment VM definition.
38  config.vm.define "ogBootTools" do |bt|
39    # Specific VirtualBox configuration.
40    bt.vm.provider "virtualbox" do |vb|
41      # VM name, memory and CPUs.
42      vb.name = "ogBootTools"
43      vb.memory = VMMEM
44      vb.cpus = 1
45    end
46    # VM base and host name.
47    bt.vm.box = "ubuntu/xenial64"
48    bt.vm.hostname = "ogBootTools"
49    # Comment out to disable synced folder.
50    #bt.vm.synced_folder ".", "/vagrant", disabled: true
51    # Launch provisioning script.
52    bt.vm.provision "shell", inline: SCRIPT
53  end
54
55end
56
Note: See TracBrowser for help on using the repository browser.