Documentation: docs
apiVersion: v1 baseDomain: centos.org compute: - hyperthreading: Enabled name: worker replicas: 0 controlPlane: hyperthreading: Enabled name: master replicas: 3 metadata: name: ocp.ci networking: clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 networkType: OpenShiftSDN serviceNetwork: - 172.30.0.0/16 platform: none: {} fips: false pullSecret: '<installation pull secret from cloud.redhat.com>' sshKey: '<ssh key for the RHCOS nodes>'
openshift-install create manifests --dir=/home/dkirwan/ocp-ci-centos-org
INFO Consuming Install Config from target directory
WARNING Certificate 35183CE837878BAC77A802A8A00B6434857 from additionalTrustBundle is x509 v3 but not a certificate authority
WARNING Making control-plane schedulable by setting MastersSchedulable to true for Scheduler cluster settings.
* Running this command converts the install-config.yaml to a number of files eg:
~/ocp-ci-centos-org $ tree . . ├── manifests │ ├── 04-openshift-machine-config-operator.yaml │ ├── cluster-config.yaml │ ├── cluster-dns-02-config.yml │ ├── cluster-infrastructure-02-config.yml │ ├── cluster-ingress-02-config.yml │ ├── cluster-network-01-crd.yml │ ├── cluster-network-02-config.yml │ ├── cluster-proxy-01-config.yaml │ ├── cluster-scheduler-02-config.yml │ ├── cvo-overrides.yaml │ ├── etcd-ca-bundle-configmap.yaml │ ├── etcd-client-secret.yaml │ ├── etcd-host-service-endpoints.yaml │ ├── etcd-host-service.yaml │ ├── etcd-metric-client-secret.yaml │ ├── etcd-metric-serving-ca-configmap.yaml │ ├── etcd-metric-signer-secret.yaml │ ├── etcd-namespace.yaml │ ├── etcd-service.yaml │ ├── etcd-serving-ca-configmap.yaml │ ├── etcd-signer-secret.yaml │ ├── kube-cloud-config.yaml │ ├── kube-system-configmap-root-ca.yaml │ ├── machine-config-server-tls-secret.yaml │ ├── openshift-config-secret-pull-secret.yaml │ └── user-ca-bundle-config.yaml └── openshift ├── 99_kubeadmin-password-secret.yaml ├── 99_openshift-cluster-api_master-user-data-secret.yaml ├── 99_openshift-cluster-api_worker-user-data-secret.yaml ├── 99_openshift-machineconfig_99-master-ssh.yaml ├── 99_openshift-machineconfig_99-worker-ssh.yaml └── openshift-install-manifests.yaml 2 directories, 32 files
sed -i 's/mastersSchedulable: true/mastersSchedulable: false/g' manifests/cluster-scheduler-02-config.yml
for variant in master worker; do cat << EOF > ./99_openshift-machineconfig_99-${variant}-nm-nodhcp.yaml apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: ${variant} name: nm-${variant}-nodhcp spec: config: ignition: config: {} security: tls: {} timeouts: {} version: 2.2.0 networkd: {} passwd: {} storage: files: - contents: source: data:text/plain;charset=utf-8;base64,W21haW5dCm5vLWF1dG8tZGVmYXVsdD0qCg== verification: {} filesystem: root mode: 0644 path: /etc/NetworkManager/conf.d/disabledhcp.conf osImageURL: "" EOF done
worker.ign
to compute.ign
, as later steps in the process are configured to point at compute.ign.openshift-install create ignition-configs --dir=/home/dkirwan/ocp-ci-centos-org INFO Consuming OpenShift Install (Manifests) from target directory INFO Consuming Common Manifests from target directory INFO Consuming Master Machines from target directory INFO Consuming Worker Machines from target directory INFO Consuming Openshift Manifests from target directory # Should have the following layout . ├── auth │ ├── kubeadmin-password │ └── kubeconfig ├── bootstrap.ign ├── master.ign ├── metadata.json └── compute.ign
ocp.ci
we must perform an extra step at this point, as the machines have 2 hard disks attached. We want to ensure that /dev/sdb
gets its partition table wiped at bootstrapping time, so at a later time we can configure the Local Storage Operator to manage this disk drive.master.ign
and compute.ign
ignition files with the following:+ "storage":{"disks":[{"device":"/dev/sdb","wipeTable":true}]}, - "storage":{},
./openshift-install --dir=/home/dkirwan/ocp-ci-centos-org wait-for bootstrap-complete --log-level=info
ocp-ci-master-and-bootstrap-stg
ansible inventory group.csr
certs:# List the certs. If you see status pending, this is the worker/compute nodes attempting to join the cluster. It must be approved. oc get csr # Accept all node CSRs one liner oc get csr -o go-template='{{range .items}}{{if not .status}}{{.metadata.name}}{{"\n"}}{{end}}{{end}}' | xargs oc adm certificate approve
Resources:
Steps:
ssh-keygen
and uploaded it to the ansible-pkistore-ci repository at [4]