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