21121: Charting from prometheus works, added more metrics
[arvados.git] / tools / salt-install / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3 # Copyright (C) The Arvados Authors. All rights reserved.
4 #
5 # SPDX-License-Identifier: AGPL-3.0
6
7 # Vagrantfile API/syntax version. Don"t touch unless you know what you"re doing!
8 VAGRANTFILE_API_VERSION = "2".freeze
9
10 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
11   config.ssh.insert_key = false
12   config.ssh.forward_x11 = true
13
14    # A single_host multiple_hostnames example
15    config.vm.define "arvados-sh-mn" do |arv|
16      arv.vm.box = "bento/debian-11"
17      arv.vm.hostname = "harpo"
18      # CPU/RAM
19      config.vm.provider :virtualbox do |v|
20        v.memory = 2048
21        v.cpus = 2
22      end
23
24      # Networking
25      # WEBUI PORT
26      arv.vm.network "forwarded_port", guest: 8443, host: 8443
27      # KEEPPROXY
28      arv.vm.network "forwarded_port", guest: 25101, host: 25101
29      # KEEPWEB
30      arv.vm.network "forwarded_port", guest: 9002, host: 9002
31      # WEBSOCKET
32      arv.vm.network "forwarded_port", guest: 8002, host: 8002
33      arv.vm.provision "shell",
34                       inline: "cp -vr /vagrant/config_examples/single_host/multiple_hostnames /home/vagrant/local_config_dir;
35                                cp -vr /vagrant/tests /home/vagrant/tests;
36                                sed 's#cluster_fixme_or_this_wont_work#harpo#g;
37                                     s#domain_fixme_or_this_wont_work#local#g;
38                                     s#CONTROLLER_EXT_SSL_PORT=443#CONTROLLER_EXT_SSL_PORT=8443#g;
39                                     s#RELEASE=\"production\"#RELEASE=\"development\"#g;
40                                     s/# VERSION=.*$/VERSION=\"latest\"/g;' \
41                                     /vagrant/local.params.example.single_host_multiple_hostnames > /tmp/local.params.single_host_multiple_hostnames"
42                                     # s/#\ BRANCH=\"main\"/\ BRANCH=\"main\"/g;' \
43
44      arv.vm.provision "shell",
45                       inline: "cp -vr /tmp/local.params.single_host_multiple_hostnames /tmp/local.params.single_host_multiple_hostnames.falla;
46                                cp -vr /vagrant/centos7-local.params.single_host_single_hostname-f258b604f831bb3bd7fab506c670b975ae8e4118 /tmp/local.params.single_host_multiple_hostnames"
47      arv.vm.provision "shell",
48                       path: "provision.sh",
49                       args: [
50                         # "--debug",
51                         "--config /tmp/local.params.single_host_multiple_hostnames",
52                         "--development",
53                         "--test",
54                         "--vagrant"
55                       ].join(" ")
56    end
57
58    # A single_host single_hostname example
59    config.vm.define "arvados-sh-sn" do |arv|
60      #arv.vm.box = "bento/centos-7"
61      arv.vm.box = "bento/ubuntu-20.04"
62      arv.vm.hostname = "zeppo"
63      # CPU/RAM
64      config.vm.provider :virtualbox do |v|
65        v.memory = 2048
66        v.cpus = 2
67      end
68  
69      # Networking
70      # WEBUI PORT
71      arv.vm.network "forwarded_port", guest: 443, host: 9443
72      # WORKBENCH1
73      arv.vm.network "forwarded_port", guest: 8805, host: 9444
74      # WORKBENCH2
75      arv.vm.network "forwarded_port", guest: 443, host: 9445
76      # KEEPPROXY
77      arv.vm.network "forwarded_port", guest: 8801, host: 35101
78      # KEEPWEB
79      arv.vm.network "forwarded_port", guest: 8802, host: 11002
80      # WEBSHELL
81      arv.vm.network "forwarded_port", guest: 8803, host: 14202
82      # WEBSOCKET
83      arv.vm.network "forwarded_port", guest: 8804, host: 18002
84      arv.vm.provision "shell",
85                       inline: "cp -vr /vagrant/config_examples/single_host/single_hostname /home/vagrant/local_config_dir;
86                                cp -vr /vagrant/tests /home/vagrant/tests;
87                                sed 's#cluster_fixme_or_this_wont_work#cnts7#g;
88                                     s#domain_fixme_or_this_wont_work#local#g;
89                                     s#HOSTNAME_EXT=\"hostname_ext_fixme_or_this_wont_work\"#HOSTNAME_EXT=\"cnts7.local\"#g;
90                                     s#IP_INT=\"ip_int_fixme_or_this_wont_work\"#IP_INT=\"127.0.0.1\"#g;
91                                     s#RELEASE=\"production\"#RELEASE=\"development\"#g;
92                                     s/# BRANCH=\"main\"/BRANCH=\"main\"/g;
93                                     s/# VERSION=.*$/VERSION=\"latest\"/g' \
94                                     /vagrant/local.params.example.single_host_single_hostname > /tmp/local.params.single_host_single_hostname"
95
96      arv.vm.provision "shell",
97                       path: "provision.sh",
98                       args: [
99                         "--debug",
100                         "--config /tmp/local.params.single_host_single_hostname",
101                         "--test",
102                         "--vagrant"
103                       ].join(" ")
104    end
105 end