source: installer/vagrant/Vagrantfile-boottools-vbox @ 72d19da

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 72d19da was 5f4cfdc, checked in by Ramón M. Gómez <ramongomez@…>, 6 years ago

#872: Update list of closed tickets; quotation correction in Vagrant files.

  • 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
27svn export https://github.com/opengnsys/OpenGnsys/branches/devel/client /tmp/opengnsys_installer/opengnsys/client
28echo "Connect to this VM, launch boot-tools generation script and follow instructions:"
29echo "    sudo /tmp/opengnsys_installer/opengnsys/client/boot-tools/boottoolsgenerator.sh"
30echo "Warning: this process may take a long time."
31echo "ogLive ISO file will be located in /opt/opengnsys/tftpboot/ogclient directory."
32EOT
33
34Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
35
36  # OpenGnsys boot-tools environment VM definition.
37  config.vm.define "ogBootTools" do |bt|
38    # Specific VirtualBox configuration.
39    bt.vm.provider "virtualbox" do |vb|
40      # VM name, memory and CPUs.
41      vb.name = "ogBootTools"
42      vb.memory = VMMEM
43      vb.cpus = 1
44    end
45    # VM base and host name.
46    bt.vm.box = "ubuntu/xenial64"
47    bt.vm.hostname = "ogBootTools"
48    # Comment out to disable synced folder.
49    #bt.vm.synced_folder ".", "/vagrant", disabled: true
50    # Launch provisioning script.
51    bt.vm.provision "shell", inline: SCRIPT
52  end
53
54end
55
Note: See TracBrowser for help on using the repository browser.