Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: MicroOS: Configure static network IP via combustion?

  1. #1

    Default MicroOS: Configure static network IP via combustion?

    I've been trying to set up a static IP address for MicroOS (Tumbleweed) via either combustion or ignition. Documentation for Wifi setup (https://en.opensuse.org/Portal:MicroOS/WifiSetup) kind of suggested, that this could be done via ifcfg-* files but after two days of trying all kinds of different things, I came to realize that this isn't working; at least, it isn't working with Tumbleweed.

    Right now, I ended up with creating an appropriate *-nmconnection file under /etc/NetworkManager/system-connections. This gets me the desired result iff the system is rebooted at the end of the combustion run. Before that, I still get the IP address assigned via DHCP (I am using combustion: network because I am installing some packages). Unfortunately, things like systemctl reboot do not seem to work as part of the combustion run either.


    • Is this the right way to assign a static IP address to the interface in an automated way? If not, what's the right way to do this?
    • If this is correct, how do I get the system to pick up the changes from my nmconnection file at the end of the combustion run?

  2. #2
    Join Date
    Sep 2012
    Posts
    7,859

    Default Re: MicroOS: Configure static network IP via combustion?

    Quote Originally Posted by docbobo View Post
    Is this the right way to assign a static IP address to the interface in an automated way?
    Wicked is being deprecated and NeworkManager should be default on Tumbleweed now. Your description agrees with this information.
    If this is correct, how do I get the system to pick up the changes from my nmconnection file at the end of the combustion run?
    Did you try to simply restart NetworkManager?

  3. #3

    Default Re: MicroOS: Configure static network IP via combustion?

    Quote Originally Posted by arvidjaar View Post
    Wicked is being deprecated and NeworkManager should be default on Tumbleweed now. Your description agrees with this information.

    Did you try to simply restart NetworkManager?
    Yes, I tried that as well. There are a few problems with that, though.


    1. Even manually running that command does not yield the correct result. Why? Because there is now an additional nmconnection file under /run/NetworkManager/system-connections which is being preferred. What works is removing that file, then running nmcli con reload
    2. Running systemctl restart NetworkManager from combustion results in Running in chroot, ignoring request.
    3. Deleting anything from /run/NetworkManager/system-connections or /var/run/NetworkManager/system-connections will somehow break the boot process, complaining about a corrupt filesysttem
    4. Running nmcli from combustion also doesn't work and produces errors as well: Could not create NMClient object: Could not connect: No such file or directory.

  4. #4

    Default Re: MicroOS: Configure static network IP via combustion?

    Okay. So when using "combustion: network", it seems the best way to configure the static IP of the machine would be via kernel parameters. A combination work ignition and combustion seems to produce the correct result:

    Code:
    {
      "ignition": {
        "version": "3.3.0"
      },
      "kernelArguments": {
        "shouldExist": [
          "ip=10.0.0.111::10.0.0.1:255.255.255.0:k3s-server-temp:enp6s18:on:10.0.0.1"
        ]
      }
    }
    This ignition file will re-configure the kernel to provide an additional cmdline parameter, then restart the system. Upon restart, it will have the correct IP address and will run the combustion script...

  5. #5
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    33,250
    Blog Entries
    15

    Default Re: MicroOS: Configure static network IP via combustion?

    Hi
    A question, this is a baremetal install of MicroOS? I do use MicroOS/TW and k3s clusters but with vagrant/libvirt.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6

    Default Re: MicroOS: Configure static network IP via combustion?

    This is on Proxmox, so basically libvirt, I guess.

  7. #7
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    33,250
    Blog Entries
    15

    Default Re: MicroOS: Configure static network IP via combustion?

    Quote Originally Posted by docbobo View Post
    This is on Proxmox, so basically libvirt, I guess.
    Hi
    Hmmm, so with vagrant I set the ip address, either private or physical, you can't do that with Proxmox? FWIW, my MicroOS systems are all running wicked, only things I configure are ssh keys/access, a k3s server token and some sysctl config.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8

    Default Re: MicroOS: Configure static network IP via combustion?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Hmmm, so with vagrant I set the ip address, either private or physical, you can't do that with Proxmox? FWIW, my MicroOS systems are all running wicked, only things I configure are ssh keys/access, a k3s server token and some sysctl config.
    Theoretically, I could provide the IP address via my DHCP servers. I suspect vagrant is doing something similar. To be honest, I didn't want to do that because I'd like the cluster to start up properly independent of the existence of a DHCP server. But looking at how complicated something so simple turned out to be, I am tempted to change my mind on that one.

  9. #9
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    33,250
    Blog Entries
    15

    Default Re: MicroOS: Configure static network IP via combustion?

    Quote Originally Posted by docbobo View Post
    Theoretically, I could provide the IP address via my DHCP servers. I suspect vagrant is doing something similar. To be honest, I didn't want to do that because I'd like the cluster to start up properly independent of the existence of a DHCP server. But looking at how complicated something so simple turned out to be, I am tempted to change my mind on that one.
    Hi
    All mine are static ip's.

    Code:
    # Use libvirt for the provider
    ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
    
    
    # Configure the nodes
    cluster_nodes = [
       { :host => "node-4",
         :type => "master",
         :box => "opensuse/MicroOS.x86_64",
         :ip => "192.168.10.180",
         :cpu => 2,
         :ram => 2048
       },
    #   { :host => "node-5",
    #     :type => "node",
    #     :box => "opensuse/MicroOS.x86_64",
    #     :ip => "192.168.10.181",
    #     :cpu => 2,
    #     :ram => 2048
    #   },
    #   { :host => "node-6",
    #     :type => "node",
    #     :box => "opensuse/MicroOS.x86_64",
    #     :ip => "192.168.10.182",
    #     :cpu => 2,
    #     :ram => 2048
    #   },
       { :host => "worker-4",
         :type => "worker",
         :box => "opensuse/MicroOS.x86_64",
         :ip => "192.168.10.183",
         :cpu => 1,
         :ram => 1024
       },
       { :host => "worker-5",
         :type => "worker",
         :box => "opensuse/MicroOS.x86_64",
         :ip => "192.168.10.184",
         :cpu => 1,
         :ram => 1024
       },
    #   { :host => "worker-6",
    #     :type => "worker",
    #     :box => "opensuse/MicroOS.x86_64",
    #     :ip => "192.168.10.185",
    #     :cpu => 1,
    #     :ram => 1024
    #   },
    ]
    
    
    # Configure the domain to use
    varDomain = "homelinux.org"
    
    
    # Bring up the node loop
    Vagrant.configure("2") do |config|
    
    
       # The 'config' loop for all nodes in the cluster
       config.vm.provision "file", source: "/data/vagrant/MicroOS1/K3s_hosts", destination: "/tmp/k3s_hosts"
       config.vm.synced_folder ".", "/vagrant", disabled: true
       # Setup the timezone
       config.vm.provision "shell", inline: "timedatectl set-timezone America/Chicago"
       # The main cluster node loop
       cluster_nodes.each do |node|
    
    
          # The per node 'config' loop
          config.vm.define node[:host] do |node_config|
    
    
             # Setup the node distribution and network
             node_config.vm.box = node[:box]
             node_config.vm.network "public_network", :dev => "eth3", ip: node[:ip], :netmask => "255.255.255.0"
             node_config.vm.hostname = "#{node[:host]}.#{varDomain}"
             # The node specific configuration loop based on type
             if node[:type] == "master"
                node_config.vm.provision "shell", inline: <<-SHELL
                echo "Configure Master..."
                cat /tmp/k3s_hosts >> /etc/hosts
                #curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc
                #chmod 0755 /usr/local/bin/mc
                NODE_NAME=`hostnamectl --transient`
                NODE_IP=$(grep `hostnamectl --transient` /etc/hosts | awk '{print $1}' | tail -n1)
                curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --cluster-init \
                --node-ip $NODE_IP --node-external-ip $NODE_IP" \
                K3S_TOKEN_FILE=/etc/rancher/k3s/node-token-seed \
                K3S_NODE_NAME=$NODE_NAME sh -s -
                SHELL
             end
             if node[:type] == "node"
                node_config.vm.provision "shell", inline: <<-SHELL
                echo "Configure Node..."
                cat /tmp/k3s_hosts >> /etc/hosts
                curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc
                chmod 0755 /usr/local/bin/mc
                NODE_NAME=`hostnamectl --transient`
                NODE_IP=$(grep `hostnamectl --transient` /etc/hosts | awk '{print $1}' | tail -n1)
                curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --server \
                https://node-4:6443 --node-ip $NODE_IP --node-external-ip $NODE_IP" \
                K3S_TOKEN_FILE=/etc/rancher/k3s/node-token-seed K3S_NODE_NAME=$NODE_NAME sh -
                SHELL
             end
             if node[:type] == "worker"
                node_config.vm.provision "shell", inline: <<-SHELL
                echo "Configure Worker..."
                cat /tmp/k3s_hosts >> /etc/hosts
                NODE_NAME=`hostnamectl --transient`
                NODE_IP=$(grep `hostnamectl --transient` /etc/hosts | awk '{print $1}' | tail -n1)
                curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--node-ip $NODE_IP --node-external-ip $NODE_IP" \
                K3S_URL="https://node-4:6443" \
                K3S_TOKEN_FILE=/etc/rancher/k3s/node-token-seed K3S_NODE_NAME=$NODE_NAME sh -
                SHELL
             end
    
    
             # The node libvirt provisioning loop
             node_config.vm.provider :libvirt do |libvirt|
                libvirt.cpus = "#{node[:cpu]}"
                libvirt.memory = "#{node[:ram]}"
                # Add ignition iso to set root password, ssh key, ssh options and node-token-seed
                libvirt.storage :file, :device => :cdrom, :path => '/data/vagrant/MicroOS1/ignition.iso'
             end
    
    
          end
    
    
       end
    
    
    end
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #10

    Default Re: MicroOS: Configure static network IP via combustion?

    Well, I don't believe that vagrant is using either ignition or combustion. My question is really about: how to use the supposed mechanisms to provision the instances with a static ip address instead of DHCP...

    But thank you anyway!

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •