From dfa5569f9b60554077fd6f32e1b0b57f0e8e1e06 Mon Sep 17 00:00:00 2001 From: pierreozoux Date: Wed, 5 Nov 2014 12:43:16 +0000 Subject: [PATCH] Adds backup vm in Vagrant --- Vagrantfile | 23 +++++++++++ cloud-config | 6 +++ deploy/deploy.sh | 34 +++++++--------- deploy/onServer.sh | 3 ++ doc/deploying-a-server.md | 20 +++------ importers/backup-snapshot.sh | 48 ---------------------- scripts/backup-init.sh | 54 +++++++++---------------- scripts/setup.sh | 4 -- unit-files/backup@.service | 28 ++++++++++++- unit-files/static-git-importer@.service | 2 + unit-files/static-importer@.service | 2 + unit-files/wordpress-importer@.service | 1 + 12 files changed, 101 insertions(+), 124 deletions(-) delete mode 100755 importers/backup-snapshot.sh diff --git a/Vagrantfile b/Vagrantfile index 4bcc60a..b19b3c0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -24,6 +24,21 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box_version = ">= 308.0.1" config.vm.box_url = "http://%s.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json" % $update_channel + config.vm.define "backup" do |backup| + backup.vm.provider :virtualbox do |vb| + vb.memory = 512 + vb.cpus = 1 + vb.check_guest_additions = false + vb.functional_vboxsf = false + end + # plugin conflict + if Vagrant.has_plugin?("vagrant-vbguest") then + backup.vbguest.auto_update = false + end + backup.vm.hostname = "backup.dev" + backup.vm.network :private_network, ip: "192.168.65.100" + end + (1..$num_instances).each do |i| config.vm.define "core-#{i}" do |core| core.vm.provider :virtualbox do |vb| @@ -44,8 +59,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| core.vm.network :private_network, ip: "#{BASE_IP_ADDR}.#{i+1}" core.vm.synced_folder ".", "/data/indiehosters", id: "coreos-indiehosters", :nfs => true, :mount_options => ['nolock,vers=3,udp'] core.vm.provision :file, source: "./cloud-config", destination: "/tmp/vagrantfile-user-data" + $install_insecure_keys = <