Add reverse-SSHFS-based file synchronization from Operator's machine 76/100376/1
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Thu, 16 Jan 2020 15:21:02 +0000 (16:21 +0100)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Thu, 16 Jan 2020 15:23:20 +0000 (16:23 +0100)
This patch also introduces (almost) empty directory to the repository as
a mountpoint for the synchronized files. Additional flag ("nonempty") is
passed upon mounting directory to ignore the sole file there
("operator/.gitignore").

Issue-ID: ONAPARC-551
Change-Id: I9187325a08cccb98b7335fcb320c2004ed26e7f3
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
bootstrap/vagrant-minimal-onap/Vagrantfile
bootstrap/vagrant-minimal-onap/operator/.gitignore [new file with mode: 0644]

index 1e66ad8..0e72b88 100644 (file)
@@ -196,6 +196,7 @@ Vagrant.configure('2') do |config|
 
       if machine[:name] == 'operator'
         config.vm.synced_folder ".", synced_folder_main, type: "rsync", rsync__exclude: "Vagrantfile"
+        config.vm.synced_folder "./operator", "/home/#{vagrant_user}", type: "sshfs", reverse: true, sshfs_opts_append: "-o nonempty"
 
         config.vm.provision "setup_debconf", type: :shell, inline: $setup_debconf
         config.vm.provision "link_apt_prefs", type: :shell, run: "always" do |s|
diff --git a/bootstrap/vagrant-minimal-onap/operator/.gitignore b/bootstrap/vagrant-minimal-onap/operator/.gitignore
new file mode 100644 (file)
index 0000000..260825b
--- /dev/null
@@ -0,0 +1,5 @@
+# This file is intended to store (almost) empty directory for reverse-SSHFS mount point
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore