Bonjour à tous,

J'aimerais monter un environnement de tests disponible via le net.
Pour cela j'ai un Serveur SoYouStart sur lequel j'aimerais monter un cluster avec les ip-failover disponibles sur mon serveur S-Y-S.
Pour créer mes serveurs j'utilise Vagrant et VirtualBox cependant je n'arrive pas a configurer mes VMs pour qu'elles soient accessibles via les ip-failovers de mon serveur physique

Si quelqu'un connait les commandes je suis preneur.

Merci par avance

Voici mon fichier vagrantFile en précisant que mon ip de serveur physique est : aa.bb.cc.12 et les ip xx.yy.zz.131, xx.yy.zz.132, xx.yy.zz.133, xx.yy.zz.134, xx.yy.zz.135 sont mes ipfailovers

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
49
50
51
52
53
Vagrant.configure(2) do |config|

  etcHosts = ""

        config.vm.box = "ubuntu/bionic64"
        config.vm.box_url = "ubuntu/bionic64"

        # set servers list and their parameters
        NODES = [
        { :hostname => "haproxy", :ip => "xx.yy.zz.131", :mac => "", :cpus => 1, :mem => 1024, :type => "haproxy" },
        { :hostname => "s1", :ip => "xx.yy.zz.133", :mac => "005056045080", :cpus => 2, :mem => 10240, :type => "kub" },
        { :hostname => "s2", :ip => "xx.yy.zz.134", :mac => "", :cpus => 2, :mem => 8192, :type => "kub" },
        { :hostname => "s3", :ip => "xx.yy.zz.135", :mac => "", :cpus => 2, :mem => 8192, :type => "kub" }
        ]

        # define /etc/hosts for all servers
  NODES.each do |node|
    if node[:type] != "haproxy"
        etcHosts += "echo '" + node[:ip] + "   " + node[:hostname] + "' >> /etc/hosts" + "\n"
                else
                        etcHosts += "echo '" + node[:ip] + "   " + node[:hostname] + " monclust.kub ' >> /etc/hosts" + "\n"
                end
  end #end NODES

# run installation
  NODES.each do |node|
    config.vm.define node[:hostname] do |cfg|
        cfg.vm.hostname = node[:hostname]
        if node[:mac] != ""
                cfg.vm.network "public_network", ip: node[:ip], mac: node[:mac]

                # default router
                config.vm.provision "shell",
                run: "always",
                inline: "route add default gw aa.bb.cc.254"

                # delete default gw on eth0
                config.vm.provision "shell",
                run: "always",
                inline: "eval `route -n | awk '{ if ($8 ==\"eth0\" && $2 != \"0.0.0.0\") print \"route del default gw \" $2; }'`"
        else
                cfg.vm.network "public_network", ip: node[:ip]
        end
        cfg.vm.provider "virtualbox" do |v|
                v.customize ["modifyvm", :id, "--cpus", node[:cpus] ]
                v.customize ["modifyvm", :id, "--memory", node[:mem] ]
                v.customize ["modifyvm", :id, "--name", node[:hostname] ]
        end #end provider

        #for all
      cfg.vm.provision :shell, :inline => etcHosts
    end # end config
  end # end nodes
J'ai l'erreur suivante sur le s1 : SIOCADDRT: Network is unreachable
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what