atex 0.5__py3-none-any.whl → 0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. atex/__init__.py +2 -12
  2. atex/cli/__init__.py +13 -13
  3. atex/cli/fmf.py +93 -0
  4. atex/cli/testingfarm.py +71 -61
  5. atex/connection/__init__.py +117 -0
  6. atex/connection/ssh.py +390 -0
  7. atex/executor/__init__.py +2 -0
  8. atex/executor/duration.py +60 -0
  9. atex/executor/executor.py +378 -0
  10. atex/executor/reporter.py +106 -0
  11. atex/executor/scripts.py +155 -0
  12. atex/executor/testcontrol.py +353 -0
  13. atex/fmf.py +217 -0
  14. atex/orchestrator/__init__.py +2 -0
  15. atex/orchestrator/aggregator.py +106 -0
  16. atex/orchestrator/orchestrator.py +324 -0
  17. atex/provision/__init__.py +101 -90
  18. atex/provision/libvirt/VM_PROVISION +8 -0
  19. atex/provision/libvirt/__init__.py +4 -4
  20. atex/provision/podman/README +59 -0
  21. atex/provision/podman/host_container.sh +74 -0
  22. atex/provision/testingfarm/__init__.py +2 -0
  23. atex/{testingfarm.py → provision/testingfarm/api.py} +170 -132
  24. atex/provision/testingfarm/testingfarm.py +236 -0
  25. atex/util/__init__.py +5 -10
  26. atex/util/dedent.py +1 -1
  27. atex/util/log.py +20 -12
  28. atex/util/path.py +16 -0
  29. atex/util/ssh_keygen.py +14 -0
  30. atex/util/subprocess.py +14 -13
  31. atex/util/threads.py +55 -0
  32. {atex-0.5.dist-info → atex-0.8.dist-info}/METADATA +97 -2
  33. atex-0.8.dist-info/RECORD +37 -0
  34. atex/cli/minitmt.py +0 -82
  35. atex/minitmt/__init__.py +0 -115
  36. atex/minitmt/fmf.py +0 -168
  37. atex/minitmt/report.py +0 -174
  38. atex/minitmt/scripts.py +0 -51
  39. atex/minitmt/testme.py +0 -3
  40. atex/orchestrator.py +0 -38
  41. atex/ssh.py +0 -320
  42. atex/util/lockable_class.py +0 -38
  43. atex-0.5.dist-info/RECORD +0 -26
  44. {atex-0.5.dist-info → atex-0.8.dist-info}/WHEEL +0 -0
  45. {atex-0.5.dist-info → atex-0.8.dist-info}/entry_points.txt +0 -0
  46. {atex-0.5.dist-info → atex-0.8.dist-info}/licenses/COPYING.txt +0 -0
@@ -0,0 +1,74 @@
1
+ #!/bin/bash
2
+
3
+ if [[ $# -lt 1 ]]; then
4
+ echo "usage: $0 <podman-image-name>" >&2
5
+ exit 1
6
+ fi
7
+ image_name="$1"
8
+
9
+ set -e -x
10
+
11
+ tmpdir=$(mktemp -d -p /var/tmp)
12
+ trap "rm -rf '$tmpdir'" EXIT
13
+
14
+ installroot="$tmpdir/root"
15
+
16
+ dnf \
17
+ --installroot="$installroot" \
18
+ --setopt=install_weak_deps=False \
19
+ --setopt=tsflags=nodocs \
20
+ -q -y groupinstall minimal-environment
21
+
22
+ echo -n > "$installroot/etc/machine-id"
23
+ #echo container > "$installroot/etc/hostname"
24
+
25
+ cp -f /etc/yum.repos.d/* "$installroot/etc/yum.repos.d/."
26
+ cp -f /etc/pki/rpm-gpg/* "$installroot/etc/pki/rpm-gpg/."
27
+
28
+ echo install_weak_deps=False >> "$installroot/etc/dnf/dnf.conf"
29
+ echo tsflags=nodocs >> "$installroot/etc/dnf/dnf.conf"
30
+
31
+ ln -sf \
32
+ /usr/lib/systemd/system/multi-user.target \
33
+ "$installroot/etc/systemd/system/default.target"
34
+
35
+ systemctl --root="$installroot" disable \
36
+ auditd.service crond.service rhsmcertd.service sshd.service
37
+
38
+ #encrypted=$(openssl passwd -6 somepass)
39
+ #usermod --root="$installroot" --password "$encrypted" root
40
+
41
+ dnf clean packages --installroot="$installroot"
42
+
43
+ tar --xattrs -C "$installroot" -cf "$tmpdir/packed.tar" .
44
+
45
+ rm -rf "$installroot"
46
+
47
+ podman import \
48
+ --change 'CMD ["/sbin/init"]' \
49
+ "$tmpdir/packed.tar" "$image_name"
50
+
51
+ # start as
52
+ # podmn {run,create} --systemd=always --cgroups=split --device /dev/kvm ...
53
+ #
54
+ # podman run -t -i \
55
+ # --systemd=always --cgroups=split \
56
+ # --device /dev/kvm \
57
+ # --network=bridge \
58
+ # --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_MODULE \
59
+ # --mount type=bind,src=/lib/modules,dst=/lib/modules,ro \
60
+ # --mount type=bind,src=/proc/sys/net,dst=/proc/sys/net,rw \
61
+ # my_container
62
+ #
63
+ # as unprivileged user:
64
+ # podman run -t -i \
65
+ # --systemd=always --cgroups=split --network=bridge --privileged \
66
+ # my_container
67
+ #
68
+ # container setup:
69
+ # dnf -y install libvirt-daemon qemu-kvm libvirt-client libvirt-daemon-driver-qemu virt-install libvirt-daemon-driver-storage libvirt-daemon-config-network
70
+ # echo $'user = "root"\ngroup = "root"\nremember_owner = 0' >> /etc/libvirt/qemu.conf
71
+ # systemctl start virtqemud.socket virtstoraged.socket virtnetworkd.socket
72
+ # virsh net-start default
73
+ # virt-install --install fedora40 --disk /var/lib/libvirt/images/foo.qcow2,size=20 --console pty --check disk_size=off --unattended --graphics none
74
+
@@ -0,0 +1,2 @@
1
+ from . import api # noqa: F401
2
+ from .testingfarm import TestingFarmProvisioner, TestingFarmRemote # noqa: F401