2022-02-09 09:48:24 +00:00
|
|
|
# Setup
|
|
|
|
## Infrastructure on Hetzner / Aws
|
|
|
|
|
|
|
|
For a setup on hetzner / aws we use terraform.
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "aws_s3_bucket" "backup" {
|
|
|
|
bucket = "backup"
|
|
|
|
acl = "private"
|
|
|
|
|
|
|
|
versioning {
|
|
|
|
enabled = false
|
|
|
|
}
|
|
|
|
tags = {
|
|
|
|
name = "backup"
|
|
|
|
Description = "bucket for backups in stage: ${var.stage}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-09 09:49:45 +00:00
|
|
|
resource "hcloud_server" "jitsi_09_2021" {
|
2022-02-09 09:48:24 +00:00
|
|
|
name = "the name"
|
|
|
|
image = "ubuntu-20.04"
|
|
|
|
server_type = "cx31"
|
|
|
|
location = "fsn1"
|
|
|
|
ssh_keys = ...
|
|
|
|
|
|
|
|
lifecycle {
|
|
|
|
ignore_changes = [ssh_keys]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "aws_route53_record" "v4_neu" {
|
|
|
|
zone_id = the_dns_zone
|
2022-02-09 09:49:45 +00:00
|
|
|
name = "jitsi-neu"
|
2022-02-09 09:48:24 +00:00
|
|
|
type = "A"
|
|
|
|
ttl = "300"
|
2022-02-09 09:49:45 +00:00
|
|
|
records = [hcloud_server.jitsi_09_2021.ipv4_address]
|
2022-02-09 09:48:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
output "ipv4" {
|
2022-02-09 09:49:45 +00:00
|
|
|
value = hcloud_server.jitsi_09_2021.ipv4_address
|
2022-02-09 09:48:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## k8s minicluster
|
|
|
|
|
|
|
|
For k8s installation we use our [dda-k8s-crate](https://github.com/DomainDrivenArchitecture/dda-k8s-crate) with the following configuation:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
{:user :k8s
|
|
|
|
:k8s {:external-ip "ip-from-above"}
|
|
|
|
:cert-manager :letsencrypt-prod-issuer
|
|
|
|
:persistent-dirs ["postgres"]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-02-09 09:49:45 +00:00
|
|
|
## kubectl apply c4k-jitsi
|
2022-02-09 09:48:24 +00:00
|
|
|
|
2022-02-09 09:49:45 +00:00
|
|
|
The last step for applying the jitsi deployment is
|
2022-02-09 09:48:24 +00:00
|
|
|
|
|
|
|
```
|
2022-02-09 09:49:45 +00:00
|
|
|
c4k-jitsi config.edn auth.edn | kubectl apply -f -
|
2022-02-09 09:48:24 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
with the following config.edn:
|
|
|
|
|
|
|
|
```
|
|
|
|
{:fqdn "the-fqdn-from aws_route53_record.v4_neu"
|
|
|
|
:postgres-data-volume-path "/var/postgres" ;; Volume was configured at dda-k8s-crate, results in a PersistentVolume definition.
|
|
|
|
:issuer :prod }
|
|
|
|
```
|