git-svn-id: https://opengnsys.es/svn/branches/version1.1@4858 a21b9725-9963-47de-94b9-378ad31fedc9remotes/github/debian-pkg
parent
54c9b3c032
commit
cc2b3c20e8
|
@ -8,6 +8,7 @@ Ficheros de configuración disponibles:
|
|||
- Vagrantfile-trunk-vbox Vagrantfile para OpenGnsys oficial con proveedor VirtualBox.
|
||||
- Vagrantfile-devel-vbox Vagrantfile para OpenGnsys en desarrollo con proveedor VirtualBox.
|
||||
- Vagrantfile-boottools-vbox Vagrantfile para preparar el entorno de generación del cliente ogLive (recomendado solo para desarrolladores experimentados).
|
||||
- Vagrantfile-ogagent-vbox Vagrantfile para preparar el entorno de desarrollo del agente OGAgent (recomendado solo para miembros del grupo de desarrollo).
|
||||
|
||||
|
||||
Requisitos previos.
|
||||
|
@ -16,14 +17,14 @@ Requisitos previos.
|
|||
- Instalar la última versión oficial de Vagrant (no usar la incluida en Ubuntu 14.04).
|
||||
|
||||
|
||||
El entorno de trabajo.
|
||||
El entorno de trabajo de OpenGnsys
|
||||
|
||||
- ogAdministrator: MV para servidor OpenGnsys basada en Ubuntu 14.04 y 2º disco para repositorio.
|
||||
- ogClient01: MV cliente modelo con Ubuntu 14.04 instalado.
|
||||
- ogClient02 - ogclient0N: MV clientes para restaurar con disco vacío.
|
||||
|
||||
|
||||
Ejecutar el entorno virtual.
|
||||
Ejecutar el entorno virtual (Vagrantfile-trunk y Vagrantfile-devel).
|
||||
|
||||
- Crear un directorio de trabajo.
|
||||
- Copiar el fichero Vagrantfile correspondiente en dicho directorio como Vagrantfile.
|
||||
|
@ -53,7 +54,7 @@ Notas:
|
|||
|
||||
Descripción de las MV.
|
||||
|
||||
- Máquina virtual opengnsys.
|
||||
- Máquina virtual para servidor OpenGnsys.
|
||||
- Debe estar iniciada en primer lugar y activa para gestionar los clientes.
|
||||
- Usuario de acceso SSH: vagrant, clave: vagrant.
|
||||
- La interfaz 2 de VirtualBox está definida en la red privada para las MV del entorno.
|
||||
|
@ -68,3 +69,4 @@ Descripción de las MV.
|
|||
- Usar VirtualBox para deshabilitar la interfaz 1 de la MV del cliente modelo.
|
||||
- Una vez desplegadas las MV deberán ser controladas directamente con VirtaulBox.
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
# Vagrantfile to prepare virtual environment using VirtualBox provider to develop OGAgent.
|
||||
|
||||
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 = 4096
|
||||
VMCPUS = 4
|
||||
# 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
|
||||
echo "LANGUAGE=\"$LANG\"" >> /etc/environment
|
||||
echo "LC_ALL=\"$LANG\"" >> /etc/environment
|
||||
echo "LC_CTYPE=\"$LANG\"" >> /etc/environment
|
||||
locale-gen --lang #{LANGUAGE}
|
||||
sed -i 's/XKBLAYOUT=.*/XKBLAYOUT="${LANG%_*}"/' /etc/default/keyboard
|
||||
# Update repositories.
|
||||
add-apt-repository -y ppa:webupd8team/java
|
||||
add-apt-repository -y ppa:ubuntu-wine
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
apt-get -y upgrade
|
||||
# Install main dependencies.
|
||||
apt-get install -y aspell-${LANG%_*} debhelper dpkg-dev pyqt4-dev-tools realpath rpm subversion winbind wine1.8-i386
|
||||
# Install desktop (XFCE) and GUI utils.
|
||||
apt-get install -y xfce4 gnome-icon-theme-full tango-icon-theme firefox virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
|
||||
echo "allowed_users=anybody" > /etc/X11/Xwrapper.config
|
||||
# Install Oracle Java 8.
|
||||
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
|
||||
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
|
||||
apt-get -y install oracle-java8-installer
|
||||
# Install Eclipse Mars.
|
||||
echo "Downloading Eclipse..."
|
||||
wget -q http://ftp.fau.de/eclipse/technology/epp/downloads/release/mars/2/eclipse-php-mars-2-linux-gtk-x86_64.tar.gz -O /tmp/eclipse-php-mars-2-linux-gtk-x86_64.tar.gz
|
||||
tar -C /opt -xvzf /tmp/eclipse-php-mars-2-linux-gtk-x86_64.tar.gz
|
||||
# Add Eclipse icon to the desktop.
|
||||
mkdir -p /home/vagrant/Escritorio
|
||||
echo "#!/usr/bin/env xdg-open" > /home/vagrant/Escritorio/eclipse.desktop
|
||||
echo "[Desktop Entry]" >> /home/vagrant/Escritorio/eclipse.desktop
|
||||
echo "Name=Eclipse" >> /home/vagrant/Escritorio/eclipse.desktop
|
||||
echo "Type=Application" >> /home/vagrant/Escritorio/eclipse.desktop
|
||||
echo "Exec=/opt/eclipse/eclipse" >> /home/vagrant/Escritorio/eclipse.desktop
|
||||
echo "Icon=/opt/eclipse/icon.xpm" >> /home/vagrant/Escritorio/eclipse.desktop
|
||||
echo "Terminal=false" >> /home/vagrant/Escritorio/eclipse.desktop
|
||||
# Download OGAgent environment installer.
|
||||
svn export http://opengnsys.es/svn/branches/version1.1-tickets/OGAgent-ticket718/installer/ogagent-devel-installer.sh /home/vagrant
|
||||
# Instructions.
|
||||
echo "Manual operations:"
|
||||
echo "- Launch desktop: startxfce4 &"
|
||||
echo "- Enlarge VM window."
|
||||
echo "- To prepare OGAgent environment, execute: ./ogagent-devel-installer.sh"
|
||||
echo "- Before modify OGAgent code, configure Eclipse:"
|
||||
echo " - Go to Eclipse Marketplace and install PyDev plug-in."
|
||||
echo " - Set Python interpreter on Preferences/PyDev/Interpreters/Python Interpreter."
|
||||
echo " - Create new PyDev Project located on /home/vagrant/ogagent/src directory."
|
||||
EOT
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
||||
# OpenGnsys boot-tools environment VM definition.
|
||||
config.vm.define "ogAgent" do |ag|
|
||||
# Specific VirtualBox configuration.
|
||||
ag.vm.provider "virtualbox" do |vb|
|
||||
# VM name, memory and CPUs.
|
||||
vb.name = "ogAgent"
|
||||
vb.memory = VMMEM
|
||||
vb.cpus = VMCPUS
|
||||
vb.gui = true
|
||||
end
|
||||
# VM base and host name.
|
||||
ag.vm.box = "ubuntu/trusty64"
|
||||
ag.vm.hostname = "ogAgent"
|
||||
# Disable synced folder.
|
||||
ag.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
# Launch provisioning script.
|
||||
ag.vm.provision "shell", inline: SCRIPT
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue