Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use dnsmasq for translations generic worker #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions builders/gw_translations_gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'?
Expand Down
23 changes: 23 additions & 0 deletions scripts/ubuntu-dnsmasq/01-switch-to-dnsmasq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -exv

# init helpers
helpers_dir=${MONOPACKER_HELPERS_DIR:-"/etc/monopacker/scripts"}
for h in ${helpers_dir}/*.sh; do
. $h;
done

# install dnsmasq before disabling systemd-resolved, because we need working
# dns to do so
apt-get install -y dnsmasq
# disable systemd-resolved
systemctl stop systemd-resolved
systemctl disable systemd-resolved
# remove symlink to systemd-resolved's resolv.conf; replace it with a version
# that points at the dnsmasq server that's about to start up
rm /etc/resolv.conf
echo "nameserver 127.0.0.1" > /etc/resolv.conf
echo "server=8.8.8.8" >> /etc/dnsmasq.conf
systemctl start dnsmasq
systemctl enable dnsmasq
Loading