Puppet Class: profile::envoy::builder
- Defined in:
- modules/profile/manifests/envoy/builder.pp
Overview
SPDX-License-Identifier: Apache-2.0 Add tools to build envoy
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'modules/profile/manifests/envoy/builder.pp', line 3
class profile::envoy::builder {
# we need a very large /tmp because the envoy build dumps more than 100 GB of
# waste into it.
labs_lvm::volume { 'tmp':
size => '50%FREE',
mountat => '/tmp',
mountmode => '777',
}
# We need some space to use pbuilder with.
labs_lvm::volume { 'pbuilder':
size => '20%FREE',
mountat => '/var/cache/pbuilder'
}
# Where the source code for envoy is going to be, and also the produced artifacts.
labs_lvm::volume { 'sources':
size => '10G',
mountat => '/usr/src',
}
# We also need a volume to use for docker.
labs_lvm::volume { 'docker':
size => '10%FREE',
mountat => '/var/lib/docker',
before => Class['docker'],
}
# Now let's ensure envoy sources are checked out
git::clone { 'operations/debs/envoyproxy':
directory => '/usr/src/envoyproxy',
require => Labs_lvm::Volume['sources']
}
systemd::timer::job { 'git_pull_envoy':
ensure => present,
description => 'Pull changes on the envoyproxy repo',
command => '/bin/bash -c "cd /usr/src/envoyproxy && /usr/bin/git pull --rebase --tags>/dev/null 2>&1"',
interval => {
'start' => 'OnUnitInactiveSec',
'interval' => '60s',
},
logging_enabled => false,
monitoring_contact_groups => 'admins',
user => 'root',
}
# Install an ugly script that automates building envoy.
file { '/usr/local/bin/build-envoy-deb':
source => 'puppet:///modules/profile/envoy/build_envoy_deb.sh',
owner => 'root',
group => 'root',
mode => '0544',
}
}
|