Skip to content

Instantly share code, notes, and snippets.

@svlasov
Created July 9, 2015 12:34
Show Gist options
  • Save svlasov/6ba0af57e10fe81446fe to your computer and use it in GitHub Desktop.
Save svlasov/6ba0af57e10fe81446fe to your computer and use it in GitHub Desktop.
SD Centos-6.5 Vagrantfile
# -*- 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|
config.ssh.username = 'root'
config.ssh.password = '123456'
config.ssh.insert_key = 'true'
config.vm.box = "chef/centos-6.5"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 27017, host: 28017
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 443, host: 4443
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
# vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
config.vm.provision "shell", inline: <<-SHELL
echo "provisioning..."
yum makecache
yum install -y vim git htop curl tree
SHELL
config.vm.provision "shell", inline: <<-SHELL
if [ ! -d /root/install ]; then
ln -s /vagrant/install/scripts /root/install
fi
SHELL
end
@svlasov
Copy link
Author

svlasov commented Jul 9, 2015

This is a markdown comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment