forked from samber/grafana-flamegraph-panel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
48 lines (45 loc) · 1.71 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.box_check_update = false
config.vm.define :grafana_flamegraph do |grafana_flamegraph|
grafana_flamegraph.vm.network "private_network", ip: "172.16.2.77"
grafana_flamegraph.vm.host_name = "local-grafana-flamegraph-clickhouse-pro"
end
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
config.vm.provision "shell", inline: <<-SHELL
set -xeuo pipefail
sysctl net.ipv6.conf.all.forwarding=1
# docker
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8D81803C0EBFCD88
echo "deb https://download.docker.com/linux/ubuntu bionic edge" > /etc/apt/sources.list.d/docker.lst
# nodejs
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
echo 'deb https://deb.nodesource.com/node_10.x bionic main' > /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_10.x bionic main' >> /etc/apt/sources.list.d/nodesource.list
apt-get update
apt-get install -y nodejs
apt-get install -y docker.io
apt-get install -y python-pip
apt-get install -y htop ethtool mc
python -m pip install -U pip
pip install -U docker-compose
cd /vagrant/
npm install
npm run-script build
cd /vagrant/demo
docker-compose down
docker system prune -f
docker-compose up -d
SHELL
end