Este conteúdo não está disponível no idioma selecionado.
Chapter 4. Configuring AAP to launch a migration
Configure Ansible Automation Platform (AAP) to launch a migration.
Prerequisites
- You have deployed your conversion host.
- You have the IP address and hostname for your conversion host.
- You have the user, public, and private key SSH access to the conversion host.
4.1. Ansible YAML files for migration Copiar o linkLink copiado para a área de transferência!
Prepare the Ansible YAML files the you use with the Ansible job template.
myvars.yml
# if you run the migration from an Ansible Execution Environment (AEE)
# set this to true:
runner_from_aee: true
# osm working directory:
os_migrate_vmw_data_dir: /opt/os-migrate
copy_openstack_credentials_to_conv_host: false
# Re-use an already deployed conversion host:
already_deploy_conversion_host: true
# If no mapped network then set the openstack network:
openstack_private_network: 81cc01d2-5e47-4fad-b387-32686ec71fa4
# Security groups for the instance:
security_groups: ab7e2b1a-b9d3-4d31-9d2a-bab63f823243
use_existing_flavor: true
# key pair name, could be left blank
ssh_key_name: default
# network settings for openstack:
os_migrate_create_network_port: true
copy_metadata_to_conv_host: true
used_mapped_networks: false
vms_list:
- VM1
- VM2
- My_VM
- Windows_VM
- RHEL9_VM
- Accounting_VM
- ...
secrets.yml
# VMware parameters:
esxi_hostname: 10.0.0.7
vcenter_hostname: 10.0.0.7
vcenter_username: root
vcenter_password: root
vcenter_datacenter: Datacenter
os_cloud_environ: psi-rhos-upgrades-ci
dst_cloud:
auth:
auth_url: https://keystone-public-openstack.apps.ocp-4-16.standalone
username: admin
project_id: xyz
project_name: admin
user_domain_name: Default
password: openstack
region_name: regionOne
interface: public
insecure: true
identity_api_version: 3
4.2. Creating credentials for AAP Copiar o linkLink copiado para a área de transferência!
Create credentials in Ansible Automation Platform (AAP).
Procedure
-
From the navigation panel, select
Automation Execution,Infrastructure,Credentials. -
Click
Create Credentials. Set the following parameters:
Name: Bastion key Credential Type: Machine Username: cloud-user SSH Private Key: key image-
Click
Create Credential.
4.3. Creating an inventory for AAP Copiar o linkLink copiado para a área de transferência!
Create an inventory in Ansible Automation Platform (AAP).
Procedure
-
From the navigation panel, select
Automation Execution,Infrastructure,Inventories. -
Click
Create Inventory,Create Inventory. Set the following parameters:
Name: Conversion Host Inventory Organization: Default-
Click
Create Inventory.
4.4. Creating hosts for AAP Copiar o linkLink copiado para a área de transferência!
Create hosts in Ansible Automation Platform (AAP).
Procedure
Create the conversion host:
-
From the navigation panel, select
Automation Execution,Infrastructure,Hosts. -
Click
Create Host. Set the following parameters:
Name: conversion_host Inventory: Conversion Host Inventory Variables: ansible_ssh_user: cloud-user ansible_host: <IP_or_hostname>1 - 1
- Replace
<IP_or_hostname>with the IP address or hostname of your Ansible host.
-
Click
Create Host.
-
From the navigation panel, select
Create the migrator host.
-
From the navigation panel, select
Automation Execution,Infrastructure,Hosts. -
Click
Create Host. Set the following parameters:
Name: migrator Inventory: Conversion Host Inventory Variables: ansible_connection: local ansible_python_interpreter: '{{ ansible_playbook_python }}'-
Click
Create Host.
-
From the navigation panel, select
4.5. Creating an execution environment Copiar o linkLink copiado para a área de transferência!
Create an execution environment in Ansible Automation Platform (AAP).
Procedure
-
From the navigation panel, select
Automation Execution,Infrastructure,Execution Environments. -
Click
Create Execution Environment. Set the following parameters:
Name: VMware migration toolkit Execution Environment Image: <insert the image that pushed to a repository when you built automation execution environment image>-
Click
Create Execution Environment.
-
Click
4.6. Creating a project Copiar o linkLink copiado para a área de transferência!
Create a project in Ansible Automation Platform (AAP).
Procedure
-
From the navigation panel, select
Automation Execution,Projects. -
Click
Create Project Set the following parameters:
Name: VMware migration toolkit project Organization: Default Execution Environment: VMware migration toolkit Execution Environment Environment Source Control Type: Git Source Control URL: https://github.com/os-migrate/vmware-migration-kit tag:"v2.1.0"-
Click
Create Project.
4.7. Configuring the job template Copiar o linkLink copiado para a área de transferência!
Configure the job template in Ansible Automation Platform (AAP).
Procedure
-
From the navigation panel, select
Automation Execution,Templates. -
Click
Create Template,Create Job Template Set the following parameters:
Name: Migration Inventory: Conversion Host Inventory Project: VMware migration toolkit project Playbook: playbooks/migration.yml Execution Environment: vmware migration toolkit Execution Environment Credentials: Bastion key Extra Variables: <Add your extra variables here, such as myvars.yml and secrets.yml>-
Click
Create Job Template.
4.8. Launching the migration using execution Copiar o linkLink copiado para a área de transferência!
Launch the migration in Ansible Automation Platform (AAP).
Procedure
-
From the navigation panel, select
Automation Execution,Templates. -
Locate the
Migration Jobtemplate. - Click the rocket icon to launch the migration.