forked from cloud-pool-managers/vm-pool-managers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloud-init_script
More file actions
76 lines (65 loc) · 1.89 KB
/
Copy pathcloud-init_script
File metadata and controls
76 lines (65 loc) · 1.89 KB
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
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: false
packages:
- build-essential
- procps
- curl
- file
- git
- ca-certificates
- gnupg
- lsb-release
- postgresql
- postgresql-contrib
- npm
- acl
runcmd:
# ---------- Docker (repo officiel) ----------
- |
curl -fsSL https://get.docker.com | sh
systemctl enable docker
systemctl start docker
usermod -aG docker ubuntu
# ---------- Go ----------
- |
GO_VERSION="1.22.1"
curl -fsSL https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz -o /tmp/go.tar.gz
rm -rf /usr/local/go
tar -C /usr/local -xzf /tmp/go.tar.gz
echo 'export PATH=/usr/local/go/bin:$PATH' > /etc/profile.d/go.sh
chmod 644 /etc/profile.d/go.sh
chmod +x /etc/profile.d/go.sh
# ---------- rclone ----------
- curl -fsSL https://rclone.org/install.sh | bash
# ---------- Node.js (LTS) ----------
- curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
- apt-get install -y nodejs
# ---------- gRPC / Protobuf ----------
- apt-get install -y protobuf-compiler
- |
sudo -u ubuntu bash -c '
source /etc/profile.d/go.sh
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
'
# ---------- ConnectRPC ----------
- |
sudo -u ubuntu bash -c '
source /etc/profile.d/go.sh
go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest
'
# ---------- Task ----------
- |
curl -fsSL https://taskfile.dev/install.sh | sh -s -- -b /usr/local/bin
# ---------- NVM ----------
- |
sudo -u ubuntu bash -c '
export HOME=/home/ubuntu
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install 20
nvm alias default 20
'