forked from jayjanssen/vagrant-percona-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile.mysql57.rb
54 lines (43 loc) · 1.36 KB
/
Vagrantfile.mysql57.rb
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
require File.dirname(__FILE__) + '/lib/vagrant-common.rb'
mysql_version = "57"
name = "57-community"
Vagrant.configure("2") do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.hostname = name
config.vm.box = "perconajayj/centos-x86_64"
config.ssh.username = "root"
# Provisioners
provision_puppet( config, "mysql_server.pp" ) { |puppet|
puppet.facter = {
"enable_56" => 0,
"enable_57" => 1,
"innodb_buffer_pool_size" => "128M",
"innodb_log_file_size" => "64M"
}
}
# Providers
provider_virtualbox( name, config, 1024 ) { |vb, override|
# If we are using Virtualbox, override percona_server.pp with the right device for the datadir
provision_puppet( override, "mysql_server.pp" ) {|puppet|
puppet.facter = {"datadir_dev" => "dm-2"}
}
}
provider_aws( name, config, 'm1.small') { |aws, override|
# For AWS, we want to map the proper device for this instance type
aws.block_device_mapping = [
{
'DeviceName' => "/dev/sdb",
'VirtualName' => "ephemeral0"
}
]
# Also override the percona_server.pp manifest with the right datadir device
provision_puppet( override, "mysql_server.pp" ) {|puppet|
puppet.facter = {
'datadir_dev' => 'xvdb',
'innodb_buffer_pool_size' => '1G'
}
}
}
end