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

Ubuntu 18.04, round 2 #219

Merged
merged 209 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
27d4635
disable moonshot linux fw for now
davehouse Aug 24, 2020
058e467
fix
davehouse Aug 24, 2020
fe1d99e
pin to dev branch
davehouse Aug 24, 2020
df9d75b
other pool
davehouse Aug 24, 2020
481dae7
switch to my branch
aerickson Aug 26, 2020
f76eb4d
sudoers fix?
aerickson Aug 26, 2020
0bb54a1
gemfile update
aerickson Aug 26, 2020
446cc02
test fix
aerickson Aug 26, 2020
14dced2
sudoers template cleanup
aerickson Aug 26, 2020
f2c4623
spec testing: check sudoers
aerickson Aug 26, 2020
333c04b
move group testing around
aerickson Aug 26, 2020
b53cb24
testing: fix regex
aerickson Aug 26, 2020
c81028d
add linux bootstrap script
aerickson Sep 21, 2020
81ba3ff
add linux systemd service file for running puppet
aerickson Sep 21, 2020
9658235
copy the mojave puppet atboot run script
aerickson Sep 21, 2020
e89294a
atboot: write for linux
aerickson Sep 21, 2020
afce0db
linux_packages/puppet: WIP
aerickson Sep 21, 2020
b5330dc
bundle update
aerickson Sep 21, 2020
8476eaf
fix lint in bootstrap re which
aerickson Sep 21, 2020
12d6bae
atboot: don't do semaphore stuff (not used on linux)
aerickson Sep 22, 2020
f902f0d
test-kitchen: add telegraf hiera data
aerickson Sep 22, 2020
5ee01f3
atboot fixing
aerickson Sep 22, 2020
bced258
linux_packages::puppet is working
aerickson Sep 23, 2020
a70e114
puppet: make sure we're on 6
aerickson Sep 23, 2020
dfc3f61
add comments to puppet::
aerickson Sep 23, 2020
9c3ee4c
bundle update
aerickson Sep 23, 2020
72c7858
puppet6 spec
aerickson Sep 23, 2020
aa9f410
puppet spec note
aerickson Sep 23, 2020
61c0f61
remove comment
aerickson Sep 23, 2020
8b9bd62
don't change darwin run-puppet template (sync in future pr)
aerickson Sep 23, 2020
9fc51e7
add note
aerickson Sep 24, 2020
42836ad
import lots of gui module from build-puppet
aerickson Sep 24, 2020
db2cc4a
linux_gui: pass variables vs referencing other classes
aerickson Sep 24, 2020
1354509
invoke linux_gui
aerickson Sep 24, 2020
c917931
import package modules from build-puppet
aerickson Sep 24, 2020
a02433c
fixes, now converging
aerickson Sep 24, 2020
038b870
linux_gui: var fix, cleanup
aerickson Sep 24, 2020
64b7849
linux_gui: reference fix
aerickson Sep 24, 2020
8ab626f
linux_gui: fix another reference
aerickson Sep 24, 2020
0427879
refactoring: move invocation of linux_gui to gui profile vs talos-gw
aerickson Sep 24, 2020
d48db89
linux_gui: template fixes
aerickson Sep 24, 2020
1010577
puppet/atboot: path fix
aerickson Sep 24, 2020
9efbabc
puppet: run script waits on network (systemd network not enough)
aerickson Sep 25, 2020
accf0a0
puppet: fix systemd service file
aerickson Sep 25, 2020
a3d8e5e
puppet: don't block on network
aerickson Sep 25, 2020
7f087a7
comments
aerickson Sep 25, 2020
ae72abe
linux_gui: remove unused templates
aerickson Sep 25, 2020
7f6ce82
use the 1604 x11 conf from build-puppet vs 14.04
aerickson Sep 25, 2020
28e563c
linux_gui: fix bad ref
aerickson Sep 25, 2020
ceca30b
linux_gw: fix deskop file
aerickson Sep 25, 2020
8b3b731
linux_gui: stop gdm
aerickson Sep 25, 2020
f6d38b5
linux_gui: stop gdm by setting systemctl default to multi-user.target
aerickson Sep 25, 2020
1905afa
linux_gui: fix onlyif logic
aerickson Sep 25, 2020
a2efd5f
remove completed todo
aerickson Sep 25, 2020
4805db1
linux_gw: fix config so g-w starts
aerickson Sep 25, 2020
0492e25
add locale module
aerickson Sep 26, 2020
35c8b96
add locale profile and add it to linux_base
aerickson Sep 26, 2020
98ad849
comment
aerickson Sep 26, 2020
0dda238
linux_pacakges/puppet: remove puppet package (prefer pupet-agent)
aerickson Sep 26, 2020
c31a62d
linux_gw: fix ownership on .config
aerickson Sep 28, 2020
976f77a
testing only: disable reboot on g-w run failure
aerickson Sep 28, 2020
c87a6e8
linux_gw: root owns config and start script, create ./tasks and ./dow…
aerickson Sep 28, 2020
2f42971
todos
aerickson Sep 28, 2020
bb26af4
linux_gw: install livelog, upgrade versions
aerickson Sep 28, 2020
45f6b23
linux_gw: fix config options for livelog
aerickson Sep 28, 2020
78b2cd8
linux_gw: remove incompatible option
aerickson Sep 28, 2020
a8891bb
talos: create /build and associated dirs
aerickson Sep 28, 2020
c741300
talos: create /build
aerickson Sep 28, 2020
ec62246
linux_gw: re-enable reboots
aerickson Sep 29, 2020
4dfeed4
locale: try to fix
aerickson Sep 29, 2020
d4ab25d
locale: undo locale change
aerickson Sep 29, 2020
13fcf5b
linux_gw: experiment with running 100 jobs before restart
aerickson Sep 29, 2020
51f05df
locale: set only LANG, should affect all parts of system
aerickson Sep 29, 2020
a7c5699
locale: generate locale before reconfiguring
aerickson Sep 29, 2020
058f077
locales: travis docker test image lacks locales package
aerickson Sep 29, 2020
dd3015c
bundle update
aerickson Sep 29, 2020
ee6d6de
linux_gui: remove gnome-initial-setup (not needed, blocks ui)
aerickson Sep 30, 2020
239a969
linux_gui: create polkit config file to allow all users to create col…
aerickson Sep 30, 2020
511788a
linux_gw: remove idletimeout
aerickson Sep 30, 2020
eccbfa7
readme: add another link about repo/code structure
aerickson Sep 30, 2020
e108e4c
Merge branch 'master' into moonshot_1804
aerickson Sep 30, 2020
4aa3d59
imagemagick: add 7.0 version also
aerickson Sep 30, 2020
f34526e
zstandard: bug fix
aerickson Oct 1, 2020
86f33dd
add psutil==5.7.0
aerickson Oct 1, 2020
5606afd
add psutil spec test
aerickson Oct 1, 2020
710a2e8
chrome: auto-update
aerickson Oct 1, 2020
55d37ce
linux_gui: on 1804, jockey is gone, dejadup path changed. also disabl…
aerickson Oct 1, 2020
6136983
linux_gui: attempt to disable xdg autostart items by commenting exec …
aerickson Oct 1, 2020
b7fd706
fix chrome spec test
aerickson Oct 2, 2020
17dac72
google_chrome: tweak how we install
aerickson Oct 2, 2020
3959c22
remove unused files
aerickson Oct 2, 2020
1745cbc
enhance gw spec
aerickson Oct 2, 2020
a919d6a
add linux_gui spec
aerickson Oct 2, 2020
83088a4
add comment to imagemagick spec
aerickson Oct 2, 2020
c3860b1
add locale spec
aerickson Oct 2, 2020
4842f1e
add talos spec
aerickson Oct 2, 2020
ec3f8eb
add (puppet) atboot spec
aerickson Oct 2, 2020
a978ed1
add disable_services module and add to linux_base profile
aerickson Oct 2, 2020
aedba72
locale spec fix
aerickson Oct 2, 2020
1f4fc34
disable_services: add quotes to fix
aerickson Oct 2, 2020
3ea87fd
add disabled_services spec
aerickson Oct 2, 2020
f1ada47
disable services spec: syntax fix
aerickson Oct 2, 2020
e05882e
disable_services: don't try to disable acpid via systemd
aerickson Oct 2, 2020
f31db5f
linux_talos profile: comment cleanup
aerickson Oct 2, 2020
e44d1c3
linux_gw: comment tweak
aerickson Oct 2, 2020
723bdaf
talos_gw: comment tweak
aerickson Oct 5, 2020
70f32f4
add a script to send out the bootstrap script
aerickson Oct 9, 2020
eec051c
deliver bootstrap: fixes
aerickson Oct 9, 2020
b1eaf1f
bootstrap: install puppet 6
aerickson Oct 9, 2020
22c3213
linux_gw: reboot after one task for now
aerickson Oct 12, 2020
1420a09
linux gw: upgrade to 37.3.0, add start-worker
aerickson Oct 12, 2020
230d651
linux_gw: fix bug re delivering start-worker
aerickson Oct 12, 2020
477b26a
linux gw: bug fix, use proper version var
aerickson Oct 13, 2020
50d1a63
specs: check that start-worker is present and +x
aerickson Oct 13, 2020
2fec59e
spec tweaks
aerickson Oct 13, 2020
921374b
linux_gw: use start-runner to launch g-w
aerickson Oct 13, 2020
b2507fc
linux gw: disbale reboot temporarily to debug issues
aerickson Oct 13, 2020
27293d9
linux_gw: fix run-start-worker invocation
aerickson Oct 13, 2020
c51ceb6
bootstrap: use apt-get, and -y
aerickson Oct 13, 2020
42da867
linux_gw: run-start-worker: re-enable reboot
aerickson Oct 13, 2020
4d5c7a1
bootstrap: need -y on remove also
aerickson Oct 13, 2020
6c2bb0c
deliver linux: chmod vault.yml
aerickson Oct 13, 2020
ab3e844
bootstrap: add success message, force reboot, ensure command doesn't …
aerickson Oct 13, 2020
b39c8f1
kitchen testing: use puppet 6
aerickson Oct 14, 2020
db0b3ec
run-start-worker: comment cleanup, create quarantine file first
aerickson Oct 14, 2020
29f3db9
linux_gw: start-worker: add hold file, refactor var usage
aerickson Oct 15, 2020
d989d93
linux_gw: start-worker: fix verbiage
aerickson Oct 15, 2020
61ca3e7
linux_base: add mercurial and git
aerickson Oct 15, 2020
bf58996
git fixing
aerickson Oct 15, 2020
cdbd865
linux_mercurial: add module with spec
aerickson Oct 16, 2020
8c7b357
mercurial: install v5.5.2 of mercurial's pips
aerickson Oct 16, 2020
4d9de86
linux_mercurial: add hgrc
aerickson Oct 16, 2020
a02a5ba
linux-mercurial: add cacert.pem
aerickson Oct 16, 2020
61eb792
remove ~cltbld/.hgrc
aerickson Oct 17, 2020
879b41e
remove .hgrc in cltbld user profile
aerickson Oct 17, 2020
5b69181
fix indent
aerickson Oct 17, 2020
d33e6ee
hgrc matches 1804 docker image
aerickson Oct 19, 2020
cbbf735
linux_gui: disable ubuntu-software service also
aerickson Oct 19, 2020
35eabdb
linux_gui: add missing file
aerickson Oct 19, 2020
25265de
disable_services: disable apport via defaults also
aerickson Oct 19, 2020
4201d3f
disable_services: missing file again
aerickson Oct 19, 2020
a058322
linux_gui: from 1804 docker, fonts config and xorg client tweak
aerickson Oct 19, 2020
1c44b3a
linux_talos: cleanup
aerickson Oct 19, 2020
f2af44a
talos gw profile cleanup
aerickson Oct 19, 2020
e9c3c0c
linux_gui: disable pip version warnings
aerickson Oct 19, 2020
9d59eb1
linux_gui: move pip.conf to proper location
aerickson Oct 19, 2020
742e9e1
linux_gui: create .config/pip/
aerickson Oct 19, 2020
44740fa
linux_gui: .config is created in linux_gw
aerickson Oct 19, 2020
5a3822d
linux_gui: add pulse config
aerickson Oct 19, 2020
5270497
linux_mercurial: change where we deliver our hgrc
aerickson Oct 19, 2020
93edc4e
mercurial spec: check for config
aerickson Oct 19, 2020
31b37ef
linux_gui: remove more packages
aerickson Oct 19, 2020
12be834
linux_gui: add some font packages (many already present)
aerickson Oct 19, 2020
318e0d0
linux_gui: refactoring, move removal and installation to appearance
aerickson Oct 19, 2020
9a0f367
add spec for font packages
aerickson Oct 19, 2020
ebe738a
spec refactoring
aerickson Oct 20, 2020
be7cc83
rename fonts spec
aerickson Oct 20, 2020
a127145
mercurial spec: bug fix
aerickson Oct 20, 2020
368dac7
linux_gui: create .config/pulse
aerickson Oct 20, 2020
f641680
delete packages absent spec
aerickson Oct 20, 2020
19ce0ab
disable apt automatic actions
aerickson Oct 20, 2020
bc1fed0
add grub module, linux_base uses it
aerickson Oct 20, 2020
40ea26a
linux_gui: disable gnome-initial-setup via file also
aerickson Oct 20, 2020
47942ec
linux_gui: remove unused mac files
aerickson Oct 20, 2020
04889fe
linux_gu::appearance: cleanup
aerickson Oct 20, 2020
4e87e7b
linux_gui: xvfb config: remove extra newline
aerickson Oct 20, 2020
515d0e8
linux_mercurial: remove unused files
aerickson Oct 20, 2020
b6f5268
services_disabled spec: remove newline
aerickson Oct 20, 2020
280a0b7
linux_gui: add missing file back, add spec
aerickson Oct 21, 2020
786401c
disable_services: fix apport disabling, add spec
aerickson Oct 21, 2020
82649f7
add linux_packages::tooltool, talos gw profile uses
aerickson Oct 21, 2020
f38b157
bug fix for prev commit
aerickson Oct 21, 2020
276a9a8
add securitize module, linux_base uses
aerickson Oct 22, 2020
b590080
securitize: also remove root's keys
aerickson Oct 22, 2020
67dd1e5
users_spec: bug fix
aerickson Oct 22, 2020
8dce0cf
linux_gui: don't try to uninstall gnome-initial-setup
aerickson Oct 22, 2020
7bae3eb
downgrade mercurial from 5.5.2 to 4.7.1
aerickson Oct 22, 2020
823f7c5
disable py3 mercurial
aerickson Oct 22, 2020
104042d
disable p3 mercurial spec also
aerickson Oct 22, 2020
f643a06
use mercurial 4.8.1 like 1804 docker image
aerickson Oct 22, 2020
c0719ee
add notes to linux_mercurial about versions
aerickson Oct 23, 2020
36b8ac4
disable_services: try another method to stop unattended-upgrades.service
aerickson Oct 26, 2020
5f081f7
grub: try to set timeout to 10 again
aerickson Oct 26, 2020
b15ac16
fix typo in prev commit
aerickson Oct 26, 2020
c11a4df
grub: fix typo in comment
aerickson Oct 26, 2020
6cae27e
linux_gw: start-worker: bug fix in operator mode
aerickson Oct 29, 2020
98e2328
linux_gw: looks for file created by run-puppet before starting
aerickson Oct 29, 2020
95fae7b
puppet: bug fix to run script
aerickson Oct 29, 2020
0817c33
users:ssh_authorized_keys_relops: add relops user's public key, spec …
aerickson Oct 29, 2020
0439e2c
travis: handle bug in pre-commit
aerickson Oct 29, 2020
057c23f
deliver script: add next steps
aerickson Oct 29, 2020
e0d39f6
deliver: quote
aerickson Oct 29, 2020
00db29d
travis: add note on pre-commit versions
aerickson Oct 30, 2020
2427c99
unpin pre-commit (bug fixed)
aerickson Nov 2, 2020
aedaee8
update robustcheckout with latest version from central@996f09f1cba5
aerickson Nov 10, 2020
4033398
deliver_linux: tweak recommended ssh config
aerickson Nov 18, 2020
5404f7d
linux_gw: start-worker: spin while operator_hold file exists (vs exit)
aerickson Nov 19, 2020
842be3f
bug fix for prev commit
aerickson Nov 19, 2020
1726ab2
puppet: ensure puppet 6 is gone now that 7 is out
aerickson Nov 19, 2020
73a93b0
puppetlabs upgraded the puppet6 repo to puppet7... no point in pinning
aerickson Nov 19, 2020
eca4cd3
fix puppet spec
aerickson Nov 30, 2020
fd7e8ec
change TC worker type to gecko-t-linux-talos-1804
aerickson Dec 1, 2020
f0a0762
bundle update
aerickson Dec 1, 2020
2a2af12
linux_talos_gw: atboot invocation points at my branch
aerickson Dec 2, 2020
467cb5c
Merge branch 'master' into moonshot_1804
aerickson Dec 2, 2020
235b49f
psutil py2: fix typo in requirements
aerickson Dec 11, 2020
e87ce46
users: relops user only has shared key
aerickson Dec 11, 2020
ca3b36d
Merge branch 'master' into moonshot_1804
aerickson Dec 15, 2020
1fcb534
Merge branch 'master' into moonshot_1804
aerickson Dec 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
379 changes: 185 additions & 194 deletions .gemfile.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .kitchen.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ provisioner:
hiera_deep_merge: true
hiera_writer_files:
- secrets/vault.yaml:
telegraf:
user: telegraf
password: telegraf4fun
linux_vnc:
user: cltbld
group: cltbld
Expand All @@ -34,6 +37,9 @@ provisioner:
bugzilla_api_key: 'BZ_KEY'
provision_command: locale-gen en_US.UTF-8; apt-get install dbus
puppet_verbose: true
# explodes if specified, defaults to latest/6
# https://github.com/petems/puppet-install-shell/issues/137
# puppet_version: 6
puppet_debug: true
require_chef_for_busser: true
require_puppet_omnibus: true
Expand Down
4 changes: 4 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ provisioner:
hiera_deep_merge: true
hiera_writer_files:
- secrets/vault.yaml:
telegraf:
user: telegraf
password: telegraf4fun
linux_vnc:
user: cltbld
group: cltbld
Expand All @@ -29,6 +32,7 @@ provisioner:
quarantine_access_token: 'Q_TOKEN'
bugzilla_api_key: 'BZ_KEY'
puppet_verbose: true
puppet_version: 6
puppet_debug: true
require_chef_for_busser: false
require_puppet_omnibus: true
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
- #2 Profiles can't be called/included inside (component) modules.
- #3 Hiera lookups should only be done within profiles and then passed as args to the class.

