feat: New instance

This commit is contained in:
pulsar89.5 2024-01-04 17:36:47 +01:00
parent 02534685a1
commit 6a6b612b58
5 changed files with 139 additions and 1 deletions

View File

@ -1,3 +1,11 @@
# coreos
Contient les fichiers d'initialisation de CoreOS.
## Butane
To convert yml in ignition file, use this command:
```bash
$ file=borgwarehouse-pumbaa.gaia.ykn.local; bin/butane-x86_64-unknown-linux-gnu --output $file.ign $file.yml
```

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"ignition":{"version":"3.4.0"},"passwd":{"users":[{"name":"core","shouldExist":false},{"groups":["sudo"],"name":"alegall","passwordHash":"$y$j9T$61LMkIUWS6N.UQv3U4pxM1$Eodnc23AtXOvQMqm/qgqv7blGot4/8.OUsgIZazV9ND","sshAuthorizedKeys":["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHXrbcIwTQkJPlURJTePjQXAE4Q1lCjPp2JW/Y/oxXzp alegall@mufasa","ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP/JatXrf/HkF8HAnL5JmC05DHmUcgB7/eptDeD7kAP5 alegall@zazu","ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFI2/UosyrHbR3NVB8JDWbhNnmTLMS6EuCRG52hP50Vh alegall@smartphone","ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINwBIdvpiFgEzP2B+h3KIFmmxh1l7MVetGy2cThmpxcP alegall@sightcall"]}]},"storage":{"directories":[{"overwrite":true,"path":"/srv/borgwarehouse"},{"overwrite":true,"path":"/srv/borgwarehouse/config"},{"overwrite":true,"path":"/srv/borgwarehouse/ssh"},{"overwrite":true,"path":"/srv/borgwarehouse/etc_ssh"},{"overwrite":true,"path":"/srv/borgwarehouse/repos"},{"overwrite":true,"path":"/srv/borgwarehouse/logs"},{"overwrite":true,"path":"/home/builder/.config"}],"files":[{"path":"/etc/hostname","contents":{"compression":"","source":"data:,borgwarehouse-pumbaa.gaia.ykn.local"},"mode":420},{"path":"/etc/vconsole.conf","contents":{"compression":"","source":"data:,KEYMAP%3Dfr"},"mode":420},{"path":"/etc/NetworkManager/system-connections/ens3.nmconnection","contents":{"compression":"gzip","source":"data:;base64,H4sIAAAAAAAC/3SPwW7DIAyG7zzLYCHtqiYVT1L14IIJaGAiMJvy9lOaw6RJO9r6/X+f77YQoeVY6CGiM0jtJHhb0SAHrIQsIjFWDxYlQcYjIe5x/To/BDhXsTVt9DQqfbkqrfTwPp7ffufx4yxcsKsMpfGr4Vnq8g0VQ+kN5drzE0AtEEFtn6RSsZCEo2b0dFJaD+qq1XTbN7IhVBvMn2xcqFSU0LnI/Y5rR5Fhkx5iMh5SQ5GRQ3EmA3VIh/7l0JcLkszFoXHooSd+sUcY/OztdZjn6fYP4ajcfxM/AQAA//8KiTIVRwEAAA=="},"mode":384},{"path":"/etc/containers/systemd/borgwarehouse.container","contents":{"compression":"gzip","source":"data:;base64,H4sIAAAAAAAC/3yUX2+zNhTG7/kUlnKzSXuh5NW2JhKT8ocmpFnIgLSrqgo5cAhuwUb2IVH66SeT0ok06U0U+Xme4+Mfx37ecIYvxhRUIlmFTHBnK+TuQCXkolZAKpGWlJNEcKSMgzQeKUflcMCDkG8/BC8YBxOp3AEaowxBXtGM50lb48X4/LuiJXR3NAyvpLuzRevM0iNzoZBUQiIpaVUxvlOGy/dMCl4CR+fRHcehGzy4Qbz2g8j5eXNz0zGE4bxj6P9+O2jrcloCoTwlm2DZCd39M111GzOPb9zMZMe1cv+NRptoHm+CpZMjVmpoWRdTRo+EkEhIUF2uELqTwI2cRT86wuJ9APWrfLy923TMk8BfLfxxfO8+OWr2M+W2vXg/un++De5f9Q4bbzqceVNS1krDwiQnmAOpFcjmkDsp6op4UyKyRsg12UwUKUjVGJrgFshfxNYUe8TLyFHU5EA5EhS6EqEkZVkGEjieKmNOufbbQ/3zWxNoCknY1qxIm62Y/tJakgqKzOwca+NNHR3tLM7aRaNHJoJnbNd0mFKkny3/shdFXQIpRc1R/Wr0SHR+qvZE4sAhJdvj/0AODHNNrCmrqakKEpYxSAndij10yfurO28Wr0fR3DGtpOnny5B9qErlX6S5H0YnKdbtdfSxH8ziwF37oRf5wVNbRkIlurMS/b1uRSyrjrT0Z2GrFWKnNLXlaEUyoFhL+DLa8XK0cuxB37T/uDVt0/72xjTm/unaPDTEHUvJfXfQP6AMrVyUZ5fYolXVMrueVyq/GDY1z+sxwCRuooCJ9b21IXpxjxPr60mN9GLwxDqEpJYMj0u6hWLKFN0W4KCswTCePa6QFsVL85pCOj46ZV0g+6Fn8OPBJClktC6wfT//CwAA///e5l2sqgUAAA=="}}]}}

