forked from Deuxfleurs/nixcfg
Compare commits
1 commit
8f4c78f39c
...
51e6baacb5
Author | SHA1 | Date | |
---|---|---|---|
51e6baacb5 |
38 changed files with 224 additions and 343 deletions
|
@ -3,7 +3,3 @@ type = 'user'
|
|||
description = 'LDAP base DN for everything'
|
||||
example = 'dc=example,dc=com'
|
||||
|
||||
[secrets."d53/gandi_api_key"]
|
||||
type = 'user'
|
||||
description = 'Gandi API key'
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, fetchzip
|
||||
|
||||
, nodejs
|
||||
|
||||
|
@ -31,8 +30,8 @@
|
|||
hash = "sha256-BZdExj2q/bqUD3k9uluOot2dlrWKA+vpad49EdgXKww=";
|
||||
};
|
||||
v7 = {
|
||||
rev = "e1267803ea749cd93e9d5f81438011ea620d04af";
|
||||
hash = "sha256-iIds0GnCHAyeIEdSD4aCCgDtnnwARh3NE470CywseS0=";
|
||||
rev = "ba82142ff242ce385804bcb4287126de52d329f3";
|
||||
hash = "sha256-3WX3dTWJoeApon1AH3XplBIvEosVNzchkjgi2C808B4=";
|
||||
};
|
||||
};
|
||||
mkOnlyOffice = {
|
||||
|
@ -41,14 +40,6 @@
|
|||
pname = "${pname}-onlyoffice";
|
||||
inherit version;
|
||||
|
||||
x2t = let
|
||||
version = "v7.3+1";
|
||||
in fetchzip {
|
||||
url = "https://github.com/cryptpad/onlyoffice-x2t-wasm/releases/download/${version}/x2t.zip";
|
||||
hash = "sha256-d5raecsTOflo0UpjSEZW5lker4+wdkTb6IyHNq5iBg8=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
srcs = lib.mapAttrsToList (version: { rev, hash ? lib.fakeHash }: fetchFromGitHub {
|
||||
name = "${final.pname}-${version}-source";
|
||||
owner = "cryptpad";
|
||||
|
@ -66,21 +57,20 @@
|
|||
(version: "cp -Tr ${final.pname}-${version}-source $out/${version}")
|
||||
(builtins.attrNames onlyOfficeVersions)
|
||||
)}
|
||||
cp -Tr $x2t $out/x2t
|
||||
'';
|
||||
});
|
||||
in buildNpmPackage rec {
|
||||
pname = "cryptpad";
|
||||
version = "2024.6.1";
|
||||
version = "2024.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cryptpad";
|
||||
repo = "cryptpad";
|
||||
rev = version;
|
||||
hash = "sha256-qwyXpTY8Ds7R5687PVGZa/rlEyrAZjNzJ4+VQZpF8v0=";
|
||||
hash = "sha256-kXghuktaKicFOz98Siy/OjJ9rlgy6C2BTKkD2OFLE+k=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-GSTPsXqe/rxiDh5OW2t+ZY1YRNgRSDxkJ0pvcLIFtFw=";
|
||||
npmDepsHash = "sha256-fjImdtv0bwgdDvl/BXV0DesreOAW2u8HsNqJ13hrJMw=";
|
||||
|
||||
inherit nodejs;
|
||||
|
||||
|
@ -117,10 +107,6 @@ in buildNpmPackage rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit onlyOffice;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Collaborative office suite, end-to-end encrypted and open-source.";
|
||||
homepage = "https://cryptpad.org";
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
pkgs = import sources.nixpkgs {};
|
||||
in rec {
|
||||
cryptpad = pkgs.callPackage ./default.nix {};
|
||||
docker = import ./docker.nix {
|
||||
inherit pkgs;
|
||||
docker = pkgs.callPackage ./docker.nix {
|
||||
inherit name tag;
|
||||
inherit cryptpad;
|
||||
withOnlyOffice = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
"pins": {
|
||||
"nixpkgs": {
|
||||
"type": "Channel",
|
||||
"name": "nixos-24.05",
|
||||
"url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.3311.a1cc729dcbc3/nixexprs.tar.xz",
|
||||
"hash": "13al93fac4xdxj0jllfby2v9klwqdhsf3yg10mnsm9ys84v7gsnn"
|
||||
"name": "nixos-23.11",
|
||||
"url": "https://releases.nixos.org/nixos/23.11/nixos-23.11.7237.46397778ef1f/nixexprs.tar.xz",
|
||||
"hash": "00cy8q07diavxb91g7pxl0gqc68s3hzimsggjc9rqyf99h1q9d3r"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
|
|
|
@ -188,12 +188,6 @@ module.exports = {
|
|||
* DATABASE VOLUMES
|
||||
* ===================== */
|
||||
|
||||
/*
|
||||
* We need this config entry, else CryptPad will try to mkdir
|
||||
* some stuff into Nix store apparently...
|
||||
*/
|
||||
base: '/mnt/data',
|
||||
|
||||
/*
|
||||
* CryptPad stores each document in an individual file on your hard drive.
|
||||
* Specify a directory where files should be stored.
|
||||
|
|
|
@ -26,7 +26,7 @@ job "cryptpad" {
|
|||
}
|
||||
|
||||
config {
|
||||
image = "kokakiwi/cryptpad:2024.6.1"
|
||||
image = "kokakiwi/cryptpad:2024.3.1"
|
||||
ports = [ "http" ]
|
||||
|
||||
volumes = [
|
||||
|
|
|
@ -13,7 +13,7 @@ job "guichet" {
|
|||
task "guichet" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "dxflrs/guichet:0x4y7bj1qb8w8hckvpbzlgyxh63j66ij"
|
||||
image = "dxflrs/guichet:m1gzk1r00xp0kz566fwbpc87z7haq7xj"
|
||||
args = [ "server", "-config", "/etc/config.json" ]
|
||||
readonly_rootfs = true
|
||||
ports = [ "web_port" ]
|
|
@ -369,7 +369,7 @@ var config = {
|
|||
// Message to show the users. Example: 'The service will be down for
|
||||
// maintenance at 01:00 AM GMT,
|
||||
// Does only support plaintext. No line skip.
|
||||
noticeMessage: "Suite à une utilisation contraire à nos CGU, Deuxfleurs surveille activement cette instance Jitsi et enverra tout contenu illégal à la police. Pour toute question, commentaire ou suggestion, contactez moderation@deuxfleurs.fr . Following usage breaching our TOS, Deuxfleurs actively monitors this Jitsi instance and will send any illegal behavior to the Police. For any question, remark or suggestion, reach moderation@deuxfleurs.fr",
|
||||
// noticeMessage: "Suite à une utilisation contraire à nos CGU, Deuxfleurs surveille activement cette instance Jitsi et enverra tout contenu illégal à la police. Pour toute question, commentaire ou suggestion, contactez moderation@deuxfleurs.fr . Following usage breaching our TOS, Deuxfleurs actively monitors this Jitsi instance and will send any illegal behavior to the Police. For any question, remark or suggestion, reach moderation@deuxfleurs.fr",
|
||||
|
||||
// Enables calendar integration, depends on googleApiApplicationClientID
|
||||
// and microsoftApiApplicationClientID
|
||||
|
|
|
@ -81,12 +81,6 @@ http {
|
|||
alias /srv/jitsi-meet/$1/$2;
|
||||
}
|
||||
|
||||
# Disallow robots indexation
|
||||
location = /robots.txt {
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
}
|
||||
|
||||
# not used yet VVV
|
||||
# colibri (JVB) websockets
|
||||
#location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) {
|
||||
|
@ -98,12 +92,12 @@ http {
|
|||
#}
|
||||
|
||||
|
||||
location ~* {{ key "secrets/jitsi/blacklist_regex" }} {
|
||||
location ~ "2daut2wank2|2duat2wank|2duat2wank0|2duat2wank1|2duat2wank2|2duat2wank3|2duatr2wank|2duatr2wank0|2duatr2wank1|2duatr2wank2|2wank2daut2|daut1|duat2wank|duat2wank2|duatr2wank2|prettypanties|slutgfs|wabk2daugther|wank2daugther|wank2daut|wank2daut2|wank2daut3|wankwatch" {
|
||||
return 302 https://www.service-public.fr/particuliers/vosdroits/R17674;
|
||||
}
|
||||
|
||||
location = /http-bind {
|
||||
if ($args ~* {{ key "secrets/jitsi/blacklist_regex" }}) {
|
||||
if ($args ~ "2daut2wank2|2duat2wank|2duat2wank0|2duat2wank1|2duat2wank2|2duat2wank3|2duatr2wank|2duatr2wank0|2duatr2wank1|2duatr2wank2|2wank2daut2|daut1|duat2wank|duat2wank2|duatr2wank2|prettypanties|slutgfs|wabk2daugther|wank2daugther|wank2daut|wank2daut2|wank2daut3|wankwatch") {
|
||||
return 403 'forbidden';
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ job "woodpecker-ci" {
|
|||
task "server" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "woodpeckerci/woodpecker-server:v2.7.0"
|
||||
image = "woodpeckerci/woodpecker-server:v2.4.1"
|
||||
ports = [ "web_port", "grpc_port" ]
|
||||
network_mode = "host"
|
||||
}
|
||||
|
|
|
@ -93,18 +93,6 @@
|
|||
address = "10.83.5.3";
|
||||
endpoint = "82.64.238.84:33742";
|
||||
};
|
||||
"ortie" = {
|
||||
siteName = "dathomir";
|
||||
publicKey = "tbx2mvt3TN3Xd+ermwwZ6it80VWT5949cKH9BRFgvzE=";
|
||||
address = "10.83.5.4";
|
||||
endpoint = "82.64.238.84:33743";
|
||||
};
|
||||
"pamplemousse" = {
|
||||
siteName = "corrin";
|
||||
publicKey = "6y5GrNXEql12AObuSfOHGxxUKpdlcyapu+juLYOEBhc=";
|
||||
address = "10.83.6.1";
|
||||
endpoint = "45.81.62.36:33731";
|
||||
};
|
||||
};
|
||||
|
||||
# Pin Nomad version
|
||||
|
|
|
@ -12,5 +12,3 @@ ananas.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHs0zAyBy70oyV5
|
|||
onion.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINjBQ67fxwuDDzRPveTko/Sgf0cev3tIvlr3CfAmhF0C
|
||||
oseille.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAgQdQ5UVFFn+DXN90ut9+V7NtEopQJnES3r8soKTZW4
|
||||
io.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIvgCJ7Jew7ou1RZuaT41Sd+ucZAgxUwtdieqNqoC3+T
|
||||
ortie.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMqtfIPLk8a5tM6Upj7GQwlIS16nBPrZYVXE2FVlO2Yn
|
||||
pamplemousse.machine.deuxfleurs.fr ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAI0M5qny9yQ6LNzWqPfSlOWwTYpvxQtuSpFiOb6aVtA
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.timeout = 20;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services.openssh.ports = [ 22 33604 ];
|
||||
|
||||
deuxfleurs.hostName = "ortie";
|
||||
deuxfleurs.staticIPv4.address = "192.168.1.37";
|
||||
deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:223:24ff:feb0:1b9";
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
../site/dathomir.nix
|
|
@ -1,14 +0,0 @@
|
|||
# Configuration file local to this node
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.timeout = 5;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
deuxfleurs.hostName = "pamplemousse";
|
||||
deuxfleurs.staticIPv4.address = "192.168.5.201";
|
||||
deuxfleurs.staticIPv6.address = "2001:912:1ac0:2200::201";
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
../site/corrin.nix
|
|
@ -1,8 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
deuxfleurs.siteName = "corrin";
|
||||
deuxfleurs.staticIPv4.defaultGateway = "192.168.5.1";
|
||||
deuxfleurs.cnameTarget = "corrin.site.deuxfleurs.fr.";
|
||||
deuxfleurs.publicIPv4 = "45.81.62.36";
|
||||
}
|
|
@ -41,9 +41,3 @@ Host oseille
|
|||
|
||||
Host io
|
||||
HostName io.machine.deuxfleurs.fr
|
||||
|
||||
Host ortie
|
||||
HostName ortie.machine.deuxfleurs.fr
|
||||
|
||||
Host pamplemousse
|
||||
HostName 2001:912:1ac0:2200::201
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
job "albatros" {
|
||||
datacenters = ["neptune", "dathomir", "corrin", "bespin"]
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "service"
|
||||
priority = 90
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ job "builder" {
|
|||
namespace = "ci"
|
||||
type = "batch"
|
||||
|
||||
datacenters = ["neptune", "dathomir", "corrin", "bespin"]
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
priority = 100
|
||||
|
||||
parameterized {
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
job "core-bottin" {
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "system"
|
||||
priority = 90
|
||||
|
||||
update {
|
||||
max_parallel = 1
|
||||
stagger = "1m"
|
||||
}
|
||||
|
||||
group "bottin" {
|
||||
constraint {
|
||||
distinct_property = "${meta.site}"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
network {
|
||||
port "ldap_port" {
|
||||
static = 389
|
||||
to = 389
|
||||
}
|
||||
}
|
||||
|
||||
task "bottin" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "dxflrs/bottin:7h18i30cckckaahv87d3c86pn4a7q41z"
|
||||
network_mode = "host"
|
||||
readonly_rootfs = true
|
||||
ports = [ "ldap_port" ]
|
||||
volumes = [
|
||||
"secrets/config.json:/config.json",
|
||||
"secrets:/etc/bottin",
|
||||
]
|
||||
}
|
||||
|
||||
restart {
|
||||
interval = "5m"
|
||||
attempts = 10
|
||||
delay = "15s"
|
||||
mode = "delay"
|
||||
}
|
||||
|
||||
resources {
|
||||
memory = 100
|
||||
memory_max = 200
|
||||
}
|
||||
|
||||
template {
|
||||
data = file("../config/bottin/config.json.tpl")
|
||||
destination = "secrets/config.json"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul.crt\" }}"
|
||||
destination = "secrets/consul.crt"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-client.crt\" }}"
|
||||
destination = "secrets/consul-client.crt"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-client.key\" }}"
|
||||
destination = "secrets/consul-client.key"
|
||||
}
|
||||
|
||||
template {
|
||||
data = <<EOH
|
||||
CONSUL_HTTP_ADDR=https://consul.service.staging.consul:8501
|
||||
CONSUL_HTTP_SSL=true
|
||||
CONSUL_CACERT=/etc/bottin/consul.crt
|
||||
CONSUL_CLIENT_CERT=/etc/bottin/consul-client.crt
|
||||
CONSUL_CLIENT_KEY=/etc/bottin/consul-client.key
|
||||
EOH
|
||||
destination = "secrets/env"
|
||||
env = true
|
||||
}
|
||||
|
||||
service {
|
||||
tags = [ "${meta.site}" ]
|
||||
port = "ldap_port"
|
||||
address_mode = "host"
|
||||
name = "bottin"
|
||||
check {
|
||||
type = "tcp"
|
||||
port = "ldap_port"
|
||||
interval = "60s"
|
||||
timeout = "5s"
|
||||
check_restart {
|
||||
limit = 3
|
||||
grace = "90s"
|
||||
ignore_warnings = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
job "core-d53" {
|
||||
datacenters = ["neptune", "dathomir", "corrin", "bespin"]
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "service"
|
||||
priority = 90
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
job "core-diplonat" {
|
||||
datacenters = ["neptune", "dathomir", "corrin", "bespin"]
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "system"
|
||||
priority = 90
|
||||
|
||||
|
@ -54,7 +54,7 @@ job "core-diplonat" {
|
|||
data = <<EOH
|
||||
DIPLONAT_REFRESH_TIME=60
|
||||
DIPLONAT_EXPIRATION_TIME=300
|
||||
DIPLONAT_IPV6_ONLY=true
|
||||
DIPLONAT_IPV6_ONLY={{ $site := env "meta.site" }}{{ if eq $site "corrin" }}false{{ else }}true{{ end }}
|
||||
DIPLONAT_CONSUL_NODE_NAME={{ env "attr.unique.hostname" }}
|
||||
DIPLONAT_CONSUL_URL=https://localhost:8501
|
||||
DIPLONAT_CONSUL_CA_CERT=/etc/diplonat/consul-ca.crt
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
job "core-tricot" {
|
||||
datacenters = ["neptune", "dathomir", "corrin", "bespin"]
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "system"
|
||||
priority = 90
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
[secrets."directory/ldap_base_dn"]
|
||||
type = 'user'
|
||||
description = 'LDAP base DN for everything'
|
||||
example = 'dc=example,dc=com'
|
||||
|
||||
[secrets."d53/gandi_api_key"]
|
||||
type = 'user'
|
||||
description = 'Gandi API key'
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
{
|
||||
"http_bind_addr": ":9991",
|
||||
"ldap_server_addr": "ldap://{{ env "meta.site" }}.bottin.service.staging.consul:389",
|
||||
"ldap_server_addr": "ldap://bottin.service.staging.consul:389",
|
||||
|
||||
"base_dn": "{{ key "secrets/directory/ldap_base_dn" }}",
|
||||
"user_base_dn": "ou=users,{{ key "secrets/directory/ldap_base_dn" }}",
|
||||
"user_name_attr": "cn",
|
||||
"group_base_dn": "ou=groups,{{ key "secrets/directory/ldap_base_dn" }}",
|
||||
"group_name_attr": "cn",
|
||||
"mailing_list_base_dn": "ou=mailing_lists,ou=groups,{{ key "secrets/directory/ldap_base_dn" }}",
|
||||
"mailing_list_name_attr": "cn",
|
||||
"mailing_list_guest_user_base_dn": "ou=guests,ou=users,{{ key "secrets/directory/ldap_base_dn" }}",
|
||||
|
||||
"invitation_base_dn": "ou=invitations,{{ key "secrets/directory/ldap_base_dn" }}",
|
||||
"invitation_name_attr": "cn",
|
133
cluster/staging/app/directory/deploy/directory.hcl
Normal file
133
cluster/staging/app/directory/deploy/directory.hcl
Normal file
|
@ -0,0 +1,133 @@
|
|||
job "directory" {
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "service"
|
||||
priority = 90
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.cpu.arch}"
|
||||
value = "amd64"
|
||||
}
|
||||
|
||||
group "bottin" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "ldap_port" {
|
||||
static = 389
|
||||
}
|
||||
}
|
||||
|
||||
task "bottin" {
|
||||
driver = "nix2"
|
||||
config {
|
||||
packages = [
|
||||
"git+https://git.deuxfleurs.fr/Deuxfleurs/bottin.git?ref=main&rev=9cab98d2cee386ece54b000bbdf2346da8b55eed"
|
||||
]
|
||||
command = "bottin"
|
||||
}
|
||||
user = "root" # needed to bind port 389
|
||||
|
||||
resources {
|
||||
memory = 100
|
||||
}
|
||||
|
||||
template {
|
||||
data = file("../config/bottin/config.json.tpl")
|
||||
destination = "config.json"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-ca.crt\" }}"
|
||||
destination = "etc/bottin/consul-ca.crt"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-client.crt\" }}"
|
||||
destination = "etc/bottin/consul-client.crt"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-client.key\" }}"
|
||||
destination = "etc/bottin/consul-client.key"
|
||||
}
|
||||
|
||||
template {
|
||||
data = <<EOH
|
||||
CONSUL_HTTP_ADDR=https://localhost:8501
|
||||
CONSUL_HTTP_SSL=true
|
||||
CONSUL_CACERT=/etc/bottin/consul-ca.crt
|
||||
CONSUL_CLIENT_CERT=/etc/bottin/consul-client.crt
|
||||
CONSUL_CLIENT_KEY=/etc/bottin/consul-client.key
|
||||
EOH
|
||||
destination = "secrets/env"
|
||||
env = true
|
||||
}
|
||||
|
||||
service {
|
||||
tags = ["bottin"]
|
||||
port = "ldap_port"
|
||||
name = "bottin"
|
||||
check {
|
||||
type = "tcp"
|
||||
port = "ldap_port"
|
||||
interval = "60s"
|
||||
timeout = "5s"
|
||||
check_restart {
|
||||
limit = 3
|
||||
grace = "90s"
|
||||
ignore_warnings = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group "guichet" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "web_port" { static = 9991 }
|
||||
}
|
||||
|
||||
task "guichet" {
|
||||
driver = "nix2"
|
||||
config {
|
||||
packages = [
|
||||
"git+https://git.deuxfleurs.fr/Deuxfleurs/guichet.git?ref=main&rev=10bdee10cf6947ec6dd0ba5040d7274d6c3316a7"
|
||||
]
|
||||
command = "guichet"
|
||||
}
|
||||
|
||||
template {
|
||||
data = file("../config/guichet/config.json.tpl")
|
||||
destination = "config.json"
|
||||
}
|
||||
|
||||
resources {
|
||||
memory = 200
|
||||
}
|
||||
|
||||
service {
|
||||
name = "guichet"
|
||||
tags = [
|
||||
"guichet",
|
||||
"tricot guichet.staging.deuxfleurs.org",
|
||||
"d53-cname guichet.staging.deuxfleurs.org",
|
||||
]
|
||||
port = "web_port"
|
||||
check {
|
||||
type = "tcp"
|
||||
port = "web_port"
|
||||
interval = "60s"
|
||||
timeout = "5s"
|
||||
check_restart {
|
||||
limit = 3
|
||||
grace = "90s"
|
||||
ignore_warnings = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,51 +1,51 @@
|
|||
# General configuration
|
||||
|
||||
[secrets."directory/guichet/web_hostname"]
|
||||
[secrets."directory/ldap_base_dn"]
|
||||
type = 'user'
|
||||
description = 'Public hostname from which Guichet is accessible via HTTP (e.g. guichet.example.com)'
|
||||
|
||||
|
||||
# Mailing configuration
|
||||
description = 'LDAP base DN for everything'
|
||||
example = 'dc=example,dc=com'
|
||||
|
||||
[secrets."directory/guichet/smtp_user"]
|
||||
type = 'user'
|
||||
description = 'SMTP username'
|
||||
|
||||
[secrets."directory/guichet/s3_access_key"]
|
||||
type = 'user'
|
||||
description = 'Garage access key for Guichet profile pictures'
|
||||
|
||||
[secrets."directory/guichet/s3_endpoint"]
|
||||
type = 'user'
|
||||
description = 'S3 endpoint URL'
|
||||
|
||||
[secrets."directory/guichet/s3_region"]
|
||||
type = 'user'
|
||||
description = 'S3 region'
|
||||
|
||||
[secrets."directory/guichet/smtp_pass"]
|
||||
type = 'user'
|
||||
description = 'SMTP password'
|
||||
|
||||
[secrets."directory/guichet/web_hostname"]
|
||||
type = 'user'
|
||||
description = 'Public hostname from which Guichet is accessible via HTTP'
|
||||
example = 'guichet.example.com'
|
||||
|
||||
[secrets."directory/guichet/s3_bucket"]
|
||||
type = 'user'
|
||||
description = 'S3 bucket in which to store data files (such as profile pictures)'
|
||||
|
||||
[secrets."directory/guichet/smtp_server"]
|
||||
type = 'user'
|
||||
description = 'SMTP server address (hostname:port)'
|
||||
|
||||
[secrets."directory/guichet/s3_secret_key"]
|
||||
type = 'user'
|
||||
description = 'Garage secret key for Guichet profile pictures'
|
||||
|
||||
[secrets."directory/guichet/mail_from"]
|
||||
type = 'user'
|
||||
description = 'E-mail address from which to send welcome emails to new users'
|
||||
|
||||
[secrets."directory/guichet/mail_domain"]
|
||||
type = 'user'
|
||||
description = 'E-mail domain for new users (e.g. example.com)'
|
||||
description = 'E-mail domain for new users'
|
||||
example = 'example.com'
|
||||
|
||||
|
||||
# S3 configuration
|
||||
|
||||
[secrets."directory/guichet/s3_endpoint"]
|
||||
type = 'user'
|
||||
description = 'S3 endpoint URL'
|
||||
|
||||
[secrets."directory/guichet/s3_bucket"]
|
||||
type = 'user'
|
||||
description = 'S3 bucket in which to store data files (such as profile pictures)'
|
||||
|
||||
[secrets."directory/guichet/s3_region"]
|
||||
type = 'user'
|
||||
description = 'S3 region'
|
||||
|
||||
[secrets."directory/guichet/s3_access_key"]
|
||||
type = 'user'
|
||||
description = 'Garage access key for Guichet profile pictures'
|
||||
|
||||
[secrets."directory/guichet/s3_secret_key"]
|
||||
type = 'user'
|
||||
description = 'Garage secret key for Guichet profile pictures'
|
|
@ -1,12 +1,13 @@
|
|||
job "garage-staging" {
|
||||
datacenters = [ "neptune", "dathomir", "corrin", "bespin" ]
|
||||
type = "system"
|
||||
priority = 90
|
||||
|
||||
datacenters = [ "neptune", "jupiter", "corrin", "bespin" ]
|
||||
|
||||
update {
|
||||
max_parallel = 2
|
||||
min_healthy_time = "60s"
|
||||
max_parallel = 1
|
||||
stagger = "1m"
|
||||
min_healthy_time = "10s"
|
||||
}
|
||||
|
||||
group "garage-staging" {
|
||||
|
@ -18,27 +19,21 @@ job "garage-staging" {
|
|||
port "admin" { static = 3909 }
|
||||
}
|
||||
|
||||
update {
|
||||
max_parallel = 10
|
||||
min_healthy_time = "30s"
|
||||
healthy_deadline = "5m"
|
||||
}
|
||||
|
||||
task "server" {
|
||||
driver = "docker"
|
||||
driver = "nix2"
|
||||
|
||||
config {
|
||||
image = "superboum/garage:v1.0.0-rc1-hotfix-red-ftr-wquorum"
|
||||
command = "/garage"
|
||||
args = [ "server" ]
|
||||
network_mode = "host"
|
||||
volumes = [
|
||||
"/mnt/storage/garage-staging/data:/data",
|
||||
"/mnt/ssd/garage-staging/meta:/meta",
|
||||
"secrets/garage.toml:/etc/garage.toml",
|
||||
"secrets:/etc/garage",
|
||||
packages = [
|
||||
"#bash", # so that we can enter a shell inside container
|
||||
"#coreutils",
|
||||
# garage v1.0.0-rc1 as of 2024-03-28
|
||||
"git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=next-0.10&rev=afad62939e071621666ca7255f7164f92c4475bb"
|
||||
]
|
||||
logging {
|
||||
type = "journald"
|
||||
command = "garage"
|
||||
args = [ "server" ]
|
||||
bind = {
|
||||
"/mnt/storage/garage-staging/data" = "/data",
|
||||
"/mnt/ssd/garage-staging/meta" = "/meta",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,24 +41,27 @@ job "garage-staging" {
|
|||
RUST_LOG = "garage=info,garage_api=debug",
|
||||
}
|
||||
|
||||
# files currently owned by root, we don't want to chown everything
|
||||
user = "root"
|
||||
|
||||
template {
|
||||
data = file("../config/garage.toml")
|
||||
destination = "secrets/garage.toml"
|
||||
destination = "etc/garage.toml"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-ca.crt\" }}"
|
||||
destination = "secrets/consul-ca.crt"
|
||||
destination = "etc/garage/consul-ca.crt"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-client.crt\" }}"
|
||||
destination = "secrets/consul-client.crt"
|
||||
destination = "etc/garage/consul-client.crt"
|
||||
}
|
||||
|
||||
template {
|
||||
data = "{{ key \"secrets/consul/consul-client.key\" }}"
|
||||
destination = "secrets/consul-client.key"
|
||||
destination = "etc/garage/consul-client.key"
|
||||
}
|
||||
|
||||
resources {
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
job "guichet" {
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "service"
|
||||
priority = 90
|
||||
|
||||
group "guichet" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "web_port" { to = 9991 }
|
||||
}
|
||||
|
||||
task "guichet" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "dxflrs/guichet:m1gzk1r00xp0kz566fwbpc87z7haq7xj"
|
||||
args = [ "server", "-config", "/etc/config.json" ]
|
||||
readonly_rootfs = true
|
||||
ports = [ "web_port" ]
|
||||
volumes = [
|
||||
"secrets/config.json:/etc/config.json"
|
||||
]
|
||||
}
|
||||
|
||||
template {
|
||||
data = file("../config/guichet/config.json.tpl")
|
||||
destination = "secrets/config.json"
|
||||
}
|
||||
|
||||
resources {
|
||||
memory = 200
|
||||
}
|
||||
|
||||
service {
|
||||
name = "guichet"
|
||||
tags = [
|
||||
"guichet",
|
||||
"tricot guichet.staging.deuxfleurs.org",
|
||||
"d53-cname guichet.staging.deuxfleurs.org",
|
||||
]
|
||||
port = "web_port"
|
||||
address_mode = "host"
|
||||
check {
|
||||
type = "tcp"
|
||||
port = "web_port"
|
||||
interval = "60s"
|
||||
timeout = "5s"
|
||||
check_restart {
|
||||
limit = 3
|
||||
grace = "90s"
|
||||
ignore_warnings = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
job "telemetry-service" {
|
||||
datacenters = ["neptune", "dathomir", "corrin", "bespin"]
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "service"
|
||||
|
||||
group "prometheus" {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
job "telemetry-system" {
|
||||
datacenters = ["neptune", "dathomir", "corrin", "bespin"]
|
||||
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
||||
type = "system"
|
||||
priority = "100"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
endpoint = "77.207.15.215:33723";
|
||||
};
|
||||
"origan" = {
|
||||
siteName = "dathomir";
|
||||
siteName = "jupiter";
|
||||
publicKey = "smBQYUS60JDkNoqkTT7TgbpqFiM43005fcrT6472llI=";
|
||||
address = "10.14.2.33";
|
||||
endpoint = "82.64.238.84:33733";
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{ ... }:
|
||||
# Configuration file local to this node
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
@ -1 +1 @@
|
|||
../site/dathomir.nix
|
||||
../site/jupiter.nix
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
deuxfleurs.siteName = "dathomir";
|
||||
deuxfleurs.staticIPv4.defaultGateway = "192.168.1.1";
|
||||
deuxfleurs.cnameTarget = "dathomir.site.staging.deuxfleurs.org.";
|
||||
}
|
7
cluster/staging/site/jupiter.nix
Normal file
7
cluster/staging/site/jupiter.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
deuxfleurs.siteName = "jupiter";
|
||||
deuxfleurs.staticIPv4.defaultGateway = "192.168.1.1";
|
||||
deuxfleurs.cnameTarget = "jupiter.site.staging.deuxfleurs.org.";
|
||||
}
|
Loading…
Reference in a new issue