Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
What to Upload to SlideShare
Loading in …3
×
1 of 24

Creating Vagrant development machines with MariaDB

0

Share

Download to read offline

How to create Vagrant development machines with MariaDB running on them. Best practices to follow to achieve production parity and code testability.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Creating Vagrant development machines with MariaDB

  1. 1. ● ●
  2. 2. ● ● ●
  3. 3. ● ○ ○ ● ○ ○ ○ ● ○ ○
  4. 4. ● ● ○
  5. 5. ● ○ ● ●
  6. 6. ● ● ● ● ● ● ● ● ●
  7. 7. ● ● ● ● ● ●
  8. 8. # -*- mode: ruby -*- # vi: set ft=ruby :
  9. 9. BOX = ENV["BOX"] || "ubuntu/bionic64" Vagrant.require_version ">= 2.2.14" Vagrant.configure("2") do |config| # set Vagrant options config.vm.box = BOX ... config.vm.provider "virtualbox" do |vb| # set provider-level options ... end config.vm.provider "vmware_fusion" config.vm.provision :shell, path: "bootstrap.sh" end
  10. 10. virtualbox config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "name", "lamp"] vb.customize ["modifyvm", :id, "--memory", 1024 * 4] vb.customize ["modifyvm", :id, "--cpuhotplug", "on"] vb.customize ["modifyvm", :id, "--cpus", "2"] vb.customize ["modifyvm", :id, "--vram", "4"] end
  11. 11. virtualbox config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "name", "lamp"] vb.customize ["modifyvm", :id, "--memory", 1024 * 4] vb.customize ["modifyvm", :id, "--cpuhotplug", "on"] vb.customize ["modifyvm", :id, "--cpus", "2"] vb.customize ["modifyvm", :id, "--vram", "4"] end
  12. 12. virtualbox
  13. 13. virtualbox config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "name", "lamp"] vb.customize ["modifyvm", :id, "--memory", 1024 * 4] vb.customize ["modifyvm", :id, "--cpuhotplug", "on"] vb.customize ["modifyvm", :id, "--cpus", "2"] vb.customize ["modifyvm", :id, "--vram", "4"] end
  14. 14. virtualbox config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "name", "lamp"] vb.customize ["modifyvm", :id, "--memory", 1024 * 4] vb.customize ["modifyvm", :id, "--cpuhotplug", "on"] vb.customize ["modifyvm", :id, "--cpus", "2"] vb.customize ["modifyvm", :id, "--vram", "4"] end VBoxManage modifyvm "VM name" --plugcpu 1 VBoxManage modifyvm "VM name" --unplugcpu 1
  15. 15. virtualbox config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "name", "lamp"] vb.customize ["modifyvm", :id, "--memory", 1024 * 4] vb.customize ["modifyvm", :id, "--cpuhotplug", "on"] vb.customize ["modifyvm", :id, "--cpus", "2"] vb.customize ["modifyvm", :id, "--vram", "4"] end
  16. 16. virtualbox config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "name", "lamp"] vb.customize ["modifyvm", :id, "--memory", 1024 * 4] vb.customize ["modifyvm", :id, "--cpuhotplug", "on"] vb.customize ["modifyvm", :id, "--cpus", "2"] vb.customize ["modifyvm", :id, "--vram", "4"] end
  17. 17. Vagrant.configure("2") do |config| ... config.vm.provision :shell, path: "bootstrap.sh" # OR config.vm.provision "ansible" do |ansible| ansible.playbook = "mariadb.yml" end end
  18. 18. - name: Upload my.cnf copy: src: ./files/my.cnf dest: /etc/mysql/conf.d/

×