View File

@ -0,0 +1,129 @@
---
variant: fcos
version: 1.5.0
passwd:
users:
- name: core
should_exist: false
- name: alegall
password_hash: $y$j9T$61LMkIUWS6N.UQv3U4pxM1$Eodnc23AtXOvQMqm/qgqv7blGot4/8.OUsgIZazV9ND
groups:
- sudo
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHXrbcIwTQkJPlURJTePjQXAE4Q1lCjPp2JW/Y/oxXzp alegall@mufasa
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP/JatXrf/HkF8HAnL5JmC05DHmUcgB7/eptDeD7kAP5 alegall@zazu
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFI2/UosyrHbR3NVB8JDWbhNnmTLMS6EuCRG52hP50Vh alegall@smartphone
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINwBIdvpiFgEzP2B+h3KIFmmxh1l7MVetGy2cThmpxcP alegall@sightcall
storage:
directories:
- path: /srv/borgwarehouse
overwrite: true
- path: /srv/borgwarehouse/config
overwrite: true
- path: /srv/borgwarehouse/ssh
overwrite: true
- path: /srv/borgwarehouse/etc_ssh
overwrite: true
- path: /srv/borgwarehouse/repos
overwrite: true
- path: /srv/borgwarehouse/logs
overwrite: true
- path: /home/builder/.config
overwrite: true
files:
- path: /etc/hostname
mode: 0644
contents:
inline: borgwarehouse-pumbaa.gaia.ykn.local
- path: /etc/vconsole.conf
mode: 0644
contents:
inline: KEYMAP=fr
- path: /etc/NetworkManager/system-connections/ens3.nmconnection
mode: 0600
contents:
inline: |
[connection]
id=ens3
type=ethernet
interface-name=ens3
[ipv4]
address1=192.168.1.10/24,192.168.1.254
dhcp-hostname=borgwarehouse-pumbaa.gaia.ykn.local
dns=193.110.81.9;
dns-search=gaia.ykn.local
ignore-auto-dns=true
may-fail=false
method=manual
[ipv6]
addr-gen-mode=default
dns=2a0f:fc80::9;
ignore-auto-dns=true
method=dhcp
- path: /etc/containers/systemd/borgwarehouse.container
contents:
inline: |
[Unit]
Description=borgwarehouse podman container
Wants=network-online.target
After=network-online.target
[Container]
ContainerName=borgwarehouse
Image=borgwarehouse/borgwarehouse
# Host port mappings
Environment=WEB_SERVER_PORT=3000
Environment=SSH_SERVER_PORT=2589
# Hostname and URL
Environment=FQDN=borgwarehouse.ykn.fr
Environment=NEXTAUTH_URL=https://borgwarehouse.ykn.fr
# Secrects
Environment=NEXTAUTH_SECRET=J2TyeJz9eujrW8FU
Environment=CRONJOB_KEY=sG3dn11JzyE7k9Kj
# UID:GID must match the user and group ID of the host folders and must be > 1000
# If you want to use a different user than 1001:1001, you must rebuild the image yourself.
Environment=UID=1001
Environment=GID=1001
# Config and data folders (volume mounts)
# The host folders must be owned by the user with UID and GID specified above
Environment=CONFIG_PATH=./config
Environment=SSH_PATH=./ssh
Environment=SSH_HOST=./ssh_host
Environment=BORG_REPOSITORY_PATH=./repos
Environment=TMP_PATH=./tmp
Environment=LOGS_PATH=./logs
# LAN feature
Environment=FQDN_LAN=192.168.1.10
Environment=SSH_SERVER_PORT_LAN=22589
Volume=/srv/borgwarehouse/config:/home/borgwarehouse/app/config
Volume=/srv/borgwarehouse/ssh:/home/borgwarehouse/.ssh
Volume=/srv/borgwarehouse/etc_ssh:/etc/ssh
Volume=/srv/borgwarehouse/repos:/home/borgwarehouse/repos
Volume=/srv/borgwarehouse/logs:/home/borgwarehouse/logs
SecurityLabelDisable=true
[Install]
WantedBy=multi-user.target default.target