For more information see: https://puppet.com/docs/pe/2018.1/the_roles_and_profiles_method.html
More information:
- https://puppet.com/docs/pe/2018.1/the_roles_and_profiles_method.html
- https://puppet.com/docs/pe/2017.2/r_n_p_intro.html

## testing

Expand Down
5 changes: 5 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ all_users:

bclary:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjEqpf1njrTlmvBMhfKJiQFP92uuS2EFIoL/f2u/39Q83Opk7T3mFOEvmnBNy83J7/k7j21VMzovdylsLk169x6NqPMZZ7sdtNW/WAiImUyWAVkuszkl7rbh8XdgF/UzTi8uHUAVZI/8gsh8g3wQ9h61BOWX7GEag99pho+ECpEGDjb3HXOD4B4vr/qZO5eMIssHzCKDXWchOpwlNPYk5Yij61+Hm/eTobSFLk7Rk1RGjuwcKpJUG8D3MmfTPY7I4YFA+i6TaQJJj/OdWguH599R/SIU6cVoqsQee9GDD2sSxsuDeop7ckM27kfklL2APeG2UBZ8Ugsnw7niJx9LJxk9PUY4ohs2LrNlwrEiB8Uq5yw9PF6Ik3aD4y8mHXSV/xajMA6s67XwdCZd51DwEZ9Q7h8ULsq1kpDvXx7+9OZ/xwucTuiH9sbvf438gx0/E+GAg24qhvQPQdA7+W2T2CJJPEhoe3OlJRibOgFHm1CmV3h6F34e5g8qz2kPGcNEu/toB9+14YyQfP7nZrz4UnHw3bJcNEHvl1JaSDcm2GiE3Nu0MYeAtnmWOA3AFs6IhkEvwFeY3lE1n6oyKB7XGeNxdrRTCMckM/ojoo9Hi3NbZ0giorM5vKcSeOE/iLtSDdaE1cUFdgrBqv6mBGxuGHukWmZNh+Z2o16RhQWZK1NQ== bclary@mozilla.com

