Building your inventory

Tell Migration Factory where AAP, each source hypervisor, and each destination OpenShift cluster live. Seed reads this file and creates matching AAP hosts and credentials.

Copy inventory/inventory-sample.yml from the collection repository. Do not edit the sample in place. Replace every changeme.

Hosts are logical API targets. Playbooks use connection: local. After seed, AAP is the control plane; you do not re-run this file for each wave except when the topology changes (Updating the topology).

Groups

Group What it is for

migration_aap

The AAP controller seed talks to. Not copied into the AAP inventory.

vm_sources

Each VMware vSphere or RHV environment. Seed creates AAP hosts plus Migration Factory - Source Environment credentials.

migration_clusters

Each destination OpenShift API. Seed creates AAP hosts plus OpenShift or Kubernetes API Bearer Token credentials. Each cluster lists the sources it may migrate.

AAP controller

Username and password:

migration_aap — password
migration_aap:
  hosts:
    aap-instance:
      aap_hostname: https://aap.example.com
      aap_username: admin
      aap_password: changeme
      aap_validate_certs: true
      aap_project_scm_branch: v2

Token instead of a password:

migration_aap — token
    aap-instance:
      aap_hostname: https://aap.example.com
      aap_token: changeme
      aap_validate_certs: true
      aap_project_scm_branch: v2

Private Git for the AAP project (HTTPS):

migration_aap — private repo
      aap_project_scm_url: https://github.com/myorg/openshift_virtualization_migration.git
      aap_project_scm_branch: v2
      aap_project_credential: My Git Credential
      aap_git_username: my-git-user
      aap_git_password: changeme

Custom execution environment:

migration_aap — EE
      aap_execution_environment: Migration Factory Execution Environment
      aap_execution_environment_image: quay.io/redhat-cop/openshift-virtualization-migration-ee:latest
      aap_execution_environment_pull: missing
      aap_execution_environment_credential: Migration Factory Registry Credential
      aap_execution_environment_host: quay.io
      aap_execution_environment_username: changeme
      aap_execution_environment_password: changeme

Source hypervisors

VMware:

vm_sources — vSphere
vm_sources:
  hosts:
    vcenter-prod:
      type: vmware
      host: vcenter.example.com
      sdk_endpoint: /sdk
      username: administrator@vsphere.local
      password: changeme

VMware with VDDK (use an image you are entitled to build):

vm_sources — VDDK
    vcenter-prod:
      type: vmware
      host: vcenter.example.com
      sdk_endpoint: /sdk
      username: administrator@vsphere.local
      password: changeme
      vddk:
        image: registry.example.com/vddk:8.0

RHV:

vm_sources — RHV
    rhv-legacy:
      type: ovirt
      host: rhvm.example.com
      sdk_endpoint: /ovirt-engine/api
      username: admin@internal
      password: changeme

Destination clusters

Service account token (preferred):

migration_clusters — API token
migration_clusters:
  hosts:
    ocp-prod:
      openshift_host: https://api.example.com:6443
      openshift_api_key: changeme
      vm_sources:
        - vcenter-prod
      aap_hosts:
        - aap-instance
      mtv_namespace: openshift-mtv
      default_target_namespace: vm-workloads
      configure_mtv: true

Short-lived oc token (labs only):

migration_clusters — temporary token
      openshift_temporary_api_key: changeme

Do not set both openshift_api_key and openshift_temporary_api_key. To mint a long-lived token, see utility_openshift_target_credential.

Layouts

One cluster, one source — three host names even if the URLs sit on the same lab:

layout — one pair
migration_aap:
  hosts:
    aap-instance:
      aap_hostname: https://aap.example.com
      aap_username: admin
      aap_password: changeme
      aap_project_scm_branch: v2

vm_sources:
  hosts:
    vcenter-prod:
      type: vmware
      host: vcenter.example.com
      sdk_endpoint: /sdk
      username: administrator@vsphere.local
      password: changeme

migration_clusters:
  hosts:
    ocp-prod:
      openshift_host: https://api.example.com:6443
      openshift_api_key: changeme
      vm_sources:
        - vcenter-prod
      aap_hosts:
        - aap-instance
      mtv_namespace: openshift-mtv
      default_target_namespace: vm-workloads
      configure_mtv: true

One cluster, two sources — list both names under the cluster:

layout — two sources
      vm_sources:
        - vcenter-prod
        - rhv-legacy

Two clusters — each cluster has its own vm_sources list and aap_hosts:

layout — two clusters
migration_clusters:
  hosts:
    ocp-prod:
      openshift_host: https://api.prod.example.com:6443
      openshift_api_key: changeme
      vm_sources:
        - vcenter-prod
      aap_hosts:
        - aap-instance
    ocp-staging:
      openshift_host: https://api.staging.example.com:6443
      openshift_api_key: changeme
      vm_sources:
        - vcenter-prod
      aap_hosts:
        - aap-instance

A source missing from a cluster’s vm_sources list fails provider and maps for that pair.

When you are done

Save the file. Validate your environment, then Seeding Ansible Automation Platform. Later source_name and target_name on AAP surveys must match these host names.