Skip to content
Permalink
Browse files

Add Vagrant (#104)

* Vagrantfile updating gitignore
* adding global node modules
* adding git attributes
* Fixing gitattributes
* one more time
* changing to ubuntu
  • Loading branch information...
enderv authored and hassy committed May 27, 2016
1 parent f0fd2bb commit 8d5c6b1eeeeeb3b0113ab2dae5b65e7a7e9ef630
Showing with 72 additions and 1 deletion.
  1. +9 −0 .gitattributes
  2. +1 −1 .gitignore
  3. +62 −0 Vagrantfile
@@ -0,0 +1,9 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Declare files that will always have CRLF line endings on checkout.
*.sh text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
@@ -20,4 +20,4 @@ lib-cov
artillery_report*
coverage/*
.vagrant/
.vscode
.vscode
@@ -0,0 +1,62 @@
Vagrant.configure("2") do |config|

# The name of the box(s) to run.
config.vm.box = "ubuntu/trusty64"

# Configure the virtual machine hardware
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end

config.vm.define "dev-artillery", primary: true do |server|
# Share host folder on guest machine
server.vm.synced_folder ".", "/vagrant", :disabled => true
server.vm.synced_folder '.', '/opt/artillery', owner: 'vagrant', group: 'vagrant'

#update
server.vm.provision "shell" do |s|
s.inline = "sudo apt-get -y update && sudo apt-get -y upgrade"
s.privileged = true
end

#setup nodejs install
server.vm.provision "shell" do |s|
s.inline = "curl --silent --location https://deb.nodesource.com/setup_4.x | bash -"
s.privileged = true
end

#install node
server.vm.provision "shell" do |s|
s.inline = "apt-get install -y nodejs"
s.privileged = true
end

# Install project dependencies
server.vm.provision "shell" do |s|
s.inline = "cd /opt/artillery; npm install; npm install -g eslint; npm install -g jscs"
s.privileged = true
end

# Install git
server.vm.provision "shell" do |s|
s.inline = "apt-get install -y git"
s.privileged = true
end

# Install bats
server.vm.provision "shell" do |s|
s.inline = "git clone https://github.com/sstephenson/bats.git; cd bats; ./install.sh /usr/local"
s.privileged = true
end

# Install jq
server.vm.provision "shell" do |s|
s.inline = "apt-get install -y jq";
s.privileged = true
end

end
end

0 comments on commit 8d5c6b1

Please sign in to comment.
You can’t perform that action at this time.