diff options
author | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2019-12-17 15:33:06 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2020-01-07 13:01:26 +0000 |
commit | 09a635790188dd59af2e3cc7612c76afac1bfd53 (patch) | |
tree | 750896a270ad66b29390d6439e6ddb6cb44d54ae | |
parent | cc7624d37643a96222e7c0777a625b72623c3d46 (diff) |
Add Vagrant environment for Hound code search
This patch adds build dependencies and builds Hound binaries.
Issue-ID: ONAPARC-540
Change-Id: I37b263b3e0c93a9ec08458ec2e08edd75b33d7b4
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
-rw-r--r-- | bootstrap/codesearch/Vagrantfile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap/codesearch/Vagrantfile b/bootstrap/codesearch/Vagrantfile new file mode 100644 index 000000000..a94b95cbf --- /dev/null +++ b/bootstrap/codesearch/Vagrantfile @@ -0,0 +1,24 @@ +# -*- mode: ruby -*- +# -*- coding: utf-8 -*- + +host_ip = "192.168.121.1" + +$replace_dns = <<-SCRIPT + HOST_IP="$1" + rm -f /etc/resolv.conf # drop its dynamic management by systemd-resolved + echo nameserver "$HOST_IP" | tee /etc/resolv.conf +SCRIPT + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu1804" + config.vm.provision "replace_dns", type: :shell, run: "always", inline: $replace_dns, args: host_ip + config.vm.provision "dependencies", type: :shell, inline: <<-SHELL + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install --assume-yes --quiet golang + SHELL + config.vm.provision "binaries", type: :shell, privileged: false, inline: <<-SHELL + export GOPATH="${HOME}/go" + go get -u github.com/hound-search/hound/cmds/... + SHELL +end |