You've already forked net-research
77 lines
1.8 KiB
Smarty
77 lines
1.8 KiB
Smarty
#cloud-config
|
|
hostname: client
|
|
manage_etc_hosts: false
|
|
|
|
users:
|
|
- name: ubuntu
|
|
gecos: ubuntu
|
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
lock_passwd: false
|
|
ssh_pwauth: true
|
|
shell: /bin/bash
|
|
|
|
ssh_pwauth: true
|
|
chpasswd:
|
|
list: |
|
|
ubuntu:ubuntu
|
|
expire: false
|
|
|
|
growpart:
|
|
mode: auto
|
|
devices: ["/"]
|
|
|
|
package_update: true
|
|
package_upgrade: false
|
|
packages:
|
|
- tftp-hpa
|
|
|
|
write_files:
|
|
- path: /etc/hosts
|
|
append: true
|
|
encoding: b64
|
|
content: ${hosts_file}
|
|
- path: /etc/networkd-dispatcher/routable.d/10-disable-offloading
|
|
owner: root:root
|
|
permissions: "0755"
|
|
content: |
|
|
#!/bin/bash
|
|
for IF in $(networkctl list --no-legend | awk '/ routable /{print $2}'); do
|
|
/usr/sbin/ethtool -K "$IF" \
|
|
rx off tx off sg off tso off ufo off gso off gro off lro off \
|
|
ntuple off rxhash off rx-gro-hw off || true
|
|
done
|
|
- path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
|
|
permissions: '0644'
|
|
content: |
|
|
network: {config: disabled}
|
|
- path: /etc/netplan/01-static.yaml
|
|
owner: root:root
|
|
permissions: '0644'
|
|
content: |
|
|
network:
|
|
version: 2
|
|
renderer: networkd
|
|
ethernets:
|
|
enp1s0:
|
|
dhcp4: false
|
|
addresses: [${ip}]
|
|
gateway4: ${gateway}
|
|
nameservers:
|
|
addresses: ${nameservers}
|
|
|
|
modules:
|
|
- tcp_bbr
|
|
- sch_netem
|
|
|
|
runcmd:
|
|
- rm -f /etc/netplan/50-cloud-init.yaml
|
|
- netplan generate && netplan apply
|
|
|
|
- |
|
|
wget https://github.com/stunnel/static-curl/releases/download/8.14.1/curl-linux-x86_64-dev-8.14.1.tar.xz \
|
|
-O /tmp/curl-linux-x86_64-dev-8.14.1.tar.xz \
|
|
&& cd /tmp && tar xf curl-linux-x86_64-dev-8.14.1.tar.xz && rm curl-linux-x86_64-dev-8.14.1.tar.xz \
|
|
&& mv ./curl-x86_64/bin/curl /home/ubuntu/
|
|
|
|
- chown -R ubuntu /home/ubuntu/ && chgrp -R ubuntu /home/ubuntu/
|