Compare commits
No commits in common. "015fe2ee315097f25707b99a88c021b78ee0c408" and "248a624f22e8b6c2f6d91dbe2425b0e111acc0bf" have entirely different histories.
015fe2ee31
...
248a624f22
cookbooks
@ -8,33 +8,16 @@ end
|
|||||||
|
|
||||||
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
|
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
|
||||||
when "24.04"
|
when "24.04"
|
||||||
execute "change link to /etc/resolv.conf" do
|
remote_file '/etc/systemd/resolved.conf' do
|
||||||
command "ln -fs /run/systemd/resolve/resolv.conf /etc/resolv.conf"
|
|
||||||
end
|
|
||||||
|
|
||||||
directory "/etc/systemd/resolved.conf.d/" do
|
|
||||||
mode "0755"
|
|
||||||
owner "root"
|
|
||||||
group "root"
|
|
||||||
end
|
|
||||||
|
|
||||||
template '/etc/systemd/resolved.conf.d/partial.conf' do
|
|
||||||
owner 'root'
|
owner 'root'
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
source 'templates/etc/systemd/resolved.conf.d/partial.conf.erb'
|
source 'files/etc/systemd/resolved.conf.2404'
|
||||||
variables(dns: node['consul']['dns'])
|
|
||||||
|
|
||||||
notifies :restart, 'service[systemd-resolved]', :immediately
|
notifies :restart, 'service[systemd-resolved]', :immediately
|
||||||
end
|
end
|
||||||
|
|
||||||
remote_file "/etc/default/dnsmasq" do
|
|
||||||
mode "0644"
|
|
||||||
owner "root"
|
|
||||||
group "root"
|
|
||||||
end
|
|
||||||
|
|
||||||
remote_file '/etc/dnsmasq.conf' do
|
remote_file '/etc/dnsmasq.conf' do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
group 'root'
|
group 'root'
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
# This file has six functions:
|
|
||||||
# 1) to completely disable starting this dnsmasq instance
|
|
||||||
# 2) to set DOMAIN_SUFFIX by running `dnsdomainname`
|
|
||||||
# 3) to select an alternative config file
|
|
||||||
# by setting DNSMASQ_OPTS to --conf-file=<file>
|
|
||||||
# 4) to tell dnsmasq to read the files in /etc/dnsmasq.d for
|
|
||||||
# more configuration variables.
|
|
||||||
# 5) to stop the resolvconf package from controlling dnsmasq's
|
|
||||||
# idea of which upstream nameservers to use.
|
|
||||||
# 6) to avoid using this dnsmasq instance as the system's default resolver
|
|
||||||
# by setting DNSMASQ_EXCEPT="lo"
|
|
||||||
# For upgraders from very old versions, all the shell variables set
|
|
||||||
# here in previous versions are still honored by the init script
|
|
||||||
# so if you just keep your old version of this file nothing will break.
|
|
||||||
|
|
||||||
#DOMAIN_SUFFIX=`dnsdomainname`
|
|
||||||
#DNSMASQ_OPTS="--conf-file=/etc/dnsmasq.alt"
|
|
||||||
|
|
||||||
# The dnsmasq daemon is run by default conforming to the Debian Policy.
|
|
||||||
# To disable the service,
|
|
||||||
# for SYSV init, use "update-rc.d dnsmasq disable",
|
|
||||||
# for systemd, use "systemctl disable dnsmasq".
|
|
||||||
|
|
||||||
# By default search this drop directory for configuration options.
|
|
||||||
# Libvirt leaves a file here to make the system dnsmasq play nice.
|
|
||||||
# Comment out this line if you don't want this. The dpkg-* are file
|
|
||||||
# endings which cause dnsmasq to skip that file. This avoids pulling
|
|
||||||
# in backups made by dpkg.
|
|
||||||
CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
|
|
||||||
|
|
||||||
# If the resolvconf package is installed, dnsmasq will use its output
|
|
||||||
# rather than the contents of /etc/resolv.conf to find upstream
|
|
||||||
# nameservers. Uncommenting this line inhibits this behaviour.
|
|
||||||
# Note that including a "resolv-file=<filename>" line in
|
|
||||||
# /etc/dnsmasq.conf is not enough to override resolvconf if it is
|
|
||||||
# installed: the line below must be uncommented.
|
|
||||||
IGNORE_RESOLVCONF=yes
|
|
||||||
|
|
||||||
# If the resolvconf package is installed, dnsmasq will tell resolvconf
|
|
||||||
# to use dnsmasq under 127.0.0.1 as the system's default resolver.
|
|
||||||
# Uncommenting this line inhibits this behaviour.
|
|
||||||
#DNSMASQ_EXCEPT="lo"
|
|
37
cookbooks/consul/files/etc/systemd/resolved.conf.2404
Normal file
37
cookbooks/consul/files/etc/systemd/resolved.conf.2404
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# This file is part of systemd.
|
||||||
|
#
|
||||||
|
# systemd is free software; you can redistribute it and/or modify it under the
|
||||||
|
# terms of the GNU Lesser General Public License as published by the Free
|
||||||
|
# Software Foundation; either version 2.1 of the License, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# Entries in this file show the compile time defaults. Local configuration
|
||||||
|
# should be created by either modifying this file (or a copy of it placed in
|
||||||
|
# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in
|
||||||
|
# the /etc/systemd/resolved.conf.d/ directory. The latter is generally
|
||||||
|
# recommended. Defaults can be restored by simply deleting the main
|
||||||
|
# configuration file and all drop-ins located in /etc/.
|
||||||
|
#
|
||||||
|
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
|
||||||
|
#
|
||||||
|
# See resolved.conf(5) for details.
|
||||||
|
|
||||||
|
[Resolve]
|
||||||
|
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
|
||||||
|
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
|
||||||
|
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
|
||||||
|
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
|
||||||
|
DNS=127.0.0.1
|
||||||
|
#FallbackDNS=
|
||||||
|
#Domains=
|
||||||
|
#DNSSEC=no
|
||||||
|
#DNSOverTLS=no
|
||||||
|
#MulticastDNS=no
|
||||||
|
#LLMNR=no
|
||||||
|
#Cache=no-negative
|
||||||
|
#CacheFromLocalhost=no
|
||||||
|
DNSStubListener=no
|
||||||
|
#DNSStubListenerExtra=
|
||||||
|
#ReadEtcHosts=yes
|
||||||
|
#ResolveUnicastSingleLabel=no
|
||||||
|
#StaleRetentionSec=0
|
@ -1,3 +0,0 @@
|
|||||||
[Resolve]
|
|
||||||
DNS=127.0.0.1
|
|
||||||
DNSStubListener=no
|
|
@ -3,7 +3,7 @@
|
|||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
node.reverse_merge!({
|
node.reverse_merge!({
|
||||||
'nginx' => {
|
'nginx' => {
|
||||||
'version' => '1.26.1',
|
'version' => '1.26.0',
|
||||||
'skip_lego' => true,
|
'skip_lego' => true,
|
||||||
'skip_webadm' => false,
|
'skip_webadm' => false,
|
||||||
'skip_deploy_conf' => true
|
'skip_deploy_conf' => true
|
||||||
|
@ -31,7 +31,14 @@ directory '/opt/cni/bin' do
|
|||||||
mode '0755'
|
mode '0755'
|
||||||
end
|
end
|
||||||
|
|
||||||
execute "eget containernetworking/plugins --to /opt/cni/bin --upgrade-only -a ^sha --all"
|
%w( bandwidth bridge dhcp firewall host-device host-local ipvlan loopback macvlan portmap ptp sbr static tuning vlan vrf ).each do |f|
|
||||||
|
remote_file "/opt/cni/bin/#{f}" do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
|
||||||
|
mode '0775'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
directory '/etc/cni' do
|
directory '/etc/cni' do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
|
@ -4,12 +4,9 @@ include_recipe './install.rb'
|
|||||||
|
|
||||||
if node['nomad']['client']
|
if node['nomad']['client']
|
||||||
include_recipe '../docker/default.rb'
|
include_recipe '../docker/default.rb'
|
||||||
include_recipe './csi.rb'
|
|
||||||
|
|
||||||
package "consul-cni"
|
|
||||||
package "dmidecode"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if node['nomad']['manager'] || node['nomad']['client']
|
if node['nomad']['manager'] || node['nomad']['client']
|
||||||
include_recipe './setup.rb'
|
include_recipe './setup.rb'
|
||||||
|
include_recipe './csi.rb'
|
||||||
end
|
end
|
||||||
|
BIN
cookbooks/nomad/files/opt/cni/bin/bandwidth
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/bandwidth
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/bridge
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/bridge
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/dhcp
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/dhcp
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/firewall
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/firewall
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/host-device
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/host-device
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/host-local
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/host-local
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/ipvlan
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/ipvlan
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/loopback
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/loopback
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/macvlan
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/macvlan
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/portmap
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/portmap
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/ptp
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/ptp
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/sbr
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/sbr
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/static
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/static
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/tuning
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/tuning
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/vlan
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/vlan
Normal file
Binary file not shown.
BIN
cookbooks/nomad/files/opt/cni/bin/vrf
Normal file
BIN
cookbooks/nomad/files/opt/cni/bin/vrf
Normal file
Binary file not shown.
@ -1,6 +1,5 @@
|
|||||||
# Kernel parameters:
|
# Kernel parameters:
|
||||||
execute 'modprobe br_netfilter'
|
execute 'modprobe br_netfilter'
|
||||||
execute 'modprobe bridge'
|
|
||||||
|
|
||||||
remote_file '/etc/sysctl.d/90-nomad.conf' do
|
remote_file '/etc/sysctl.d/90-nomad.conf' do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
|
Loading…
Reference in New Issue
Block a user