forked from EA31337/EA-Tester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
69 lines (56 loc) · 2.04 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'getoptlong'
=begin
# @todo: http://stackoverflow.com/q/14124234/55075
# Parse optional arguments.
opts = GetoptLong.new(
[ '--file-ea', GetoptLong::OPTIONAL_ARGUMENT ], # EA file.
[ '--dir-bt', GetoptLong::OPTIONAL_ARGUMENT ], # Dir with backtest files.
[ '--dir-sets', GetoptLong::OPTIONAL_ARGUMENT ] # Dir with set files.
)
opts.each do |opt, arg|
case opt
when '--file-ea'
file_ea==arg
when '--dir-bt'
dir_bt=arg
when '--dir-sets'
dir_sets=arg
end
end
# @todo: When implementing above, please make sure that running of: 'vagrant -f destroy' would be supported (no invalid option error is shown).
=end
# Vagrantfile API/syntax version.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/wily64"
config.vm.network "private_network", ip: "192.168.22.22"
config.vm.hostname = "vagrant"
config.vm.provision "shell", path: "scripts/provision.sh"
# :args => '--file-ea' + opt['--file-ea'].to_s + ' --dir-bt' + opt['--dir-bt'].to_s + ' --dir-sets' + opt['--dir-sets'].to_s # @todo
config.ssh.forward_agent = true # Enables agent forwarding over SSH connections.
config.ssh.forward_x11 = true # Enables X11 forwarding over SSH connections.
# config.ssh.pty = true # Use pty for provisioning. Could hang the script.
config.vm.synced_folder ".", "/vagrant", id: "core", nfs: true
config.vm.provider "virtualbox" do |v|
v.name = "mt-tester.local"
v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
v.memory = 4096
v.cpus = 2
end
config.vm.provider :aws do |aws, override|
aws.tags = {
'Name' => 'MT4',
}
aws.instance_type = "m3.medium"
aws.access_key_id = ENV['AWS_ACCESS_ID']
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_ID']
# aws.session_token = "SESSION TOKEN"
# aws.keypair_name = "KEYPAIR NAME"
# override.ssh.username = "ubuntu"
# override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
end
if Vagrant.has_plugin?("vagrant-timezone")
config.timezone.value = :host
end
end