---
# System prepended metadata

title: Untitled

---


### install-config.yaml

```
apiVersion: v1
baseDomain: example.com
proxy:
  httpProxy: http://<username>:<pswd>@<ip>:<port>
  httpsProxy: http://<username>:<pswd>@<ip>:<port>
  noProxy: example.com
additionalTrustBundle: | 
    -----BEGIN CERTIFICATE-----
    <MY_TRUSTED_CA_CERT>
    -----END CERTIFICATE-----
compute:
- hyperthreading: Enabled
  name: worker
  replicas: 0
controlPlane:
  hyperthreading: Enabled
  name: master
  replicas: 3
metadata:
  name: ocp4
platform:
  vsphere:
    vcenter: 
    username: 
    password: 
    datacenter: 
    defaultDatastore: 
pullSecret: ''
sshKey: ''
```

### commands

```
./openshift-install create manifests --dir=ocppoc
```

```
openshift-install create ignition-configs --dir=ocppoc
```

##### Copy Ignition Configs to HTTP

```
sudo mkdir -p /var/www/html/ocp4
sudo chmod -R a+r+x /var/www/html/ocp4
sudo cp ocppoc/*.ign /var/www/html/ocp4/
```

##### Create httpd directory structure for append igitions
```
sudo mkdir -p /var/www/html/ocp4/bios
sudo mkdir -p /var/www/html/ocp4/append
sudo chmod -R a+r+x /var/www/html/ocp4
```

##### Add baremetal bios image to bios directory
```
curl https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.2/4.2.18/rhcos-4.2.18-x86_64-metal-bios.raw.gz -o rhcos-4.2.18-x86_64-metal-bios.raw.gz
sudo cp rhcos-4.2.18-x86_64-metal-bios.raw.gz /var/www/html/ocp4/bios/
```

### Generating Custom ISO files

##### inside of the ocp4-utils dir
```
cp example.yaml data.yaml
```
##### edit data.yaml to insert data for all nodes

```
---
url_ignition_file: http://192.168.1.10/ocp4
download_url: https://raw.githubusercontent.com/ashcrow/filetranspiler/master/filetranspile
bios_image: http://192.168.1.10/ocp4/bios/rhcos-4.3.0-x86_64-metal.raw.gz
append_url: http://192.168.1.10/ocp4/append
iso_file: rhcos-4.3.0-x86_64-installer.iso
paths:
  generic: "/etc"
  network: "/etc/sysconfig/network-scripts"
  ntp: "/etc"
  configs: "/configFiles"
  isos: "/isos"
nodes:
- hostname: bootstrap.jeb.dev
  role: bootstrap
  install_device: sda
  create_iso: true
  interfaces:
  - name: ens192
    ip: 192.168.1.19
    cidr: 24
    gateway: 192.168.1.1
    dns:
    - 192.168.1.1
    mtu: 1500
  ntp: 192.168.1.1
  templateIF: ifcfg-template.j2
  templateAppend: append-template.j2
  templateIsolinux: isolinux.cfg.j2
- hostname: ocpmaster1.jeb.dev
  role: master
  install_device: sda
  create_iso: true
  interfaces:
  - name: ens192
    ip: 192.168.1.20
    cidr: 24
    gateway: 192.168.1.1
    dns:
    - 192.168.1.1
    mtu: 1500
  ntp: 192.168.1.1
  templateIF: ifcfg-template.j2
  templateChrony: chrony.conf.j2
  templateAppend: append-template.j2
  templateIsolinux: isolinux.cfg.j2
- hostname: ocpmaster2.jeb.dev
  role: master
  install_device: sda
  create_iso: true
  interfaces:
  - name: ens192
    ip: 192.168.1.21
    cidr: 24
    gateway: 192.168.1.1
    dns:
    - 192.168.1.1
    mtu: 1500
  ntp: 192.168.1.1
  templateIF: ifcfg-template.j2
  templateChrony: chrony.conf.j2
  templateAppend: append-template.j2
  templateIsolinux: isolinux.cfg.j2
- hostname: ocpmaster3.jeb.dev
  role: master
  install_device: sda
  create_iso: true
  interfaces:
  - name: ens192
    ip: 192.168.1.22
    cidr: 24
    gateway: 192.168.1.1
    dns:
    - 192.168.1.1
    mtu: 1500
  ntp: 192.168.1.1
  templateIF: ifcfg-template.j2
  templateChrony: chrony.conf.j2
  templateAppend: append-template.j2
  templateIsolinux: isolinux.cfg.j2
- hostname: ocpworker1.jeb.dev
  role: worker
  install_device: sda
  create_iso: true
  interfaces:
  - name: ens192
    ip: 192.168.1.24
    cidr: 24
    gateway: 192.168.1.1
    dns:
    - 192.168.1.1
    mtu: 1500
  ntp: 192.168.1.1
  templateIF: ifcfg-template.j2
  templateChrony: chrony.conf.j2
  templateAppend: append-template.j2
  templateIsolinux: isolinux.cfg.j2
- hostname: ocpworker2.jeb.dev
  role: worker
  install_device: sda
  create_iso: true
  interfaces:
  - name: ens192
    ip: 192.168.1.25
    cidr: 24
    gateway: 192.168.1.1
    dns:
    - 192.168.1.1
    mtu: 1500
  ntp: 192.168.1.1
  templateIF: ifcfg-template.j2
  templateChrony: chrony.conf.j2
  templateAppend: append-template.j2
  templateIsolinux: isolinux.cfg.j2
```

##### ensure that the RHCOS ISO is present in the local dir

##### install python requirements

```
pip3 install --user -r requirements.txt
```

##### download filetranspile

```
curl https://raw.githubusercontent.com/ashcrow/filetranspiler/master/filetranspile -o filetranspile.py
```

##### Run prepare.py
```
./prepare.py
```

##### copy append files

```
sudo cp configFiles/* /var/www/html/ocp4/append
sudo chmod -R a+r+x /var/www/html/ocp4/append
```
##### Watch bootstrap process from openshift install
```
openshift-install --dir=ocppoc wait-for bootstrap-complete \ 
    --log-level=info
```

##### Setup OC Commands with kubeadmin

```
export KUBECONFIG=~/ocp/ocppoc/auth/kubeconfig
oc whoami
```

##### Set temporary emtydir for registry

```
oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
```

<proxies>

<proxy>
 
  <active>true</active>
 
  <protocol>https</protocol>
 
  <host>rduwsa08.labcorp.com</host>
 
  <port>8080</port>
 
 </proxy>
 
</proxies>