Tag Archives: Static IP

OpenShift

How to deploy OpenShift 4.3 on VMware vSphere with Static IP addresses using Terraform

Install OpenShift 4.x on vSphere 6.x/7.x

The following procedure is intended to create VM’s from an OVA template booting with static IP’s when the DHCP server can not reserve the IP addresses.

The Problem

OCP requires that all DNS configurations be in place. VMware requires that the DHCP assign the correct IPs to the VM. Since many real installations require the coordination with different teams in an organization, many times we don’t have control of DNS, DHCP or Load balancer configurations.

The CoreOS documentation explain how to create configurations using ignition files. I created a python script to put the network configuration using the ignition files created by the openshift-install program.

Reference Architecture

For this guide, we are going to deploy 3 master nodes (control-plane) and 2 worker nodes (compute This guide uses RHEL CoreOS 4.3 as the virtual machine image, deploying Red Hat OCP 4.3, as per the support of N-1 from Red Hat.

We will use a centralised Linux server (Ubuntu) that will perform the following functions;

  • Load Balancer – HAProxy
  • Web Server – Apache2
  • Terraform automation host – version 0.11.14
    • The deployment will be semi-automated using Terraform, so that we can easily build configuration files used by the CoreOS VM’s that have Static IP settings.
    • Using a later version of Terraform will cause failures.
  • Client Tools for OpenShift deployment
    • OC
    • Kubectl
    • Openshift-install

DNS will be provided by a Windows Server.

The installation will use a Bootstrap server to bring the cluster online, which will be removed at the end of the build process.

OpenShift Deployment Arch Diagram

Deployment Steps

In this guide we will deploy our environment in the following order;

  • Configure DNS
  • Import Red Hat Core OS image into vCenter
  • Deploy Ubuntu Host
    • Configure Apache
    • Configure HAProxy
    • Install Client-Tools
    • Install Terraform
  • Build OpenShift Cluster configuration
  • Configuring the Terraform deployment
  • Running the Terraform deployment
DNS

Openshift uses a “clusterName.BaseDomain” format.

For example; I want to call my Openshift cluster Demo. And my DNS Domain is Simon.local, then my full format used by Openshift is “demo.simon.local”

Below is a table plan of the IP addresses you will use to build the environment.

The last three addresses are cluster level resources that are available on each control-plane node, accessible via the load balancer.

To configure the DNS records in Windows, you can use the Script and CSV file here

Deploy OpenShift VMware Static IP PowerShell Configure DNS Records

In the below screenshot, the script has created the “demo” domain folder and entered my records. It is important that you have PTR records setup for everything apart from the “etcd-X” records.

Deploy OpenShift VMware Static IP DNS Records Deploy OpenShift VMware Static IP DNS Records 2 Deploy OpenShift VMware Static IP DNS Records 3 Deploy OpenShift VMware Static IP Configure Reverse DNS Records

Import Red Hat CoreOS Image into vCenter

Continue reading How to deploy OpenShift 4.3 on VMware vSphere with Static IP addresses using Terraform

Veeam Header3

VeeamPN 2.1 – Configure static IP for Network Hub

Today I decided to deploy VeeamPN between two sites. This is a free VPN solution which is optimized for performance. Veeam produced this tool for their customers to be able to easily setup networking between their production site and DR site, so ensure continuity during a disaster or failover situation.

Below is a diagram of my basic setup.

  • Site A – runs the “Network Hub” role
  • Site B – runs the “Site Gateway” role

VeeamPN Site to Site

The issue

When I deployed the first OVA appliance, I realised there was no option for setting a static IP address. DHCP is a requirement to configure VeeamPN. However, when the OVA deployed and the initial configuration for Network Hub is selected, there is no static IP address settings available versus an OVA configured for the Site Gateway rule.

VeeamPN Network Hub Site Gateway

The Fix

The VeeamPN OVA is a stripped-down Ubuntu Linux image, which runs Netplan for the networking service.

I configured a static IP address the following way;

  1. Configure SSH access on the VeeamPN appliance via the management interface.
  2. Use WinSCP to connect to the appliance
  3. Browse to /etc/netplan/
  4. Edit the “01-netplan.yaml’ file and save (see below).
  5. SSH to the VeeamPN Appliance and run “sudo netplan apply” or “sudo netplan –debug apply” for troubleshooting
  6. Log back onto the management interface using the new IP address.

When you edit the YAML file, you will find that indentations are key (as with any YAML file).

To make life easier, I used this file found here that you can use as the baseline;

network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      addresses:
        - 10.10.10.2/24
      gateway4: 10.10.10.1
      nameservers:
          search: [mydomain, otherdomain]
          addresses: [10.10.10.1, 1.1.1.1]

VeeamPN Static IP Address Netplan YAML

VeeamPN Static IP Address sudo netplan debug apply

Regards

Dean