source: installer/vagrant/Vagrantfile-ogagent-vbox @ 978e186

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-instalacionwebconsole3
Last change on this file since 978e186 was 6129d4a, checked in by ramon <ramongomez@…>, 9 years ago

#739: Mejoras en MV Vagrant para generar OGAgent: volver a habilitar directorio compartido y posibilidad de elegir entre Eclipse o ATOM.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@4972 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 2.7 KB
Line 
1# Vagrantfile to prepare virtual environment using VirtualBox provider to develop OGAgent.
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 memory VM.
10VMMEM = 4096
11VMCPUS = 4
12# OpenGnsys boot-tools environment provisioning script.
13SCRIPT = <<EOT
14# Set language.
15export LANG="#{LANGUAGE}.UTF-8"
16localedef -v -c -i ${LANG%.*} -f UTF-8 $LANG 2>/dev/null
17localectl set-locale LANG=$LANG
18localectl set-keymap ${LANG%_*}
19localectl set-x11-keymap ${LANG%_*}
20# Update repositories.
21dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
22# Install main dependencies.
23dnf install -y kernel-devel-$(uname -r) debhelper dpkg-dev pyqt4-devel rpm-build subversion samba-winbind wine.i686 mingw32-wine-gecko wine-mono cabextract
24# Install desktop (XFCE) and GUI utils.
25dnf install -y @xfce-desktop-environment firefox VirtualBox-guest kmod-VirtualBox akmod-VirtualBox akmods
26ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
27sed -i '$d' /usr/lib/udev/rules.d/60-vboxguest.rules
28akmods && systemctl restart systemd-modules-load.service
29# Install Eclipse IDE for Python (it needs some disk space).
30dnf install -y eclipse-pydev eclipse-nls-${LANG%_*}
31# Comment out next line if you prefer to install ATOM editor.
32#wget -q https://atom.io/download/rpm -O /tmp/atom.rpm && dnf install -y /tmp/atom.rpm && rm -f /tmp/atom.rpm
33# Download OGAgent environment installer.
34svn export http://opengnsys.es/svn/branches/version1.1/installer/ogagent-devel-installer.sh /home/vagrant
35# Instructions.
36echo "Manual operations:"
37echo "- Reboot VM or launch desktop: startxfce4 &"
38echo "- Enlarge VM window."
39echo "- To prepare OGAgent environment, execute: ./ogagent-devel-installer.sh"
40echo "- Before modify OGAgent code, configure Eclipse:"
41echo "  - Set Python interpreter on Preferences/PyDev/Interpreters/Python Interpreter."
42echo "  - Create a new PyDev Project located in /home/vagrant/ogagent/src directory."
43EOT
44
45Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
46
47  # OpenGnsys boot-tools environment VM definition.
48  config.vm.define "ogAgent" do |ag|
49    # Specific VirtualBox configuration.
50    ag.vm.provider "virtualbox" do |vb|
51      # VM name, memory and CPUs.
52      vb.name = "ogAgent"
53      vb.memory = VMMEM
54      vb.cpus = VMCPUS
55      vb.gui = true
56    end
57    # VM base and host name.
58    ag.vm.box = "fedora/23-cloud-base"
59    ag.vm.hostname = "ogAgent"
60    # Comment out if you want to disable synced folder.
61    #ag.vm.synced_folder ".", "/vagrant", disabled: true
62    # Launch provisioning script.
63    ag.vm.provision "shell", inline: SCRIPT
64  end
65
66end
67
Note: See TracBrowser for help on using the repository browser.