Skip to content

Instantly share code, notes, and snippets.

@j-brn
Created March 17, 2021 19:17
Show Gist options
  • Select an option

  • Save j-brn/292993c44808c2cedcc5ffb1683868cf to your computer and use it in GitHub Desktop.

Select an option

Save j-brn/292993c44808c2cedcc5ffb1683868cf to your computer and use it in GitHub Desktop.
RKE Host
#cloud-config
users:
- name: admin
ssh-authorized_keys:
- <your keys go here>
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups:
- sudo
- docker
shell: /bin/bash
package_update: true
package_upgrade: true
package_reboot_if_required: true
packages:
- vim
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
runcmd:
- curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- apt-get update -y
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose
- modprobe ip_set
- modprobe ip_set_hash_ip
- modprobe ip_set_hash_net
- modprobe iptable_filter
- modprobe iptable_nat
- modprobe iptable_mangle
- modprobe iptable_raw
- modprobe nf_conntrack_ipv4
- modprobe nf_nat_masquerade_ipv4
- modprobe vxlan
- modprobe xt_comment
- modprobe xt_mark
- modprobe xt_multiport
- modprobe xt_recent
- modprobe xt_set
- sysctl -w net.bridge.bridge-nf-call-iptables=1
write_files:
- path: /etc/ssh/sshd_config
content: |
Protocol 2
Port 222
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTH
LogLevel INFO
PermitRootLogin no
StrictModes yes
IgnoreRhosts yes
PubkeyAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding no
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
AllowUsers admin
AllowTcpForwarding yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment