-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathservidor.yaml
38 lines (32 loc) · 1.06 KB
/
servidor.yaml
1
2
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
#cloud-config
hostname: servidor
manage_etc_hosts: true
users:
- name: ops
sudo: ['ALL=(ALL) NOPASSWD:ALL']
shell: /bin/bash
plain_text_passwd: felizcumpledocker
lock_passwd: false
ssh_pwauth: true
chpasswd: { expire: false }
groups: sudo
package_update: true
package_upgrade: false
packages:
- ntp
locale: "en_US.UTF-8"
timezone: "America/La_Paz"
runcmd:
- systemctl disable docker
- systemctl stop docker
- echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf
- echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf
- echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.d/99-sysctl.conf
- sysctl -p
- echo "Port 4444" >> /etc/ssh/sshd_config
- systemctl restart sshd
- mkdir -p /mnt/data
- echo "/dev/sda /mnt/data/ ext4 defaults,noatime 0 1" >> /etc/fstab
- mount --all
- curl -sfL https://get.k3s.io | K3S_CLUSTER_SECRET=felizcumpledocker INSTALL_K3S_EXEC="--no-deploy traefik --no-deploy servicelb --write-kubeconfig /home/ops/kubeconfig" sh -
- systemctl enable k3s