From b1fa0237e6662289b0a77c99faf4cc92eaa2da4b Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 28 May 2018 08:16:04 +0200 Subject: #840: Incluir directorios que faltaban en instalación; nueva info de instalación y adaptar algunos ficheros Vagrant para descargar desde Github. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/INSTALL.es.txt | 6 +- installer/opengnsys_installer.sh | 2 +- installer/vagrant/README.es.txt | 4 +- installer/vagrant/Vagrantfile-devel-vbox | 6 +- installer/vagrant/Vagrantfile-prod-vbox | 164 +++++++++++++++++++++++++++++++ installer/vagrant/Vagrantfile-trunk-vbox | 164 ------------------------------- 6 files changed, 173 insertions(+), 173 deletions(-) create mode 100644 installer/vagrant/Vagrantfile-prod-vbox delete mode 100644 installer/vagrant/Vagrantfile-trunk-vbox diff --git a/installer/INSTALL.es.txt b/installer/INSTALL.es.txt index 33070d26..0fd5ba75 100644 --- a/installer/INSTALL.es.txt +++ b/installer/INSTALL.es.txt @@ -1,5 +1,5 @@ -Instalación y Actualización de OpenGnsys 1.1.0 -============================================== +Instalación y Actualización de OpenGnsys 1.1.1pre +================================================= Instalación inicial @@ -12,7 +12,7 @@ Descargar una versión completa y desccomprimir el fichero "opengnsys-version.ta cd opengnsys/installer O bien, descargar el instalador desde la última reversión del repositorio: - svn export https://opengnsys.es/svn/branches/version1.1/installer/opengnsys_installer.sh + wget https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh Opcionalmente, puede descargarse la imagen del cliente; si no se realiza este paso, el instalador la descargará automáticamente. wget https://opengnsys.es/downloads/ogLive-versioncliente.iso diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 6fe905dc..ba6b0bf2 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1204,7 +1204,7 @@ function createDirs() echoAndLog "${FUNCNAME}(): creating directory paths in $path_opengnsys_base" mkdir -p $path_opengnsys_base mkdir -p $path_opengnsys_base/bin - mkdir -p $path_opengnsys_base/client + mkdir -p $path_opengnsys_base/client/{images,log} mkdir -p $path_opengnsys_base/doc mkdir -p $path_opengnsys_base/etc mkdir -p $path_opengnsys_base/lib diff --git a/installer/vagrant/README.es.txt b/installer/vagrant/README.es.txt index ce40f709..6f300afe 100644 --- a/installer/vagrant/README.es.txt +++ b/installer/vagrant/README.es.txt @@ -5,7 +5,7 @@ Preparar entorno virtual de desarrollo para OpenGnsys Ficheros de configuración disponibles: - - Vagrantfile-trunk-vbox Vagrantfile para OpenGnsys estable con proveedor VirtualBox. + - Vagrantfile-prod-vbox Vagrantfile para OpenGnsys estable 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-browser-vbox Vagrantfile para preparar el entorno de desarrollo del Browser del cliente (recomendado solo para miembros del grupo de desarrollo). @@ -25,7 +25,7 @@ El entorno de trabajo de OpenGnsys. - pc12 - ogclientN: MV clientes para restaurar con disco vacío. -Ejecutar el entorno virtual (Vagrantfile-trunk-vbox y Vagrantfile-devel-vbox). +Ejecutar el entorno virtual (Vagrantfile-prod-vbox y Vagrantfile-devel-vbox). - Crear un directorio de trabajo. - Copiar el fichero Vagrantfile-...-vbox correspondiente en dicho directorio como Vagrantfile. diff --git a/installer/vagrant/Vagrantfile-devel-vbox b/installer/vagrant/Vagrantfile-devel-vbox index c8eb022f..4d41afd0 100644 --- a/installer/vagrant/Vagrantfile-devel-vbox +++ b/installer/vagrant/Vagrantfile-devel-vbox @@ -1,4 +1,4 @@ -# Vagrantfile to install OpenGnsys 1.1 virtual environment using VirtualBox provider. +# Vagrantfile to install OpenGnsys virtual environment (development version) using VirtualBox provider. VAGRANTFILE_API_VERSION = "2" # VM provider: Oracle VM VirtualBox. @@ -38,7 +38,7 @@ if [ -z "$(blkid /dev/mapper/og-images | grep ext4)" ]; then mount -a fi # Install OpenGnsys and change server address. -wget -q https://opengnsys.es/svn/branches/version1.1/installer/opengnsys_installer.sh -O - | bash || exit $? +curl -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh | bash || exit $? mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log echo y | /opt/opengnsys/bin/setserveraddr enp0s8 # Insert DHCP data. @@ -94,7 +94,7 @@ OGAGENTPKG = "ogagent_1.1.0_all.deb" MODELSCRIPT = <> /etc/fstab + mount -a +fi +# Install OpenGnsys and change server address. +curl -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh | bash || exit $? +mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log +echo y | /opt/opengnsys/bin/setserveraddr enp0s8 +# Insert DHCP data. +for ((i=#{NCLIENTS+10}; i>10; i--)); do + sed -i "/^}$/ i host pc${i} { hardware ethernet #{MACPREFIX}:${i}; fixed-address #{NETPREFIX}.${i}; }" /etc/dhcp/dhcpd.conf +done +service isc-dhcp-server restart +# 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 +# Comment out next lines for automatic data insertion. +#SQL="INSERT INTO aulas (nombreaula, idcentro, urlfoto, grupoid, ubicacion, puestos, modomul, ipmul, pormul, velmul, router, netmask, ntp, dns, proxy, modp2p, timep2p) VALUES ('Aula virtual', 1, 'aula.jpg', 0, 'Despliegue virtual con Vagrant.', 5, 2, '239.194.2.11', 9000, 70, '#{NETPREFIX}.1', '255.255.255.0', '', '', '', 'peer', 30); INSERT INTO ordenadores (nombreordenador, ip, mac, idaula, idrepositorio, idperfilhard, idmenu, idproautoexec, grupoid, router, mascara, arranque, netiface, netdriver, fotoord) VALUES" +#for ((i=11; i<=#{NCLIENTS+10}; i++)); do +# SQL="$SQL ('pc$i', '#{NETPREFIX}.$i', REPLACE('#{MACPREFIX}$i',':',''), 1, 1, 0, 0, 0, 0, '#{NETPREFIX}.1', '255.255.255.0', '00unknown', 'eth0', 'generic', 'fotoordenador.gif')," +#done +#mysql -u usuog -ppassusuog -D ogAdmBD -e "${SQL%,}" +#/opt/opengnsys/bin/setclientmode ogLiveAdmin pc11 PERM +#for ((i=12; i<=#{NCLIENTS+10}; i++)); do +# /opt/opengnsys/bin/setclientmode ogLive pc$i PERM +#done +echo "Notes:" +echo "- OpenGnsys Server URL: https://localhost:#{LOCALWEBPORT}/opengnsys/" +exit 0 +EOT + +# Client 1 OS provisioning script. +OGAGENTPKG = "ogagent_1.1.0_all.deb" +MODELSCRIPT = <> /etc/fstab - mount -a -fi -# Install OpenGnsys and change server address. -wget -q https://opengnsys.es/svn/trunk/installer/opengnsys_installer.sh -O - | bash || exit $? -mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log -echo y | /opt/opengnsys/bin/setserveraddr enp0s8 -# Insert DHCP data. -for ((i=#{NCLIENTS+10}; i>10; i--)); do - sed -i "/^}$/ i host pc${i} { hardware ethernet #{MACPREFIX}:${i}; fixed-address #{NETPREFIX}.${i}; }" /etc/dhcp/dhcpd.conf -done -service isc-dhcp-server restart -# 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 -# Comment out next lines for automatic data insertion. -#SQL="INSERT INTO aulas (nombreaula, idcentro, urlfoto, grupoid, ubicacion, puestos, modomul, ipmul, pormul, velmul, router, netmask, ntp, dns, proxy, modp2p, timep2p) VALUES ('Aula virtual', 1, 'aula.jpg', 0, 'Despliegue virtual con Vagrant.', 5, 2, '239.194.2.11', 9000, 70, '#{NETPREFIX}.1', '255.255.255.0', '', '', '', 'peer', 30); INSERT INTO ordenadores (nombreordenador, ip, mac, idaula, idrepositorio, idperfilhard, idmenu, idproautoexec, grupoid, router, mascara, arranque, netiface, netdriver, fotoord) VALUES" -#for ((i=11; i<=#{NCLIENTS+10}; i++)); do -# SQL="$SQL ('pc$i', '#{NETPREFIX}.$i', REPLACE('#{MACPREFIX}$i',':',''), 1, 1, 0, 0, 0, 0, '#{NETPREFIX}.1', '255.255.255.0', '00unknown', 'eth0', 'generic', 'fotoordenador.gif')," -#done -#mysql -u usuog -ppassusuog -D ogAdmBD -e "${SQL%,}" -#/opt/opengnsys/bin/setclientmode ogLiveAdmin pc11 PERM -#for ((i=12; i<=#{NCLIENTS+10}; i++)); do -# /opt/opengnsys/bin/setclientmode ogLive pc$i PERM -#done -echo "Notes:" -echo "- OpenGnsys Server URL: https://localhost:#{LOCALWEBPORT}/opengnsys/" -exit 0 -EOT - -# Client 1 OS provisioning script. -OGAGENTPKG = "ogagent_1.1.0_all.deb" -MODELSCRIPT = <