From 409d28612946cee4ee0ca9caf508aa00044e401f Mon Sep 17 00:00:00 2001 From: Ben Hearsum Date: Wed, 9 Oct 2024 20:23:52 -0400 Subject: [PATCH] use dnsmasq for translations generic worker Hopefully a fix for https://github.com/mozilla/firefox-translations-training/issues/549 --- builders/gw_translations_gcp.yaml | 1 + scripts/ubuntu-dnsmasq/01-switch-to-dnsmasq.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/ubuntu-dnsmasq/01-switch-to-dnsmasq.sh diff --git a/builders/gw_translations_gcp.yaml b/builders/gw_translations_gcp.yaml index 99a7f6b..b5ac034 100644 --- a/builders/gw_translations_gcp.yaml +++ b/builders/gw_translations_gcp.yaml @@ -13,6 +13,7 @@ script_directories: - ubuntu-jammy - ubuntu-worker-requirements - ubuntu-cuda + - ubuntu-dnsmasq - generic-worker-linux - worker-runner-linux - worker-runner-gw-systemd # TODO: merge with 'generic-worker-linux'? diff --git a/scripts/ubuntu-dnsmasq/01-switch-to-dnsmasq.sh b/scripts/ubuntu-dnsmasq/01-switch-to-dnsmasq.sh new file mode 100644 index 0000000..e805ac4 --- /dev/null +++ b/scripts/ubuntu-dnsmasq/01-switch-to-dnsmasq.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -exv + +# init helpers +helpers_dir=${MONOPACKER_HELPERS_DIR:-"/etc/monopacker/scripts"} +for h in ${helpers_dir}/*.sh; do + . $h; +done + +apt-get install -y dnsmasq +systemctl stop systemd-resolved +systemctl disable systemd-resolved +echo "server=8.8.8.8" >> /etc/dnsmasq.conf +systemctl start dnsmasq