Created
August 10, 2017 03:27
-
-
Save brandonsoto/735a4a780e4c324e4df36676318caf86 to your computer and use it in GitHub Desktop.
Multi-machine VMware Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at | |
# https://docs.vagrantup.com. | |
# Every Vagrant development environment requires a box. You can search for | |
# boxes at https://vagrantcloud.com/search. | |
config.vm.box = "centos/7" | |
# Provider-specific configuration so you can fine-tune various | |
# backing providers for Vagrant. These expose provider-specific options. | |
# Example for VirtualBox: | |
# | |
config.vm.define "client" do |client| | |
client.vm.network "private_network", ip: "172.16.130.12" | |
client.vm.hostname = "client" | |
client.vm.provider "vmware_workstation" do |vw| | |
vw.gui = true | |
# Customize the amount of memory on the VM: | |
vw.memory = "1024" | |
vw.vmx["serial0.present"] = "TRUE" | |
vw.vmx["serial0.fileType"] = "pipe" | |
vw.vmx["serial0.fileName"] = "/tmp/brandon_sock" | |
vw.vmx["serial0.pipe.endPoint"] = "client" | |
end | |
end | |
config.vm.define "server" do |server| | |
server.vm.network "private_network", ip: "172.16.130.14" | |
server.vm.hostname = "server" | |
server.vm.provider "vmware_workstation" do |vw| | |
vw.gui = true | |
# Customize the amount of memory on the VM: | |
vw.memory = "1024" | |
vw.vmx["serial0.present"] = "TRUE" | |
vw.vmx["serial0.fileType"] = "pipe" | |
vw.vmx["serial0.fileName"] = "/tmp/brandon_sock" | |
vw.vmx["serial0.pipe.endPoint"] = "server" | |
end | |
end | |
# | |
# View the documentation for the provider you are using for more | |
# information on available options. | |
# Enable provisioning with a shell script. Additional provisioners such as | |
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the | |
# documentation for more information about their specific syntax and use. | |
config.vm.provision "shell", inline: <<-SHELL | |
yum install epel-release python34 -y | |
yum install python-pip -y | |
pip install pyserial | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment