-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial support for gcp l1 gui image
- Loading branch information
Showing
10 changed files
with
355 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
6 changes: 3 additions & 3 deletions
6
config/ubuntu2404-amd64-alpha.yaml → config/gw-fxci-gcp-l1-gui.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- | ||
image: | ||
source_image_family: ubuntu-2404-lts-amd64 | ||
source_image_family: ubuntu-2204-lts | ||
project_id: "taskcluster-imaging" | ||
workload_identity_provider_project_number: 324168772199 | ||
image_name: ubuntu2404-amd64-alpha | ||
image_name: gw-fxci-gcp-l1-gui-googlecompute-alpha | ||
zone: us-west1-a | ||
vm: | ||
disk_size: 100 | ||
taskcluster_version: 70.0.0 | ||
tc_arch: AMD64 | ||
tc_arch: AMD64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
scripts/linux/ubuntu-jammy-from-community-gui/05-install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
set -exv | ||
|
||
# init helpers | ||
function retry { | ||
set +e | ||
local n=0 | ||
local max=10 | ||
while true; do | ||
"$@" && break || { | ||
if [[ $n -lt $max ]]; then | ||
((n++)) | ||
echo "Command failed" >&2 | ||
sleep_time=$((2 ** n)) | ||
echo "Sleeping $sleep_time seconds..." >&2 | ||
sleep $sleep_time | ||
echo "Attempt $n/$max:" >&2 | ||
else | ||
echo "Failed after $n attempts." >&2 | ||
exit 1 | ||
fi | ||
} | ||
done | ||
set -e | ||
} | ||
|
||
# taken from https://github.com/taskcluster/community-tc-config/blob/main/imagesets/generic-worker-ubuntu-22-04/bootstrap.sh | ||
|
||
# AJE added | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
# place a new worker unit file that is required by the graphical target | ||
cat > /lib/systemd/system/worker.service << EOF | ||
[Unit] | ||
Description=Start TC worker | ||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/start-worker /etc/start-worker.yml | ||
# log to console to make output visible in cloud consoles, and syslog for ease of | ||
# redirecting to external logging services | ||
StandardOutput=syslog+console | ||
StandardError=syslog+console | ||
User=root | ||
[Install] | ||
RequiredBy=graphical.target | ||
EOF | ||
|
||
# podman installed in non-gui | ||
retry apt-get install -y ubuntu-desktop ubuntu-gnome-desktop | ||
|
||
# Installs the v4l2loopback kernel module | ||
# used for the video device, and vkms | ||
# required by Wayland | ||
retry apt-get install -y linux-modules-extra-$(uname -r) | ||
# needed for mutter to work with DRM rather than falling back to X11 | ||
grep -Fx vkms /etc/modules || echo vkms >> /etc/modules | ||
# disable udev rule that tags platform-vkms with "mutter-device-ignore" | ||
# ENV{ID_PATH}=="platform-vkms", TAG+="mutter-device-ignore" | ||
sed '/platform-vkms/d' /lib/udev/rules.d/61-mutter.rules > /etc/udev/rules.d/61-mutter.rules | ||
|
||
# vnc configuration omitted | ||
# - see https://github.com/taskcluster/community-tc-config/blob/5431d9f72f52eeb2bb232dcac55ad399f747ac6a/imagesets/generic-worker-ubuntu-22-04-staging/bootstrap.sh | ||
|
||
# use fc-cache:i386 to pre-build the font cache for i386 binaries | ||
# i386 line: apt-get -q -y -f install fontconfig:i386 | ||
# TODO: do we need to specify arch here? | ||
apt-get -q -y -f install fontconfig |
137 changes: 137 additions & 0 deletions
137
scripts/linux/ubuntu-jammy-from-community-gui/50-wayland_errata.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
#!/bin/bash | ||
|
||
set -exv | ||
|
||
# init helpers | ||
helpers_dir=${MONOPACKER_HELPERS_DIR:-"/etc/monopacker/scripts"} | ||
for h in ${helpers_dir}/*.sh; do | ||
. $h; | ||
done | ||
|
||
# see https://github.com/mozilla-platform-ops/monopacker/issues/138 | ||
|
||
|
||
# | ||
# install tools | ||
# | ||
|
||
# used to modify specific blocks in .conf files | ||
apt install -y crudini | ||
|
||
|
||
# | ||
# dconf settings | ||
# | ||
|
||
cat > /etc/dconf/profile/user << EOF | ||
user-db:user | ||
system-db:local | ||
EOF | ||
|
||
mkdir /etc/dconf/db/local.d/ | ||
# dconf user settings | ||
cat > /etc/dconf/db/local.d/00-tc-gnome-settings << EOF | ||
# /org/gnome/desktop/session/idle-delay | ||
[org/gnome/desktop/session] | ||
idle-delay=uint32 0 | ||
# /org/gnome/desktop/lockdown/disable-lock-screen | ||
[org/gnome/desktop/lockdown] | ||
disable-lock-screen=true | ||
EOF | ||
|
||
# make dbus read the new configuration | ||
sudo dconf update | ||
|
||
# test | ||
ls -hal /etc/dconf/db/ | ||
|
||
|
||
# | ||
# gdm3 settings | ||
# | ||
|
||
# in [daemon] block of /etc/gdm3/custom.conf we need: | ||
# | ||
# XorgEnable=false | ||
|
||
crudini --set /etc/gdm3/custom.conf daemon XorgEnable 'false' | ||
|
||
# verify/test | ||
cat /etc/gdm3/custom.conf | ||
echo "----" | ||
grep 'XorgEnable' /etc/gdm3/custom.conf | ||
grep 'XorgEnable' /etc/gdm3/custom.conf | grep false | ||
|
||
|
||
# | ||
# gdm wait service file | ||
# | ||
|
||
# This hack is required because without we end up in a situation where the | ||
# wayland seat is in a weird state and consequences are: | ||
# - either x11 session | ||
# - either xwayland fallback | ||
# - either wayland but with missing keyboard capability that breaks | ||
# things including copy/paste | ||
|
||
mkdir -p /etc/systemd/system/gdm.service.d/ | ||
cat > /etc/systemd/system/gdm.service.d/gdm-wait.conf << EOF | ||
[Unit] | ||
Description=Extra 30s wait | ||
[Service] | ||
ExecStartPre=/bin/sleep 30 | ||
EOF | ||
|
||
|
||
# | ||
# extra packages | ||
# | ||
|
||
# ttf-mscorefonts-installer is part of ubuntu-restricted-extras, accept license | ||
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections | ||
|
||
# install stuff | ||
apt install -y \ | ||
gnome-screenshot \ | ||
ubuntu-restricted-extras | ||
|
||
# test that gnome-screenshot is present | ||
ls -la "$(which gnome-screenshot)" | ||
ls -la /usr/bin/gnome-screenshot | ||
|
||
# | ||
# write mutter's monitors.xml | ||
# | ||
|
||
cat > /etc/xdg/monitors.xml << EOF | ||
<monitors version="2"> | ||
<configuration> | ||
<logicalmonitor> | ||
<x>0</x> | ||
<y>0</y> | ||
<scale>1</scale> | ||
<primary>yes</primary> | ||
<monitor> | ||
<monitorspec> | ||
<connector>Virtual-1</connector> | ||
<vendor>unknown</vendor> | ||
<product>unknown</product> | ||
<serial>unknown</serial> | ||
</monitorspec> | ||
<mode> | ||
<width>1920</width> | ||
<height>1080</height> | ||
<rate>60.000</rate> | ||
</mode> | ||
</monitor> | ||
</logicalmonitor> | ||
</configuration> | ||
</monitors> | ||
EOF | ||
|
||
# | ||
# verify that the XDG_RUNTIME_DIR fix is in the g-w binary we're using | ||
# | ||
strings /usr/local/bin/generic-worker | grep XDG_RUNTIME_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -exv | ||
|
||
# | ||
# reboot to use the new kernel | ||
# | ||
shutdown -r now |
Oops, something went wrong.