Skip to content

Commit 01dc521

Browse files
committed
Minor updates
1 parent 5b6c573 commit 01dc521

File tree

7 files changed

+82
-13
lines changed

7 files changed

+82
-13
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
# OCP4 on VMware vSphere UPI Automation
22

3-
The goal of this repo is to make deploying and redeploying a new Openshift v4 cluster a snap. The document looks long but after you have used it till end once, you will appreciate how quickly VMs come up in vCenter for you to start working with.
3+
The goal of this repo is to make deploying and redeploying a new Openshift v4 cluster a snap. The document looks long but after you have used it till the end once, you will appreciate how quickly VMs come up in vCenter for you to start working with.
44

55
Using the same repo and with minor tweaks, it can be applied to any version of Openshift higher than the current version of 4.2.
66

77
## Prerequisites
88

99
1. vSphere ESXi and vCenter 6.7 installed
10-
2. A datacenter created with vSphere host added to it
10+
2. A datacenter created with a vSphere host added to it
1111
3. **VM and Template folder** created with the same name as the **Openshift cluster name** you would like to use, as described in the [documentation](https://docs.openshift.com/container-platform/4.2/installing/installing_vsphere/installing-vsphere.html#installation-vsphere-machines_installing-vsphere)
1212
4. The OVF template deployed in the ***same folder*** from the OVA file [located here](https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.2/latest/rhcos-4.2.0-x86_64-vmware.ova) using instructions from **#6** step of the same documentation as in the previous step. Once deployed, on the template name, right-click and select **Edit Settings** and do the following:
13-
* Under `Virtual Hardware` 🠮 `Network adapter 1` 🠮 Highlight and delete it by clicking on the x symbol on the right. ***This is an important step if you would like to use the mac addresses as defined in the file***
14-
* Under the `VM Options` 🠮 `Advanced` 🠮 Latency Sensitivity; set it to **High**
15-
* Under the `VM Options` 🠮 `Advanced` 🠮 `Configuration Parameters` 🠮 Edit Configuration; add the following param (name, value) respectively:
13+
* Under `Virtual Hardware` 🠮 `Network adapter 1` 🠮 Highlight and delete it by clicking on the `x` symbol on the right. ***This is an important step if you would like to use the mac addresses as defined in the file***
14+
* Under the `VM Options` 🠮 `Advanced` 🠮 `Latency Sensitivity`; set it to **High**
15+
* Under the `VM Options` 🠮 `Advanced` 🠮 `Configuration Parameters` 🠮 `Edit Configuration`; add the following param (name, value) respectively:
1616
1. `disk.EnableUUID`, TRUE
1717
2. `guestinfo.ignition.config.data.encoding`, base64
1818
3. `guestinfo.ignition.config.data`, blah
1919
* Save the template
2020
5. Ideally have [helper node](https://github.com/christianh814/ocp4-upi-helpernode) running in the same network to provide all the necessary services such as [DHCP/DNS/HAProxy as LB/FTP Server]
21-
6. Ansible 2.8.5 installed on the machine where this repo is cloned
21+
6. Ansible 2.8.5 installed on the machine where this repo is cloned
22+
* For this specific version of Ansible you can run the command `sudo dnf -y install ansible-2.8.5`
2223

2324
## Automatic generation of ignition and other supporting files
2425

2526
### Prerequisites
2627

2728
1. Get the ***pull secret*** from [here](https://cloud.redhat.com/openshift/install/vsphere/user-provisioned)
28-
2. Generate a ssh key pair as per [instructions](https://docs.openshift.com/container-platform/4.2/installing/installing_vsphere/installing-vsphere.html#ssh-agent-using_installing-vsphere). The private key will then be used to log into bootstrap/master and worker nodes
29-
3. Get the vcenter details:
29+
2. Generate a SSH key pair as per [instructions](https://docs.openshift.com/container-platform/4.2/installing/installing_vsphere/installing-vsphere.html#ssh-agent-using_installing-vsphere). The private key will then be used to log into bootstrap/master and worker nodes
30+
3. Get the vCenter details:
3031
1. IP Address
3132
2. Username
3233
3. Password
@@ -102,7 +103,7 @@ In vCenter all VMs (bootstrap, master0-2, worker0-2) generated in the designated
102103
103104
In vCenter click on the ESXi Host (IP address) 🠮 Click on VMs tab 🠮 Cntrl-select all of the 7 machines 🠮 Right-click and choose Power 🠮 Power On
104105

105-
If everything goes well you should be able to log into all of the machines (from the machine which has the private key of the ssh key pair that was generated) using the private key generated in prerequistes. On **bootstrap** node running the following command will help understand if the masters are (being) setup:
106+
If everything goes well you should be able to log into all of the machines (from the machine which has the private key of the SSH key pair that was generated) using the private key generated in prerequistes. On **bootstrap** node running the following command will help understand if the masters are (being) setup:
106107

107108
```sh
108109
journalctl -b -f -u bootkube.service

extras/1-nfs-storage-class.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
kind: StorageClass
2+
apiVersion: storage.k8s.io/v1
3+
metadata:
4+
name: nfs
5+
provisioner: kubernetes.io/no-provisioner
6+
reclaimPolicy: Delete
7+
volumeBindingMode: WaitForFirstConsumer
8+

extras/2-nfs-pv.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: PersistentVolume
3+
metadata:
4+
name: nfs-pv
5+
spec:
6+
capacity:
7+
storage: 100Gi
8+
accessModes:
9+
- ReadWriteMany
10+
persistentVolumeReclaimPolicy: Recycle
11+
storageClassName: nfs
12+
nfs:
13+
path: /export
14+
server: 192.168.86.180
15+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
kind: PersistentVolumeClaim
2+
apiVersion: v1
3+
metadata:
4+
name: image-registry-storage
5+
namespace: openshift-image-registry
6+
spec:
7+
accessModes:
8+
- ReadWriteMany
9+
resources:
10+
requests:
11+
storage: 100Gi
12+
storageClassName: nfs
13+
volumeMode: Filesystem

extras/openshift-logging.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: logging.openshift.io/v1
2+
kind: ClusterLogging
3+
metadata:
4+
name: instance
5+
namespace: openshift-logging
6+
spec:
7+
managementState: Managed
8+
logStore:
9+
type: elasticsearch
10+
elasticsearch:
11+
nodeCount: 3
12+
redundancyPolicy: SingleRedundancy
13+
resources:
14+
limits:
15+
cpu:
16+
memory: 8Gi
17+
storage:
18+
storageClassName: thin
19+
size: 200G
20+
visualization:
21+
type: kibana
22+
kibana:
23+
replicas: 1
24+
curation:
25+
type: curator
26+
curator:
27+
schedule: 0 1 * * *
28+
collection:
29+
logs:
30+
type: fluentd
31+
fluentd: {}
32+

setup-vcenter-vms.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
masterContent : "{{ lookup('file', '{{ playbook_dir }}/install-dir/master.64') }}"
66
workerContent : "{{ lookup('file', '{{ playbook_dir }}/install-dir/worker.64') }}"
77
templateName : rhcos-4.2.0-x86_64-vmware
8-
folder : "/dc/vm/ocp4"
9-
datastore: "datastore1"
8+
folder : "/{{ vcenter.datacenter }}/vm/{{ config.clusterName }}"
9+
datastore: "{{ vcenter.datastore }}"
1010
tasks:
1111
- name: "Bootstrap base64"
1212
debug:

vars.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ vcenter:
1313
password: Password123!
1414
datacenter: dc
1515
download:
16-
oc_client: "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux-4.2.0.tar.gz"
17-
openshift_install: "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-install-linux-4.2.0.tar.gz"
16+
oc_client: "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux-4.2.9.tar.gz"
17+
openshift_install: "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-install-linux-4.2.9.tar.gz"

0 commit comments

Comments
 (0)