tech:vagrant:casosuso

Diferències

Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.

Enllaç a la visualització de la comparació

Ambdós costats versió prèvia Revisió prèvia
Següent revisió
Revisió prèvia
tech:vagrant:casosuso [16/11/2021 02:43] – [vagrant: casos de uso] matetech:vagrant:casosuso [16/11/2021 02:50] (actual) – suprimit mate
Línia 1: Línia 1:
-= vagrant: casos de uso 
-  * [[tech:vagrant:casosuso:tomcat]] 
-  * [[tech:vagrant:casosuso:php]] 
-  * [[tech:vagrant:casosuso:mysql]] 
-  * [[tech:vagrant:casosuso:weblogic]] 
-  * [[tech:vagrant:casosuso:3maquinas]] 
-  * [[tech:vagrant:casosuso:vagrant+docker]] 
-  * [[tech:vagrant:casosuso:master_template]] 
-  * [[tech:vagrant:casosuso:rmxnet]] 
- 
-== vagrant box 
-  * crear una box en Vagrant: 
-    - ''vagrant package <nombre_maquina> --output fichero.box'' 
-    - subir (versión, proveedor, etc...) 
-    - descargar (desde otro Vagrantfile):<code yaml; Vagrantfile></code> 
- 
-== ejemplos 
-== multi-machine cluster in a loop 
-<code ruby> 
-# -*- mode: ruby -*- 
-# vi: set ft=ruby : 
- 
-VAGRANTFILE_API_VERSION = "2" 
- 
-cluster = { 
-  "master" => { :ip => "192.168.33.10", :cpus => 1, :mem => 1024 }, 
-  "slave" => { :ip => "192.168.33.11", :cpus => 1, :mem => 1024 } 
-} 
-  
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
- 
-  cluster.each_with_index do |(hostname, info), index| 
- 
-    config.vm.define hostname do |cfg| 
-      cfg.vm.provider :virtualbox do |vb, override| 
-        config.vm.box = "ubuntu/trusty64" 
-        override.vm.network :private_network, ip: "#{info[:ip]}" 
-        override.vm.hostname = hostname 
-        vb.name = hostname 
-        vb.customize ["modifyvm", :id, "--memory", info[:mem], "--cpus", info[:cpus], "--hwvirtex", "on"] 
-      end # end provider 
-    end # end config 
- 
-  end # end cluster 
-end 
-</code> 
-/via: [[https://gist.github.com/roblayton/c629683ca74658412487]] 
- 
-=== configuraciones simples 
-<sxh ruby; title: 1 máquina, varias opciones de configuración> 
-Vagrant.configure(2) do |config| 
-  config.vm.box = "debian/jessie64" 
-  config.vm.hostname = "prueba1" 
-  config.vm.provision "shell", path: "actualizar.sh" 
- 
-  config.vm.network :private_network, ip: "192.168.100.10" # only host 
-  config.vm.network :public_network, ip: "192.168.100.20" 
-  config.vm.network :public_network,:bridge=>"eth0" 
-  config.vm.network :forwarded_port, guest: 80, host: 8080 
-  config.vm.synced_folder "./www","/www" 
- 
-  config.vm.provider "virtualbox" do |vb| 
-    vb.name = "VM-Prueba1" 
-    vb.memory = 1024 
-    vb.cpus = 3 
-    vb.linked_clone = true 
-    vb.gui = true 
-  end 
-end 
-</sxh> 
- 
-<sxh ruby; title: 2 máquinas> 
-  Vagrant.configure("2") do |config| 
-     config.vm.define "web" do |nodo1| 
-       nodo1.vm.box = "debian/jessie64" 
-       nodo1.vm.hostname = "web" 
-       nodo1.vm.network "public_network", bridge: "eth0" 
-       nodo1.vm.network "private_network", ip: "10.0.100.101" 
-     end 
-     config.vm.define "db" do |nodo2| 
-       nodo2.vm.box = "debian/jessie64" 
-       nodo2.vm.hostname = "db" 
-       nodo2.vm.network "private_network", ip: "10.0.100.102" 
-     end 
-   end 
-</sxh> 
- 
  
  • tech/vagrant/casosuso.1637059418.txt.gz
  • Darrera modificació: 16/11/2021 02:43
  • per mate