source: installer/vagrant/Vagrantfile-ogagent-vbox @ a30baf2

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 a30baf2 was 435c10d, checked in by ramon <ramongomez@…>, 8 years ago

#718: Instrucciones para instalar OGAgent para macOS; no usar Winetricks en nuevas distribuciones para crear OGAgent para Windows y usar Fedora 25 en MV Vagrant.

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

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