Cluster of nixos nodes
On the host:
touch /etc/nixos/ncluster.nix; chown philipcristiano /etc/nixos/ncluster.nix
Then
scp ncluster.nix $USER@TARGET_HOST:/etc/nixos/ncluster.nix
Add ./ncluster.nix
to the imports
See vault/README.md
Expected consul values
site/domain
- Base domain expected for services.
VLANs are used to provide separate interfaces for applications. This is meant to work around limitations in macvlan interfaces in linux where the host cannot reach the macvlan'd interfaces.
In your nixos/configuration
networking.vlans = {
vlan110 = { id=110; interface="enp2s0"; };
};
networking.interfaces.vlan110.useDHCP = true;
BGP is used with GoCast to advertise floating IPs
domain
Internal domain for services
docker_registry
Custom registry to use, should be equal to docker-registry.$DOMAIN
if you are using this docker registry
(WIP)
bash deploy.sh
Minio for S3-compatible storage that can be hosted on each node.
NFS (hosted outside this cluster) is used for services that cannot use S3
Postgres deployed for each service.
Traefik and Let's Encrypt for certs
Consul values:
credentials/mktxp/influxdb_organization
credentials/mktxp/influxdb_token
credentials/mktxp/password
credentials/mktxp/username
Consul values:
credentials/minio/root_user
credentials/minio/root_pass
Consul Values
credentials/baserow-postgres/USER
- Username for the root usercredentials/baserow-postgres/PASSWORD
- Root passwordcredentials/baserow-postgres/DB
- default DBcredentials/baserow-redis/password
- Username for the root user
NOT SAFE FOR USAGE AS A WALLET - only using this for an API to bitcoin data
Mempool also requires MariaDB
Consul Values
-
credentials/electrs/bitcoind_username
- Username from above -
credentials/electrs/bitcoind_password
- Password generated by rpcauth -
credentials/bitcoin-rpc-explorer/bitcoind_username
- Username from above -
credentials/bitcoin-rpc-explorer/bitcoind_password
- Password generated by rpcauth -
credentials/mempool/bitcoind_username
- Username from above -
credentials/mempool/bitcoind_password
- Password generated by rpcauth
For each service:
credentials/bitcoind/rpcauth/USERNAME
- RPC auth line afterrpcauth=USERNAME:
Just the salt/password portion!
Consul Values
credentials/folio-postgres/USER
- Username for the root usercredentials/folio-postgres/PASSWORD
- Root passwordcredentials/folio-postgres/DB
- default DB
Consul Values
credentials/frigate/mqtt_host
- MQTT Host IPcredentials/frigate/mqtt_username
- MQTT Usernamecredentials/frigate/mqtt_password
- MQTT Passwordcredentials/frigate/cameras/*
- Key: Camera name, Value: input.path for Frigate
credentials/matrix-hookshot/passkey.pem
- passkey.pem fromopenssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096
curl -s $NOMAD_ADDR/v1/operator/scheduler/configuration |
jq '.SchedulerConfig | .SchedulerAlgorithm="spread"' |
curl -X PUT $NOMAD_ADDR/v1/operator/scheduler/configuration -d @-
curl -s $NOMAD_ADDR/v1/operator/scheduler/configuration | \
jq '.SchedulerConfig | .MemoryOversubscriptionEnabled=true' | \
curl -X PUT $NOMAD_ADDR/v1/operator/scheduler/configuration -d @-