-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloud-init.yaml
36 lines (35 loc) · 2.02 KB
/
cloud-init.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
#cloud-config
users:
- name: ctheory
groups: sudo
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzdwD5nG+og435muHDSXpRKxtjyeegxppl13FKijulK4Emq+svRq3He1m6+GjiMIogLQGZglzfoDI771Lk0m35yYr2qFdvzvwc3/uw/N0Pf0GuGDnE96smlrxLDZ6NW6Dx0nGyS7K9EhRwkfq3J5blizylu+O9GcYifsZ48vsOdpF/r2tqUfR0TlVH8JHgcENyK8oGzNjZj+PQEum208evI1M51UxGoCPrqN4wIy193Ffbu18arKdcWW4+zZGz7zZYJrrgaHrbMC9mYTyBrarfQdpjj+eEDH+WAMOq/u5d+CUXsn/HiTQY1geE+8YmOrj24wUK61XE+n5oR4G0AIAR [email protected]
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4BZ1INRbqsWaQw7aSqizooyY4UV5rhmGQzGMl86QHz5H/uT+HSFpl/ruU5v5egGDwoHAAO2E0kCb8kfEOddWl1/AqzN5azIwytmwiClU8lEJQ4U7B2bs/dFi3hyQDORRwKOFX6lh175rfN21rXZ0h6/jz5wzqtytJTu5D+yWhHQ1X3Ks+yEQncOYjlza5ZMaCydUWElwf/hvWOh+nptDvgIqYv/dqFR+h/Gp24scFrmlQOwDzXmw5GfBXewIIFr/HqxfgbjGLCgS69xJC5tsk+ZjYIrD6fGgxxOimZStu0hSYEhEyA4Y2YIeS9ULL2YfKAzHNR0q9toVu4zC4Lxo5 mobile
power_state:
mode: reboot
runcmd:
- export DEBIAN_FRONTEND=noninteractive
- sudo systemctl stop apt-daily.timer
- sudo systemctl disable apt-daily.timer
- sudo systemctl mask apt-daily.service
- sudo systemctl stop apt-daily.service
- sudo systemctl daemon-reload
- sudo killall apt.systemd.daily || echo "apt.systemd.daily is not running"
- sudo apt-get update
- sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install -y docker-ce
- sudo usermod -aG docker ctheory
- echo "Creating swapfile"
- sudo fallocate -l 1G /swapfile
- sudo chmod 600 /swapfile
- sudo mkswap /swapfile
- sudo swapon /swapfile
- echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
- echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
- echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf