We'll be working on the Servers that are surrounded by the continous lines in this drawing:
The HTTPD Setup for this setup is only for sharing installer required files, meaning I'll barely use any features and leave the default config in place for most things.
First, install httpd:
[archy@helper01 ~]$ sudo dnf -4y --refresh install httpd
Now, let's edit the httpd config and change the default ports since they're already in use by HAProxy for the 'http-ingress' and 'https-ingress' services:
[archy@helper01 ~]$ sudo sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf
[archy@helper01 ~]$ sudo sed -i 's/Listen 443/Listen 8443/g' /etc/httpd/conf/httpd.conf
Also, edit the dummy ssl config to listen on Port 10443 to ensure there are no conflics with port bindings on reboots:
[archy@helper01 ~]$ sudo sed -i 's/Listen 443/Listen 10443/g' /etc/httpd/conf.d/ssl.conf
Using Port 10443/tcp will also require adding the 'http_port_t' label to it using SELinux:
[archy@helper01 ~]$ sudo semanage port -a -t http_port_t -p tcp 10443
I'll also be using NFS as the backing storage for the installer files as this will allow me to have the same shared storage on both helper nodes. In order to make that work with SELinux, we'll have set the boolean 'httpd_use_nfs' to true:
[archy@helper01 ~]$ sudo setsebool -P httpd_use_nfs 1
Since httpd is now prepared to use nfs, let's configure the mount:
[archy@helper01 ~]$ sudo mkdir -p -m 755 /var/www/html/okd4
[archy@helper01 ~]$ sudo chown apache:apache /var/www/html/okd4
[archy@helper01 ~]$ sudo vim /etc/fstab
Add the following line to the end of /etc/fstab:
strgnas01.archyslife.lan:/volume1/openshift-installer /var/www/html/okd4 nfs rw,vers=4.1,sec=sys,soft,relatime,namlen=255,timeo=30,retry=3,retrans=3,proto=tcp,_netdev 0 0
[archy@helper01 ~]$ sudo systemctl daemon-reload
[archy@helper01 ~]$ sudo mount -a
Now we can go ahead and restart httpd.service:
[archy@helper01 ~]$ sudo systemctl enable --now httpd.service
Apache will now use the nfs as backing storage for files required by the installer and we can continue to the next part.
Feel free to commend and / or suggest a topic.
Comments
Post a Comment