Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testcloud provisioner #134

Merged
merged 1 commit into from
Mar 4, 2020
Merged

Add testcloud provisioner #134

merged 1 commit into from
Mar 4, 2020

Conversation

thrix
Copy link
Collaborator

@thrix thrix commented Mar 2, 2020

This MR adds provisioning of qcow2 images via testcloud.

To test with a qcow2 from url:

tmt run -a provision -h testcloud --image https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-32/compose/Cloud/x86_64/images/Fedora-Cloud-Base-32-20200301.n.0.x86_64.qcow2

To test with a local qcow2:

tmt run -a provision -h testcloud --image file:///home/user/fedora.qcow2

To test with latest Rawhide:

tmt run -a provision -h testcloud --image fedora
tmt run -a provision -h testcloud --image rawhide
tmt run -a provision -h testcloud --image fedora-rawhide

Other mappings will come later, as it is a bit PITA to do ....

Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com

@thrix thrix requested a review from psss March 2, 2020 08:11
@thrix thrix force-pushed the testcloud-provisioner branch from a71d283 to 8e6fcbd Compare March 2, 2020 08:12
@thrix
Copy link
Collaborator Author

thrix commented Mar 2, 2020

Note that testcloud will print on stdout information about formatting the VM disk, here is a patch for that for testcloud:
https://pagure.io/testcloud/pull-request/61

@thrix thrix force-pushed the testcloud-provisioner branch from 8e6fcbd to 53d07cd Compare March 2, 2020 08:15
@thrix thrix requested review from hegerj, pvalena and t184256 March 2, 2020 08:19
@thrix thrix force-pushed the testcloud-provisioner branch from 53d07cd to 4da492f Compare March 2, 2020 10:07
psss
psss previously requested changes Mar 2, 2020
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import fails:

>>> import tmt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/psss/git/tmt/tmt/__init__.py", line 3, in <module>
    from tmt.base import Tree, Test, Plan, Story, Run
File "/home/psss/git/tmt/tmt/base.py", line 15, in <module>
    import tmt.steps.provision
File "/home/psss/git/tmt/tmt/steps/provision/__init__.py", line 11, in <module>
    from tmt.steps.provision import vagrant, localhost, podman, testcloud
File "/home/psss/git/tmt/tmt/steps/provision/testcloud.py", line 5, in <module>
    import testcloud.image
ModuleNotFoundError: No module named 'testcloud'

Perhaps forgotten BuildRequires in the pull request?

@thrix thrix force-pushed the testcloud-provisioner branch from 4da492f to 5d7a629 Compare March 2, 2020 14:23
@thrix thrix force-pushed the testcloud-provisioner branch 2 times, most recently from 81b11c9 to cbf0c53 Compare March 2, 2020 18:59
@thrix thrix requested a review from psss March 2, 2020 19:00
@thrix thrix force-pushed the testcloud-provisioner branch 2 times, most recently from a8c44a3 to eb3d5aa Compare March 3, 2020 10:58
@psss
Copy link
Collaborator

psss commented Mar 3, 2020

Seems the StrictHostKeyChecking should be added to rsync commands as well:

Warning: remote host identification has changed!
Failed to run command 'rsync -Rvaze "ssh -i ...

@psss
Copy link
Collaborator

psss commented Mar 3, 2020

Or shall we include -o UserKnownHostsFile=/dev/null in the ssh options as well?

@thrix thrix force-pushed the testcloud-provisioner branch 2 times, most recently from 0f7e779 to a79f52c Compare March 3, 2020 17:38
@thrix
Copy link
Collaborator Author

thrix commented Mar 3, 2020

@psss all should be fixed, waiting for ssh to be available was added ... options needed for seamless connection via ssh added to everyting ...

Kindly asking for next round of review

@psss
Copy link
Collaborator

psss commented Mar 4, 2020

Nice, thanks! The ssh retry fixed the connection problem. One last thing: Perhaps we should remove -v from rsync. I don't think it's necessary to print all synced files on the output.

@thrix
Copy link
Collaborator Author

thrix commented Mar 4, 2020

Nice, thanks! The ssh retry fixed the connection problem. One last thing: Perhaps we should remove -v from rsync. I don't think it's necessary to print all synced files on the output.

ok

@thrix thrix force-pushed the testcloud-provisioner branch from a79f52c to 91bfa19 Compare March 4, 2020 14:32
@thrix
Copy link
Collaborator Author

thrix commented Mar 4, 2020

@psss done

@thrix thrix force-pushed the testcloud-provisioner branch from 91bfa19 to c28a1fb Compare March 4, 2020 14:34
@thrix thrix dismissed psss’s stale review March 4, 2020 14:50

This is already fixed ... not able to resolve it ....

@thrix thrix force-pushed the testcloud-provisioner branch from c28a1fb to 83735e9 Compare March 4, 2020 16:08
This MR adds provisioning of qcow2 images via testcloud.

To test with a qcow2 from url:

    tmt run -a provision -h testcloud --image https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-32/compose/Cloud/x86_64/images/Fedora-Cloud-Base-32-20200301.n.0.x86_64.qcow2

To test with a local qcow2:

    tmt run -a provision -h testcloud --image file:///home/user/fedora.qcow2

To test with latest Rawhide:

    tmt run -a provision -h testcloud --image fedora
    tmt run -a provision -h testcloud --image rawhide
    tmt run -a provision -h testcloud --image fedora-rawhide

Other mappings will come later, as it is a bit PITA to do ....

Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
@thrix thrix force-pushed the testcloud-provisioner branch from 83735e9 to ec4c0d7 Compare March 4, 2020 16:08
@thrix thrix requested a review from psss March 4, 2020 16:09
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, works now for all tmt plans. Thanks for all the fixes!

@psss psss merged commit 6f0ffad into master Mar 4, 2020
@psss psss self-assigned this Mar 4, 2020
@psss psss added enhancement step | provision Stuff related to the provision step labels Mar 4, 2020
@psss psss deleted the testcloud-provisioner branch March 4, 2020 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
step | provision Stuff related to the provision step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants