mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 15:45:53 +01:00
tmt: Add webserver to provision-derived
Our custom tmt image needs to start the web server on port 10022 that tmt expects. Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
This commit is contained in:
@@ -24,6 +24,19 @@ case "$variant" in
|
||||
ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants
|
||||
# And tmt wants to write to /usr/local/bin
|
||||
rm /usr/local -rf && ln -sr /var/usrlocal /usr/local && mkdir -p /var/usrlocal/bin
|
||||
|
||||
# tmt needs a webserver to verify the VM is running
|
||||
TESTCLOUD_GUEST="python3 -m http.server 10022 || python -m http.server 10022 || /usr/libexec/platform-python -m http.server 10022 || python2 -m SimpleHTTPServer 10022 || python -m SimpleHTTPServer 10022"
|
||||
echo "$TESTCLOUD_GUEST" >> /opt/testcloud-guest.sh
|
||||
chmod +x /opt/testcloud-guest.sh
|
||||
echo "[Unit]" >> /etc/systemd/system/testcloud.service
|
||||
echo "Description=Testcloud guest integration" >> /etc/systemd/system/testcloud.service
|
||||
echo "After=cloud-init.service" >> /etc/systemd/system/testcloud.service
|
||||
echo "[Service]" >> /etc/systemd/system/testcloud.service
|
||||
echo "ExecStart=/bin/bash /opt/testcloud-guest.sh" >> /etc/systemd/system/testcloud.service
|
||||
echo "[Install]" >> /etc/systemd/system/testcloud.service
|
||||
echo "WantedBy=multi-user.target" >> /etc/systemd/system/testcloud.service
|
||||
systemctl enable testcloud.service
|
||||
;;
|
||||
"") echo "No variant"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user