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.
- atex/__init__.py +2 -12
- atex/cli/__init__.py +13 -13
- atex/cli/fmf.py +93 -0
- atex/cli/testingfarm.py +71 -61
- atex/connection/__init__.py +117 -0
- atex/connection/ssh.py +390 -0
- atex/executor/__init__.py +2 -0
- atex/executor/duration.py +60 -0
- atex/executor/executor.py +378 -0
- atex/executor/reporter.py +106 -0
- atex/executor/scripts.py +155 -0
- atex/executor/testcontrol.py +353 -0
- atex/fmf.py +217 -0
- atex/orchestrator/__init__.py +2 -0
- atex/orchestrator/aggregator.py +106 -0
- atex/orchestrator/orchestrator.py +324 -0
- atex/provision/__init__.py +101 -90
- atex/provision/libvirt/VM_PROVISION +8 -0
- atex/provision/libvirt/__init__.py +4 -4
- atex/provision/podman/README +59 -0
- atex/provision/podman/host_container.sh +74 -0
- atex/provision/testingfarm/__init__.py +2 -0
- atex/{testingfarm.py → provision/testingfarm/api.py} +170 -132
- atex/provision/testingfarm/testingfarm.py +236 -0
- atex/util/__init__.py +5 -10
- atex/util/dedent.py +1 -1
- atex/util/log.py +20 -12
- atex/util/path.py +16 -0
- atex/util/ssh_keygen.py +14 -0
- atex/util/subprocess.py +14 -13
- atex/util/threads.py +55 -0
- {atex-0.5.dist-info → atex-0.8.dist-info}/METADATA +97 -2
- atex-0.8.dist-info/RECORD +37 -0
- atex/cli/minitmt.py +0 -82
- atex/minitmt/__init__.py +0 -115
- atex/minitmt/fmf.py +0 -168
- atex/minitmt/report.py +0 -174
- atex/minitmt/scripts.py +0 -51
- atex/minitmt/testme.py +0 -3
- atex/orchestrator.py +0 -38
- atex/ssh.py +0 -320
- atex/util/lockable_class.py +0 -38
- atex-0.5.dist-info/RECORD +0 -26
- {atex-0.5.dist-info → atex-0.8.dist-info}/WHEEL +0 -0
- {atex-0.5.dist-info → atex-0.8.dist-info}/entry_points.txt +0 -0
- {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
|
+
|