ruby 流浪多机

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby 流浪多机相关的知识,希望对你有一定的参考价值。

# -*- mode: ruby -*-
# nano: set ft=ruby :

Vagrant.configure("2") do |config|

  # Definir maquina 1
  config.vm.define "web" do |web|
    #Nombre de la maquina
    web.vm.box = "apache"
    #Distribucion
    web.vm.box = "relativkreativ/ubuntu-17-minimal"
    #Ver actualizaciones
    web.vm.box_check_update = true
    #Puertos forwardeados
    web.vm.network "forwarded_port", guest: 80, host: 9999
    #Carpetas sincronizadas
    web.vm.synced_folder "/Volumes/DATA/SITES", "/var/www/html", mount_options: ["dmode=777", "fmode=777"], owner: "vagrant", group: "www-data"
    #IP privada de la maquina
    web.vm.network "private_network", ip: "192.168.33.10"
    #IP Publica de la maquina
    web.vm.network "public_network", bridge: "en1: Wi-Fi (AirPort)", ip:"<IP public>"
    #Definir ajustes de virtualbox
    web.vm.provider "virtualbox" do |vb|
      vb.gui = false #No mostrar interfaz
      vb.name = 'APACHE' #Nombre en virtualbox
      vb.memory = "512" #Memoria de la maquina
    end
  end

  # Definir maquina 2 
  config.vm.define "db" do |db|
    #Nombre de la maquina
    db.vm.box = "bases"
    #Distribucion
    db.vm.box = "relativkreativ/ubuntu-17-minimal"
    #Ver actualizaciones
    db.vm.box_check_update = true
    #Puertos forwardeados
    db.vm.network "forwarded_port", guest: 3306, host: 3306
    #Carpetas sincronizadas
    #db.vm.synced_folder "/Volumes/DATA/SITES", "/var/www/html", mount_options: ["dmode=777", "fmode=777"], owner: "vagrant", group: "www-data"
    #IP privada de la maquina
    db.vm.network "private_network", ip: "192.168.33.10"
    #IP Publica de la maquina
    db.vm.network "public_network", bridge: "en1: Wi-Fi (AirPort)", ip:"<IP public>"
    #Definir ajustes de virtualbox
    db.vm.provider "virtualbox" do |vb|
      vb.gui = false #No mostrar interfaz
      vb.name = 'BASES' #Nombre en virtualbox
      vb.memory = "512" #Memoria de la maquina
    end
  end
end

以上是关于ruby 流浪多机的主要内容,如果未能解决你的问题,请参考以下文章

ruby 简单的流浪汉配置

ruby 流浪开信刀

ruby 苏格兰威士忌! PHP开发的最佳流浪汉版本

ruby 苏格兰威士忌! PHP开发的最佳流浪汉版本

ruby 苏格兰威士忌! PHP开发的最佳流浪汉版本

ruby 苏格兰威士忌! PHP开发的最佳流浪汉版本