docs-onboarding/vms-and-lxcs.md

38 lines
1.8 KiB
Markdown
Raw Normal View History

# Basic Know-How about VMs and LXC containers
## Main assumption and general conditions
### Microsft Azure compatible Linux Distributions
We love Debian, but it's not well supported by Microsoft Azure. Thus we are going mainstream and use Ubuntu.
### IaC vs. CaC
Infratsructure as Code (IaC) is how we deploy virtual bare-metal. We are using Terraform for that.
Configuration as Code (CaC) is how we configure the VMs and LXC containers and install software. We are using Ansible for that.
We are defining the boundary between IaC and CaC as follows:
- IaC is responsible for the VMs and LXC containers, the network, and the storage.
- IaC ends as soon as the VMs and LXC containers are up and running.
- SSH keys are installed by IaC.
- CaC is responsible for the software installed on the VMs and LXC containers.
- CaC uses the SSH keys installed by IaC to connect to the VMs and LXC containers.
### Cloud-init VM template
Our hypervisor is Proxmox, which is based on Debian. We are using the [Proxmox cloud-init](https://pve.proxmox.com/wiki/Cloud-Init_Support) template for Ubuntu.
We are using a small server images to keep the attack surface small. The cloud-init template is a server Ubuntu image with cloud-init installed. Get the URL from the Ubuntu website and download it to the Proxmox servers local storage for ISO images. Ubuntu website link: [https://cloud-images.ubuntu.com/releases/](https://cloud-images.ubuntu.com/releases/). We are going for the file ending in `*server-cloudimg-amd64.img`.
### LXC container template
We are also using Ubuntu for the LXC containers. We are using the latest Ubuntu standard LXC template you can download via the Proxmox web interface for that.
### SSH keys
## Create a VM with Terraform
## Create an LXC container with Terraform