# from relops_common_keys_2020-09-08.yml
relops:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILB0k0dwdH7h8j+zRPprLFeTgRwkgI6mcjQCeEoaqOY2 Relops ed25519 Key

notary1:
- ssh-rsa AAAA invalid@mozilla.com
notary2:
Expand Down
4 changes: 4 additions & 0 deletions modules/disable_services/files/10periodic
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
APT::Periodic::Enable "0";
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
2 changes: 2 additions & 0 deletions modules/disable_services/files/20auto-upgrades
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
1 change: 1 addition & 0 deletions modules/disable_services/files/apport
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enabled=0
79 changes: 79 additions & 0 deletions modules/disable_services/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

class disable_services() {
case $::operatingsystem {
'Ubuntu': {
# These packages are required by ubuntu-desktop, so we can't uninstall them.
# Instead, install but disable them.
case $::operatingsystemrelease {
'18.04': {
# acpi removed because it can't be disabled this way
# (never worked in build-puppet/16.04)
$install_and_disable = [ 'cups', 'anacron',
'whoopsie', 'modemmanager', 'apport',
'avahi-daemon', 'network-manager' ]
package {
$install_and_disable:
ensure => latest;
}
service {
$install_and_disable:
ensure => stopped,
provider => 'systemd',
enable => false,
require => Package[$install_and_disable];
}

# disable apport via defaults also
file {
'/etc/default/apport':
source => "puppet:///modules/${module_name}/apport";
}

# this package and service have different names
package {
'bluez':
ensure => latest;
}
service {
'bluetooth':
ensure => stopped,
provider => 'systemd',
enable => false,
require => Package['bluez'];
}

# disable periodic apt actions
file {
'/etc/apt/apt.conf.d/10periodic':
ensure => file,
owner => 'root',
group => 'root',
source => "puppet:///modules/${module_name}/10periodic";

'/etc/apt/apt.conf.d/20auto-upgrades':
ensure => file,
owner => 'root',
group => 'root',
source => "puppet:///modules/${module_name}/20auto-upgrades";
}

# stop 'unattended-upgrades' processes, disabled in /etc/apt/apt.conf.d/20auto-upgrades
# but still showing up
service { 'unattended-upgrades':
ensure => stopped,
enable => false,
}
}
default: {
fail("Unrecognized Ubuntu version ${::operatingsystemrelease}")
}
}
}
default: {
fail("gui is not supported on ${::operatingsystem}")
}
}
}
46 changes: 46 additions & 0 deletions modules/grub/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
class grub (
# dhouse is testing grub logging, but not working yet
$log_aggregator_host = 'log-aggregator2.srv.releng.mdc2.mozilla.com',
$log_aggregator_port = 514,
){
case $::operatingsystem {
'Ubuntu': {
case $::operatingsystemrelease {
'18.04': {

# 1804/lvm/efi has issues with setting a timeout.
# - we set GRUB_RECORDFAIL_TIMEOUT to work around this.
#
# more info:
# - https://forums.linuxmint.com/viewtopic.php?f=46&t=287026#p1588204
# - https://askubuntu.com/questions/1164407/grub-is-ignoring-settings-in-etc-default-grub-single-boot-system

package {
'grub2-common':
ensure => present;
}
file {
'/etc/default/grub':
ensure => present,
content => template('grub/default-grub.erb'),
notify => Exec['update-grub'];
}
exec { 'update-grub':
command => '/usr/sbin/update-grub',
subscribe => File['/etc/default/grub'],
refreshonly => true,
}
}
default: {
fail("cannot install on ${::operatingsystemrelease}")
}
}
}
default: {
fail("cannot install on ${::operatingsystem}")
}
}
}
44 changes: 44 additions & 0 deletions modules/grub/templates/default-grub.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_RECORDFAIL_TIMEOUT=10 # EFI/LVM uses this for all boots
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
# notes on grub options
# - 'dis_ucode_ldr': makes certain problematic moonshot nodes boot, otherwise they hang at purple screen
# - 'debug': debug output for developers, potentially alarming in a red herring way
GRUB_CMDLINE_LINUX="nosplash console=ttyS0,9600n8r console=tty0 log_host=<%= @log_aggregator_host %> log_port=<%= @log_aggregator_port %> dis_ucode_ldr"

