Openshift 4.3 Baremetal Installation

1.2k views Asked by At

1. What I've tried

I want to make ocp cluster (actually, single node-all in one) like this blog
link : openshift.com/blog/revamped-openshift-all-in-one-aio-for-labs-and-fun
and I also referred to official document : Installing bare metal

So, What I have tried is like this :

(I used VirtualBox to make four vm)
- 1 bastion
- 1 dns
- 1 master
- 1 bootstrap

These vm are in the same network.

First, I made ignition file to boot master and bootstrap node.
install-config.yaml that I used :

apiVersion: v1
baseDomain: hololy-local.com 
compute:
- hyperthreading: Enabled   
  name: worker
  replicas: 0 
controlPlane:
  hyperthreading: Enabled   
  name: master 
  replicas: 1 
metadata:
  name: test 
networking:
  clusterNetwork:
  - cidr: 10.128.0.0/14 
    hostPrefix: 23 
  networkType: OpenShiftSDN
  serviceNetwork: 
  - 172.30.0.0/16
platform:
  none: {} 
fips: false 
pullSecret: '{"auths": ...}' 
sshKey: 'ssh-ed25519 AAAA...' 

I only changed baseDomain, master's number of replica, pullSecret and sshKey.

After Making ignition files, I started to boot bootstrap node and master node with iso file.

bootstrap node was successfully installed, but problem happens master node.

2. Details

Before starting Master node installation, I have to set up dns. Because unlike bootstrap's installation, Master node requests domain info during installation.

ip address
dns : 192.168.56.114
master : 192.168.56.150

DNS Zone is like this :
enter image description here And I started to set up master node using this parameters.

coreos.inst.install_dev=sda 
coreos.inst.image_url=http://192.168.56.114/rhcos438.x86_64.raw.gz
coreos.inst.ignition_url=http://192.168.56.114/master.ign
ip=192.168.56.150::192.168.56.254:255.255.255.0:core0.hololy-local.com:enp0s3:none nameserver=192.168.56.114

Installation finished successfully, but when it boots without boot disk(.iso) Error comes out.

enter image description here It seems to trying to find master configuration file in api-int.aio.hololy-local.com:22623, and It connects ip address that I wrote in the zone file.

But strangely, The connection refused continuously.

Since I set the static ip when rhcos installation, so Ping test works successfully to 192.168.56.150.

I think 22623 port was blocked. But How can I open the port before OS boot?...

I don't know how to I solve it.

Thanks.

1

There are 1 answers

0
GRu. L On BEST ANSWER

I solved it.
The differences between installation of 3.11 and 4.x is whether LB's necessary. In 4.x LB is necessary. so you should set up LB.

In my situation, I set LB by nginx, and the sample is like this:

stream{
upstream ocp_k8s_api {
    #round-robin;
    server 192.168.56.201:6443; #bootstrap
    server 192.168.56.202:6443; #master1
    server 192.168.56.203:6443; #master2
    server 192.168.56.204:6443; #master3
}
server {
    listen 6443;

    proxy_pass ocp_k8s_api;
}

upstream ocp_m_config {
    #round-robin;
    server 192.168.56.201:22623; #bootstrap
    server 192.168.56.202:22623; #master1
    server 192.168.56.203:22623; #master2
    server 192.168.56.204:22623; #master3
}
server {
    listen 22623;

    proxy_pass ocp_m_config;
}

upstream ocp_http {
    #round-robin;
    server 192.168.56.205:80; #worker1
    server 192.168.56.206:80; #worker2
}
server{
    listen 80;
    proxy_pass ocp_http;
}

upstream ocp_https {
    #round-robin;
    server 192.168.56.205:443; #worker1
    server 192.168.56.206:443; #worker2
}
server{
    listen 443;
    proxy_pass ocp_https;
}
}

thanks.