forked from dbfit/dbfit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
78 lines (67 loc) · 2.29 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
70
71
72
73
74
75
76
77
# -*- mode: ruby -*-
# vi: set ft=ruby :
require_relative 'vagrant_config_helper'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", CONFIG['memory']]
end
config.newdisk.path = CONFIG['additional_disk1_file']
config.newdisk.size = CONFIG['additional_disk1_size']
config.omnibus.chef_version = :latest
config.vbguest.auto_update = true
config.vm.box = "centos/7"
config.vm.box_url = "centos/7"
config.vm.host_name = "dbfitvm"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.network "forwarded_port", guest: 8085, host: 8085
config.vm.synced_folder "..", "/var/dbfit", CONFIG['synced_folder_options']
config.vm.provision :chef_solo do |chef|
chef.add_recipe "dbfit_test"
chef.json = {
"mysql" => {
"server_root_password" => "password",
"server_repl_password" => "password",
"server_debian_password" => "password",
"bind_address" => "127.0.0.1",
"version" => "5.7"
},
"postgresql" => {
"password" => {
"postgres" => "postgres"
},
"version" => "9.6",
"enable_pgdg_yum" => true,
"pgdg" => {
"repo_rpm_url" => {'9.6' => {'centos' => {'7' => {'x86_64' => {
'url' => 'http://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/',
'package' => 'pgdg-centos96-9.6-3.noarch.rpm'
}}}}}
},
"server" => {
"packages" => ["postgresql96-server"],
"service_name" => "postgresql-9.6"
},
"client" => {
"packages" => ["postgresql96", "postgresql96-devel"]
},
"setup_script" => "postgresql96-setup"
},
"java" => {
"install_flavor" => "oracle",
"jdk_version" => "8",
"oracle" => {
"accept_oracle_download_terms" => true
}
},
"git" => {
"version" => "2.11.0",
"url" => "https://www.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz",
"checksum" => "d3be9961c799562565f158ce5b836e2b90f38502d3992a115dfb653d7825fd7e"
},
"run_list" => ["recipe[dbfit_test]"]
}
DbFit.apply_custom_config(:chef, chef)
end
DbFit.apply_custom_config(:vagrant, config)
end