Deploy the infrastructure

The Framework works in a 2-step approach. Let’s first get the needed infrastructure for your tests.

Lightweight infrastructure

As said, this infrastructure involves CRC.

Tip

For the lightweight infrastructure, you may be able to deploy it on your laptop/desktop directly. In such a case, additional notes will be provided.

In order to deploy that infrastructure, you have to:

  • Retrieve your pull-secret (chose “Download pull secret”)

  • Prepare an inventory file

  • Prepare a custom variables file

  • run ansible-playbook

Inventory file

It must expose at least two hosts:

  1. localhost

  2. the hypervisor

You can take this as a template:

custom/inventory.yml
1all:
2  hosts:
3    localhost:
4      ansible_connection: local
5    hypervisor-1:
6      ansible_user: my_remote_user
7      ansible_host: hypervisor.localnet

Tip

In case you want to run the framework against your laptop/desktop, you can avoid the hypervisor-1 host.

Multi hypervisor case

If you want to involve two hypervisors (or more), you have to provide some more custom parameters, as well as override some of the 3-nodes.yml variable file. You can for instance take this environment file as an example. There are comments allowing you to understand the needed bits.

Custom variables file

You may want to override some of the default settings provided in the 3-node.yml scenario file.

Among the needed overrides, the pull-secret has to be passed down, for instance:

custom/private-params.yml
cifmw_manage_secrets_pullsecret_file: "{{ lookup('env', 'HOME') }}/pull-secret.txt"

Run the deployment

Once you’re ready, run:

[laptop]$ cd ci-framework
[laptop]$ ansible-playbook -i custom/inventory.yml \
    -e @scenarios/reproducers/3-nodes.yml \
    -e @scenarios/reproducers/networking-definition.yml \
    -e cifmw_target_host=hypervisor-1 \
    -e @custom/private-params.yml \
    reproducer.yml

Multiple hypervisors

If you’re consuming multiple hypervisors, you want to pass the multinode-params.yml file as the very last one.:

[laptop]$ ansible-playbook -i custom/inventory.yml \
    reproducer.yml \
    -e cifmw_target_host=hypervisors \
    -e @scenarios/reproducers/3-nodes.yml \
    -e @scenarios/reproducers/networking-definition.yml \
    -e @custom/private-params.yml [-e @custom/repositories.yml] \
    -e @custom/multinode-params.yml

Warning

Beware of the value passed to cifmw_target_host, it’s using the hypervisors group!

Explanations

The custom/inventory.yml is your custom inventory. If you’re deploying on your laptop/desktop, you don’t need to pass it.

The @scenarios/reproducers/3-nodes.yml extra variable file is the base of the lightweight infrastructure.

The cifmw_target_host allows to run the framework against your hypervisor. If you’re deploying against your laptop/desktop, you do not need to pass it.