Created
July 9, 2015 12:34
-
-
Save svlasov/6ba0af57e10fe81446fe to your computer and use it in GitHub Desktop.
SD Centos-6.5 Vagrantfile
This file contains hidden or 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| | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a markdown comment