zoukankan      html  css  js  c++  java
  • vagrant file 模板




    # -*- mode: ruby -*-
    # vi: set ft=ruby :
    
    Vagrant.require_version ">= 1.6.0"
    
    boxes = [
        {
            :name => "cs7-1",
            :eth1 => "10.0.1.15",
            :mem => "512",
            :cpu => "1"
        },
    	 {
            :name => "cs7-2",
            :eth1 => "10.0.1.16",
            :mem => "512",
            :cpu => "1"
        },
    	 {
            :name => "cs7-3",
            :eth1 => "10.0.1.17",
            :mem => "512",
            :cpu => "1"
        },
       
    ]
    
    Vagrant.configure(2) do |config|
    
      config.vm.box = "centos-7"
    
      boxes.each do |opts|
          config.vm.define opts[:name] do |config|
            config.vm.hostname = opts[:name]
            config.vm.provider "vmware_fusion" do |v|
              v.vmx["memsize"] = opts[:mem]
              v.vmx["numvcpus"] = opts[:cpu]
            end
    
            config.vm.provider "virtualbox" do |v|
              v.customize ["modifyvm", :id, "--memory", opts[:mem]]
              v.customize ["modifyvm", :id, "--cpus", opts[:cpu]]
            end
    
            config.vm.network :private_network, ip: opts[:eth1]
    		config.vm.boot_timeout = 100
          end
      end
    
      #config.vm.synced_folder "./labs", "/home/vagrant/labs"
      config.vm.provision "shell", privileged: true, path: "./setup.sh"
    
    end
    
  • 相关阅读:
    【逆序对】N*M Puzzle / Simple Puzzle
    【逆序对】Ultra
    bzoj 1814 Fornula 1
    hdu 1693 插头dp入门
    bzoj 2154
    没有上司的舞会
    【HNOI】合唱队
    luogu 自适应Simpson2
    luogu 自适应Simpson1
    【bzoj 1502】月下柠檬树
  • 原文地址:https://www.cnblogs.com/wenyule/p/13639625.html
Copyright © 2011-2022 走看看