Encapsulado y aprovisionamiento de una app en Vagrant
De Wiki de EGC
Revisión del 18:16 2 dic 2020 de Jagalindo (discusión | contribuciones) (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...»)
Creamos un Vagrantfile, podeis ver el código en [aquí https://github.com/EGCETSII/1920-Practica-1]
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "shell", path: 'provision.sh'
end
Creamos nuestra format de aprovisionar (de momento con un script bash)
sudo apt update
sudo apt upgrade -y
sudo apt install -y git python3 python3-pip screen
git clone https://github.com/EGCETSII/1920-Practica-1.git
cd 1920-Practica-1
pip3 install -r requirements.txt
screen -m -d python3 holamundo.py
Levantamos nuestra máquina
vagrant up