Adding local git server. - infra - Terraform IoC for my remote (Hetzner) and local (Incus) servers.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 03eeebe95897365257954d4c34e803caf5ea7524
(DIR) parent 8882e67f38a22800df1720760a4303b663b81c33
(HTM) Author: Jay Scott <me@jay.scot>
Date: Fri, 19 Jul 2024 17:39:37 +0100
Adding local git server.
Diffstat:
A local/cloudinit/git.yaml | 19 +++++++++++++++++++
M local/terraform.tfvars | 17 +++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/local/cloudinit/git.yaml b/local/cloudinit/git.yaml
@@ -0,0 +1,19 @@
+#cloud-config
+package_upgrade: true
+hostname: git.jay.scot
+timezone: Europe/London
+manage_resolv_conf: true
+
+resolv_conf:
+ nameservers: ['192.168.2.10', '1.1.1.1']
+
+packages:
+ - git
+
+users:
+ - name: git
+ shell: /usr/bin/git-shell
+ homedir: /srv/git
+ ssh_authorized_keys:
+ - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDLmKYxwXTbyRWLG0S24RTpyfyBO6AL8Dcy0XvVZ97Do
+
(DIR) diff --git a/local/terraform.tfvars b/local/terraform.tfvars
@@ -21,4 +21,21 @@ nodes = {
}
}
}
+ git = {
+ image = "images:alpine/3.20/cloud"
+ cloudinit_userdata = "./cloudinit/git.yaml"
+ net_addr = "192.168.2.12/24"
+ net_gw = "192.168.2.1"
+ devices = {
+ repos = {
+ type = "disk"
+ properties = {
+ path = "/srv/git"
+ source = "/srv/services/git"
+ shift = true
+ }
+ }
+ }
+ }
+
}