Menu Close
8.4.16. Creating control plane Ignition config files
Installing OpenShift Container Platform on Red Hat OpenStack Platform (RHOSP) on your own infrastructure requires control plane Ignition config files. You must create multiple config files.
注記
As with the bootstrap Ignition configuration, you must explicitly define a host name for each control plane machine.
Prerequisites
The infrastructure ID from the installation program’s metadata file is set as an environment variable (
$INFRA_ID
)- If the variable is not set, see Creating the Kubernetes manifest and Ignition config files.
Procedure
On a command line, run the following Python script:
$ for index in $(seq 0 2); do MASTER_HOSTNAME="$INFRA_ID-master-$index\n" python -c "import base64, json, sys; ignition = json.load(sys.stdin); files = ignition['storage'].get('files', []); files.append({'path': '/etc/hostname', 'mode': 420, 'contents': {'source': 'data:text/plain;charset=utf-8;base64,' + base64.standard_b64encode(b'$MASTER_HOSTNAME').decode().strip(), 'verification': {}}, 'filesystem': 'root'}); ignition['storage']['files'] = files; json.dump(ignition, sys.stdout)" <master.ign >"$INFRA_ID-master-$index-ignition.json" done
You now have three control plane Ignition files:
<INFRA_ID>-master-0-ignition.json
,<INFRA_ID>-master-1-ignition.json
, and<INFRA_ID>-master-2-ignition.json
.