summaryrefslogtreecommitdiffstats
path: root/installer/vagrant/Vagrantfile-boottools-vbox
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2016-03-28 12:50:18 +0000
committerramon <ramongomez@us.es>2016-03-28 12:50:18 +0000
commit8413f14a791d0df6a331aeee2906147b15692295 (patch)
treeabd50c063232aa1d229b3cffbacc579a08230a58 /installer/vagrant/Vagrantfile-boottools-vbox
parent5c9fa9448aabcb132eb76c7d8a2242f7be9226f5 (diff)
#724 #739: Automatizar el entorno virtual para generar cliente ogLive mediante Vagrant.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4846 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'installer/vagrant/Vagrantfile-boottools-vbox')
-rw-r--r--installer/vagrant/Vagrantfile-boottools-vbox50
1 files changed, 50 insertions, 0 deletions
diff --git a/installer/vagrant/Vagrantfile-boottools-vbox b/installer/vagrant/Vagrantfile-boottools-vbox
new file mode 100644
index 00000000..f37d8cd0
--- /dev/null
+++ b/installer/vagrant/Vagrantfile-boottools-vbox
@@ -0,0 +1,50 @@
+# 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 memory VM.
+VMMEM = 1024
+# OpenGnsys boot-tools environment provisioning script.
+SCRIPT = <<EOT
+# Set language.
+export LANG="#{LANGUAGE}.UTF-8"
+echo "LANG=\"$LANG\"" > /etc/default/locale
+locale-gen --lang #{LANGUAGE}
+# Install dependencies.
+apt-get update -y
+apt-get install -y subversion
+# Prepare environment.
+mkdir -p /opt/opengnsys/client /tmp/opengnsys_installer/opengnsys
+ln -fs /var/lib/tftpboot /opt/opengnsys
+svn export http://opengnsys.es/svn/branches/version1.1/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"
+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
+ vb.gui = true
+ end
+ # VM base and host name.
+ bt.vm.box = "ubuntu/wily32"
+ bt.vm.hostname = "ogBootTools"
+ # Disable synced folder.
+ bt.vm.synced_folder ".", "/vagrant", disabled: true
+ # Launch provisioning script.
+ bt.vm.provision "shell", inline: SCRIPT
+ end
+
+end
+