After deploying the NextGen Gateway as a virtual machine, it is strongly recommended to assign a unique hostname and configure the appropriate static IP address before proceeding with the K3s installation. This ensures reliable identification of the Gateway within your network and avoids potential hostname conflicts - especially in environments with multiple deployed nodes.

Updating the Hostname

To set a new hostname, use the following command:

opsramp-collector-start setup updatehostname --hostName <hostname>

Replace <new-hostname> with your desired hostname (e.g., opsramp-gateway).

Example Output:

opsramp-collector-start setup updatehostname gateway1

This command updates the hostname both at the system level and in the /etc/hosts file, ensuring consistency across network and local name resolution.

Next Steps:

  • Verify the hostname change using hostnamectl or cat /etc/hostname.

Updating the IP Address

To change your NextGen Gateway’s network configuration from a dynamic (DHCP) IP address to a static IP address, follow these steps:

  1. Log in to the Gateway
    Login to the NextGen Gateway using the gateway-admin user account.
  2. Identify Network Interface
    Run the following command to list network interfaces and identify the active interface name:
    ip addr
  3. Modify Netplan Configuration
    Navigate to the Netplan configuration directory:
    cd /etc/netplan
    Open the existing Netplan YAML file (e.g., 50-cloud-init.yaml) with a text editor such as vi or nano:
    sudo nano 50-cloud-init.yaml
  4. Update Configuration File
    Replace the existing content with the following template, updating placeholders with your network-specific details:
    network:
      ethernets:
        <InterfaceName>:
          addresses:
            - <IpAddr>/<NetMask>
          nameservers:
            addresses:
              - <DNSserver1>
              - <DNSserver2>
          routes:
            - to: 0.0.0.0/0
              via: <DefaultGateway>
      renderer: networkd
      version: 2
    Replace the placeholders as follows:
    • <InterfaceName>: Your network interface name (e.g., ens160)
    • <IpAddr>: The static IP address to assign (e.g., 172.25.249.111)
    • <NetMask>: The subnet mask in CIDR notation (e.g., 16 for 255.255.0.0)
    • <DefaultGateway>: Your network’s default gateway IP address (e.g., 172.25.0.1)
    • <DNSserver1>, <DNSserver2>: One or more DNS server IP addresses (e.g., 172.25.1.51, 8.8.8.8)
  5. Example Configuration
    network:
      ethernets:
        ens160:
          addresses:
            - 172.25.249.111/16
          nameservers:
            addresses:
              - 172.25.1.51
              - 8.8.8.8
          routes:
            - to: 0.0.0.0/0
              via: 172.25.0.1
      renderer: networkd
      version: 2
  6. Apply the Configuration
    Save the changes and exit the editor. Then, apply the new network settings with:
    sudo netplan apply
  7. Verify the Static IP
    Confirm the static IP configuration by running:
    ip addr show <InterfaceName>

    Replace <InterfaceName> with your actual interface name.