Diferencia entre revisiones de «Ejercicio 3: Encapsulado y aprovisionamiento de una app en Vagrant 21-22»

De Wiki de EGC
Saltar a: navegación, buscar
(Página creada con «Creamos un Vagrantfile, podeis ver el código en [aquí https://github.com/EGCETSII/1920-Practica-1] <syntaxhighlight lang="bash" line='line'> Vagrant.configure("2") do |c...»)
 
Línea 9: Línea 9:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Creamos nuestra format de aprovisionar (de momento con un script bash)
+
Creamos nuestra forma de aprovisionar (de momento con un script bash)
 
<syntaxhighlight lang="bash" line='line'>
 
<syntaxhighlight lang="bash" line='line'>
 
sudo apt update
 
sudo apt update

Revisión del 07:18 24 nov 2021

Creamos un Vagrantfile, podeis ver el código en [aquí https://github.com/EGCETSII/1920-Practica-1]

1 Vagrant.configure("2") do |config|
2   config.vm.box = "ubuntu/bionic64"
3   config.vm.network "forwarded_port", guest: 80, host: 8080
4   config.vm.provision "shell", path: 'provision.sh'
5 end

Creamos nuestra forma de aprovisionar (de momento con un script bash)

1 sudo apt update
2 sudo apt upgrade -y
3 sudo apt install -y git python3 python3-pip screen 
4 git clone https://github.com/EGCETSII/1920-Practica-1.git
5 cd 1920-Practica-1
6 pip3 install -r requirements.txt 
7 screen -m -d python3 holamundo.py

Levantamos nuestra máquina

1 vagrant up
  1. ¿Cómo podemos cambiar el puerto en el que se despliegue la máquina?
  2. ¿Qué ocurre si cambiamos el box base a uno que no soporte "apt"?