-
Notifications
You must be signed in to change notification settings - Fork 1
/
gameci-runner-ubuntu.yaml
82 lines (82 loc) · 2.56 KB
/
gameci-runner-ubuntu.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#cloud-config
disable_root: false
network:
config: disabled
groups:
- docker
users:
- name: ${USERNAME}
groups: users, admin, docker, sudo, kvm
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
lock_passwd: false
passwd: ${PASSWORD}
ssh_authorized_keys:
- ${VM_KEY}
ssh_import_id:
- gh:${GITHUB_USER}
package_update: true
package_upgrade: true
packages:
- wireguard
- ssh-import-id
- sudo
- curl
- tmux
- netplan.io
- apt-transport-https
- ca-certificates
- software-properties-common
- htop
- git-extras
- rsyslog
- fail2ban
- vim
- gpg
- open-iscsi
- nfs-common
- ncdu
- zip
- unzip
- iotop
- gcc
- ubuntu-drivers-common
- kmod
- make
- pkg-config
- libvulkan1
runcmd:
#####################
# Install linux headers
- linux-headers-generic
######################
# Install YQ
- wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\
- chmod +x /usr/bin/yq
######################
# Install Docker
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- sudo apt-get update
- sudo apt-get install -y docker-ce
########################
# Install Docker Compose
- sudo -u ${USERNAME} -i mkdir -p /home/${USERNAME}/.docker/cli-plugins/
- sudo -u ${USERNAME} -i curl -SL https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-linux-x86_64 -o /home/${USERNAME}/.docker/cli-plugins/docker-compose
- sudo chmod +x /home/${USERNAME}/.docker/cli-plugins/docker-compose
########################
# Brew and Python3
- wget https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
- chmod +x /install.sh
- chmod 777 /install.sh
- sudo -u ${USERNAME} NONINTERACTIVE=1 /bin/bash /install.sh
- sudo -u ${USERNAME} /home/linuxbrew/.linuxbrew/bin/brew shellenv >> /home/${USERNAME}/.profile
- sudo -u ${USERNAME} /home/linuxbrew/.linuxbrew/opt/python@3.11/libexec/bin >> /home/${USERNAME}/.profile
- sudo -u ${USERNAME} /home/linuxbrew/.linuxbrew/bin/brew install python@3.11
- sudo chown -R ${USERNAME}:${USERNAME} /home/linuxbrew
- sudo chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
########################
# Start fail2ban
- sudo systemctl enable fail2ban
- sudo systemctl start fail2ban
- reboot