Skip to content

DO-2K23-26/beep-infrastructure

Repository files navigation

Beep VPS

Description

For the Beep project, we need a VPS to host some services and the different environments of beep (staging, prod). The infrastructure would like to be as automated as possible. For start we will need to install a k3s cluster on a VPS after this the different services will be deployed on the cluster by CI/CD with terraform.

Endpoints

Access to the different services deployed on the VPS.

Initial setup

Update

sudo apt update && sudo apt upgrade
sudo apt clean

Add do user

sudo adduser do
sudo usermod -aG sudo do
sudo mkdir /home/do/.ssh
sudo nano /home/do/.ssh/authorized_keys # Add all do2023-26 keys
sudo chown -R do:do /home/do/.ssh
sudo chmod 700 /home/do/.ssh
sudo chmod 600 /home/do/.ssh/authorized_keys

Delete default user

sudo deluser --remove-home ubuntu # Delete default user (ubuntu, debian, etc)

SSH

sudo nano /etc/ssh/sshd_config # Change PermitRootLogin (no), PasswordAuthentication (no), PubkeyAuthentication (yes)

Install k3s

curl -sfL https://get.k3s.io | sh - 
sudo k3s kubectl get nodes # Check if k3s is installed

Get kubeconfig

sudo cat /etc/rancher/k3s/k3s.yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages