Skip to content

Commit 4838604

Browse files
committed
Adding instructions for restricted network setup
1 parent 9911893 commit 4838604

File tree

2 files changed

+63
-4
lines changed

2 files changed

+63
-4
lines changed

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# OpenShift 4 UPI Home Lab Installation
22

3-
I followed these steps to build out my OpenShift 4 UPI home lab using Red Hat Enterprise Virtualization (RHEV) virtual machines. Refer to the official documentation for a [bare metal installation]
3+
I followed these steps to build out my OpenShift 4 UPI home lab using Red Hat Enterprise Virtualization (RHEV) virtual machines. Refer to the official documentation for a [bare metal installation].
4+
5+
For a restricted network setup using a mirror Docker repository, follow the additional steps denoted by **[Restricted Network]**.
46

57
## Architecture
68
* 1 helper node (RHEL7, 4 vCPU, 4 GB RAM, 30 GB disk)
@@ -14,6 +16,11 @@ I followed these steps to build out my OpenShift 4 UPI home lab using Red Hat En
1416

1517
I followed instructions from this [Git repository] to build out a UPI helper node. This allowed me to satisfy load balancing, DHCP, PXE, DNS, and HTTPD requirements. I ran `nmcli device show` from the helper node to populate the DHCP section of vars.yaml since the helper node will function as DNS/DHCP for the cluster. At this time, don't run the helper node configuration playbook yet.
1618

19+
**[Restricted Network]** - Add mirror repository to DNS
20+
21+
Add the mirror repository to the DNS entries on your authoritative helper node. Using the above UPI helper node Git repository, I added DNS entries to the following files: `/var/named/zonefile.db` and `/var/named/reverse.db`
22+
23+
1724
### 2. Bare metal installation
1825

1926
I continued with the bare metal installation, following the steps in the [documentation]
@@ -23,11 +30,21 @@ I continued with the bare metal installation, following the steps in the [docume
2330
* Installing the OpenShift Command-line Interface
2431
* Manually creating the installation configuration file
2532
* To get started, an example has been placed in the save directory and can be used with the following command: `cp save/install-config-example.yaml save/install-config.yaml`
33+
* **[Restricted Network]** Use this example instead of the above: `cp save/install-config-restricted-example.yaml save/install-config.yaml`
2634
* Replace the contents of `save/install-config.yaml` with your custom configuration
2735

2836
### 3. Create virtual machines
2937

38+
#### 3a. **[Restricted Network]** - Set up restricted network
39+
* Set up networking on hypervisor - For a restricted network cluster, you will need to configure a separate network, vNIC profile, and VLAN tag on your hypervisor. This configuration is beyond the scope of this repository.
40+
* Configure the bastion, bootstrap, masters, and compute nodes to use the network interface for the restricted network configured above. You can use a `192.168.x.0/24` subnet for this.
41+
* Follow the official documentation to [install a mirror repository] or refer to this repository to [install Sonatype Nexus as a mirror Docker repository].
42+
* Configure your mirror repository with two network interface, one for the restricted network and one with access to [Red Hat's public sites].
43+
44+
#### 3b. Continue creating virtual machines
45+
3046
For this step, "Creating Red Hat Enterprise Linux CoreOS (RHCOS) machines using an ISO image", I proceeded as follows.
47+
3148
* In RHEV, I created the VMs for the bootstrap, control plane, and compute nodes.
3249
* For disks, I used Preallocated for the masters and Thin Provisioning for the bootstrap and compute nodes. The etcd database on masters is I/O intensive and thus Preallocated is recommended.
3350
* While creating the VMs booted from CD-ROM using a downloaded version of this ISO locally hosted in RHEV:
@@ -91,9 +108,9 @@ To verify installation, I ran this helper script: `./complete-install.sh`
91108

92109
Refer to this documentation for [post installation procedures (day 2)].
93110

94-
## [Restricted Network] - Update Cluster with Mirror Repository
111+
## **[Restricted Network]** - Update Minor Version in Cluster with Mirror Repository
95112

96-
Refer to this documentation for [updating a cluster in a restricted network].
113+
Refer to this documentation for [updating the minor version in a cluster in a restricted network].
97114

98115
## License
99116
GPLv3
@@ -104,5 +121,8 @@ Kevin Chung
104121
[bare metal installation]: https://cloud.redhat.com/openshift/install/metal/user-provisioned
105122
[Git repository]: https://github.com/RedHatOfficial/ocp4-helpernode
106123
[documentation]: https://docs.openshift.com/container-platform/latest/installing/installing_bare_metal/installing-bare-metal.html#ssh-agent-using_installing-bare-metal
124+
[Red Hat's public sites]: https://docs.openshift.com/container-platform/latest/installing/install_config/configuring-firewall.html
125+
[install a mirror repository]: https://docs.openshift.com/container-platform/4.4/installing/install_config/installing-restricted-networks-preparations.html#installation-creating-mirror-registry_installing-restricted-networks-preparations
126+
[install Sonatype Nexus as a mirror repository]: https://github.com/kevchu3/nexus-docker-repo
107127
[post installation procedures (day 2)]: day-two.md
108-
[updating a cluster in a restricted network]: update-restricted.md
128+
[updating the minor version in a cluster in a restricted network]]: update-restricted.md
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: v1
2+
baseDomain: example2.com
3+
compute:
4+
- hyperthreading: Enabled
5+
name: worker
6+
replicas: 0
7+
controlPlane:
8+
hyperthreading: Enabled
9+
name: master
10+
replicas: 3
11+
metadata:
12+
name: ocp4
13+
networking:
14+
clusterNetworks:
15+
- cidr: 10.254.0.0/16
16+
hostPrefix: 24
17+
networkType: OpenShiftSDN
18+
serviceNetwork:
19+
- 172.30.0.0/16
20+
platform:
21+
none: {}
22+
fips: false
23+
pullSecret: '{"auths": ...}'
24+
sshKey: 'ssh-ed25519 AAAA...'
25+
additionalTrustBundle: |
26+
-----BEGIN CERTIFICATE-----
27+
<insert your cert here>
28+
-----END CERTIFICATE-----
29+
imageContentSources:
30+
- mirrors:
31+
- <your-mirror-registry>:<port>/ocp-release
32+
source: quay.io/openshift-release-dev/ocp-release
33+
- mirrors:
34+
- <your-mirror-registry>:<port>/ocp-release
35+
source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
36+
- mirrors:
37+
- <your-mirror-registry>:<port>/ocp-release
38+
source: registry.svc.ci.openshift.org/ocp/release
39+

0 commit comments

Comments
 (0)