# from build-puppet
#
# GRUB_HIDDEN_TIMEOUT=0
# GRUB_HIDDEN_TIMEOUT_QUIET=true
# GRUB_TIMEOUT=10
# GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
33 changes: 33 additions & 0 deletions modules/grub/templates/default-grub.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="nosplash debug console=ttyS0,9600n8r console=tty0"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
31 changes: 25 additions & 6 deletions modules/linux_generic_worker/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
String $generic_worker_sha256,
Pattern[/^v\d+\.\d+\.\d+$/] $taskcluster_proxy_version,
String $taskcluster_proxy_sha256,
Pattern[/^v\d+\.\d+\.\d+$/] $livelog_version,
String $livelog_sha256,
Pattern[/^v\d+\.\d+\.\d+$/] $start_worker_version,
String $start_worker_sha256,
Pattern[/^v\d+\.\d+\.\d+$/] $quarantine_worker_version,
String $quarantine_worker_sha256,
String $taskcluster_host = 'taskcluster',
Expand All @@ -33,6 +37,10 @@
generic_worker_sha256 => $generic_worker_sha256,
taskcluster_proxy_version => $taskcluster_proxy_version,
taskcluster_proxy_sha256 => $taskcluster_proxy_sha256,
livelog_version => $livelog_version,
livelog_sha256 => $livelog_sha256,
start_worker_version => $start_worker_version,
start_worker_sha256 => $start_worker_sha256,
quarantine_worker_version => $quarantine_worker_version,
quarantine_worker_sha256 => $quarantine_worker_sha256
}
Expand Down Expand Up @@ -76,30 +84,41 @@
$reboot_command = '/usr/bin/sudo /sbin/reboot --force'

