Ansible automation to generate a CCCO contract and deploy the PayNow workload on a bare metal OpenShift cluster using IBM Confidential Computing Containers for Red Hat OpenShift Container Platform (CCCO).
- Ansible
2.12+installed on the controller (your local machine) - SSH access configured to the bastion host (
~/.ssh/ansible-ocpz) kubernetes.coreAnsible collection (installed viarequirements.yml)
Place the following files in the artifacts/ directory before running:
| File pattern | Description |
|---|---|
HKD*.crt |
Host Key Document certificate |
*.crt (non-HKD) |
IBM CCCO contract encryption certificate |
*.bin |
SE header binary |
*client* |
CCCO sealed-secret-creator-client binary (s390x) |
Files are auto-discovered by pattern — no need to specify filenames in config.
Configure passwordless SSH access from your local machine to the bastion before running the playbook.
# 1. Generate SSH key pair (skip if ~/.ssh/ansible-ocpz already exists)
ssh-keygen -t rsa -b 4096 -f ~/.ssh/ansible-ocpz -N ""
# 2. Copy public key to bastion
ssh-copy-id -i ~/.ssh/ansible-ocpz.pub root@<bastion-ip>
# 3. Verify connection
ssh -i ~/.ssh/ansible-ocpz root@<bastion-ip>The key name
ansible-ocpzmatches theprivate_key_fileinansible.cfg. If you use a different key name, updateansible.cfgaccordingly.
# 1. Install required Ansible collections
ansible-galaxy collection install -r requirements.yml
# 2. Copy and fill in inventory variables
cp inventories/default/group_vars/all.yaml.template inventories/default/group_vars/all.yaml
vi inventories/default/group_vars/all.yaml
# 3. Place required artifacts
cp /path/to/your/artifacts/* artifacts/ansible-playbook playbooks/ccco_baremetal.yamlThis will:
- Auto-generate
inventories/default/hostsfromall.yaml(no manual hosts file needed) - Copy baremetal artifacts to
/root/ccco-artifactson the bastion - Generate CCCO contract keys and REGO attestation policy
- Create and apply the sealed secret (
spoiler) to thedefaultnamespace - Build the encrypted contract (workload + env sections)
- Generate
paynow-baremetal.yaml— the PayNow Pod/Service/Route manifest
ccco-provisioner/
├── ansible.cfg
├── requirements.yml # Ansible collection dependencies
├── artifacts/ # Place required binaries and certs here (git-ignored)
├── inventories/
│ └── default/
│ └── group_vars/
│ └── all.yaml.template # Copy to all.yaml and fill values
├── playbooks/
│ └── ccco_baremetal.yaml # Single entry-point playbook
└── roles/
├── ccco_setinventory/ # Auto-generates hosts file from all.yaml
├── ccco_contract_generator/ # Discovers artifacts, generates REGO policy + keys
├── ccco_sealed_secrets/ # Creates and applies sealed secret to cluster
└── ccco_paynow_deploy/ # Builds encrypted contract, generates paynow-baremetal.yaml
This project is licensed under the Apache License 2.0