file {
default: * => $::shared::file_defaults;
default:
owner => $user,
# TODO: take this as an arg, don't assume
group => $user;

["${user_homedir}/.config",
"${user_homedir}/.config/autostart"]:
ensure => directory;
"${user_homedir}/.config/autostart/gnome-terminal.desktop":
content => template('linux_generic_worker/gnome-terminal.desktop.erb');

'/usr/local/bin/run-generic-worker.sh':
["${user_homedir}/tasks", "${user_homedir}/downloads"]:
ensure => directory;

'/usr/local/bin/run-start-worker.sh':
ensure => present,
content => template('linux_generic_worker/run-generic-worker.sh.erb'),
content => template('linux_generic_worker/run-start-worker.sh.erb'),
owner => root,
group => root,
mode => '0755';

'/etc/generic-worker.config':
'/etc/start-worker.yml':
ensure => present,
content => template('linux_generic_worker/generic-worker.config.erb'),
content => template('linux_generic_worker/worker-runner-config.yml.erb'),
owner => root,
group => root,
mode => '0644';

'/var/log/genericworker':
ensure => directory,
mode => '0777';
}

# TODO: see below
# TODO: cleanup
# from build-puppet, seems not needed for modern talos/raptor

# host { $taskcluster_host:
# ip => '127.0.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
"clientId": "<%= @taskcluster_client_id %>",
"deploymentId": "",
"downloadsDir": "<%= @downloads_dir %>",
"idleTimeoutSecs": 345600,
"instanceId": "",
"instanceType": "",
"livelogExecutable": "livelog",
"livelogPUTPort": 60022,
"numberOfTasksToRun": 1,
"privateIP": "",
"provisionerId": "releng-hardware",
Expand All @@ -20,7 +18,6 @@
"requiredDiskSpaceMegabytes": 10240,
"rootURL": "https://firefox-ci-tc.services.mozilla.com",
"runAfterUserCreation": "",
"runTasksAsCurrentUser": true,
"sentryProject": "generic-worker",
"shutdownMachineOnIdle": false,
"shutdownMachineOnInternalError": false,
Expand All @@ -31,8 +28,8 @@
"workerGroup": "<%= @worker_group %>",
"workerId": "<%= @hostname %>",
"workerType": "<%= @worker_type %>",
"wstAudience": "taskcluster-net",
"wstServerURL": "https://websocktunnel.tasks.build",
"wstAudience": "firefoxcitc",
"wstServerURL": "https://firefoxci-websocktunnel.services.mozilla.com/",
"workerTypeMetadata": {
"machine-setup": {
"config": "https://github.com/mozilla-platform-ops/ronin_puppet/raw/master/modules/linux_generic_worker/templates/generic-worker.config.erb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
[Desktop Entry]
Type=Application
Exec=gnome-terminal -x /usr/local/bin/run-generic-worker.sh run --config /etc/generic-worker.config
Exec=gnome-terminal -x /usr/local/bin/run-start-worker.sh /etc/start-worker.yml
Hidden=false
X-GNOME-Autostart-enabled=true
Name=Generic-Worker
Comment=Start generic-worker in a terminal session
StartupNotify=false
Terminal=false
Type=Application