WIP: feat(infra): introduce Terranix #145

Draft
rlahfa wants to merge 3 commits from declarative-buckets into main
Owner

TODO:

  • expose s3-admin.dgnum.eu
  • make a mechanism to source the credentials for admin and manage rekeying à la agenix
  • import various secrets manually in the state bucket (e.g. admin token)

Blocker: garage_key_bucket and garage_global_alias cannot be imported via our provider, I need to fix this and maybe also fix automatic refresh.

Signed-off-by: Ryan Lahfa ryan@dgnum.eu

TODO: - [x] expose s3-admin.dgnum.eu - [x] make a mechanism to source the credentials for admin and manage rekeying à la agenix - [x] import various secrets manually in the state bucket (e.g. admin token) Blocker: garage_key_bucket and garage_global_alias cannot be imported via our provider, I need to fix this and maybe also fix automatic refresh. Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
rlahfa added 1 commit 2024-10-10 12:29:00 +02:00
feat(infra): introduce Terranix
All checks were successful
lint / check (push) Successful in 22s
Check meta / check_meta (pull_request) Successful in 18s
Check meta / check_dns (pull_request) Successful in 18s
lint / check (pull_request) Successful in 24s
build configuration / build_and_cache_compute01 (pull_request) Successful in 1m26s
build configuration / build_and_cache_krz01 (pull_request) Successful in 2m5s
build configuration / build_and_cache_storage01 (pull_request) Successful in 1m22s
build configuration / build_and_cache_geo01 (pull_request) Successful in 1m9s
build configuration / build_and_cache_rescue01 (pull_request) Successful in 1m16s
build configuration / build_and_cache_geo02 (pull_request) Successful in 1m7s
build configuration / build_and_cache_vault01 (pull_request) Successful in 1m17s
build configuration / build_and_cache_bridge01 (pull_request) Successful in 1m5s
build configuration / build_and_cache_web02 (pull_request) Successful in 1m13s
build configuration / build_and_cache_web01 (pull_request) Successful in 1m43s
48362e4b33
This requires the support for monorepo-terraform-state.s3.dgnum.eu being
available.

Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
rlahfa changed title from feat(infra): introduce Terranix to WIP:ù feat(infra): introduce Terranix 2024-10-10 12:29:44 +02:00
rlahfa changed title from WIP:ù feat(infra): introduce Terranix to WIP: feat(infra): introduce Terranix 2024-10-10 12:29:46 +02:00
thubrecht requested changes 2024-10-10 12:32:48 +02:00
default.nix Outdated
@ -67,9 +67,16 @@ let
commitizen.enable = true;
};
};
terranixConfig = import "${sources.terranix}/core" {
Owner

Please add a newline

Please add a newline
rlahfa marked this conversation as resolved
default.nix Outdated
@ -70,3 +76,4 @@
in
{
inherit terranixConfigFile terranixConfig;
Owner

Newline also after the inherit

Newline also after the inherit
rlahfa marked this conversation as resolved
@ -0,0 +4,4 @@
# endpoints.
#
# Note: currently requires the user to provide AWS_ACCESS_KEY_ID as well as
# AWS_SECRET_ACCESS_KEY in their environment variables.
Owner

TODO(one day): Add a .credentials directory, with age encrypted files that can be decrypted when entering the shell

TODO(one day): Add a .credentials directory, with age encrypted files that can be decrypted when entering the shell
Author
Owner

let's do it now

let's do it now
Author
Owner

done!

done!
rlahfa marked this conversation as resolved
@ -0,0 +12,4 @@
bucket = "monorepo-terraform-state";
key = "state";
# It's just a dump Garage server, don't try to be smart.
Owner

dumb*

dumb*
rlahfa marked this conversation as resolved
rlahfa added 1 commit 2024-10-10 12:32:54 +02:00
feat(infra): add S3 declarative buckets
All checks were successful
lint / check (push) Successful in 24s
Check meta / check_meta (pull_request) Successful in 19s
Check meta / check_dns (pull_request) Successful in 18s
build configuration / build_and_cache_storage01 (pull_request) Successful in 1m13s
build configuration / build_and_cache_compute01 (pull_request) Successful in 1m32s
build configuration / build_and_cache_geo01 (pull_request) Successful in 1m4s
build configuration / build_and_cache_rescue01 (pull_request) Successful in 1m14s
build configuration / build_and_cache_geo02 (pull_request) Successful in 1m4s
build configuration / build_and_cache_krz01 (pull_request) Successful in 2m3s
lint / check (pull_request) Successful in 24s
build configuration / build_and_cache_bridge01 (pull_request) Successful in 1m9s
build configuration / build_and_cache_web02 (pull_request) Successful in 1m16s
build configuration / build_and_cache_vault01 (pull_request) Successful in 1m33s
build configuration / build_and_cache_web01 (pull_request) Successful in 1m56s
ed50bab459
A very simple basic support for it, which requires a S3 admin token.

Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
thubrecht reviewed 2024-10-10 12:34:09 +02:00
terranix/s3.nix Outdated
@ -0,0 +20,4 @@
};
};
garage_key = { };
garage_bucket_key = { };
Owner

??

??
Author
Owner

it's just to showcase how to use it

it's just to showcase how to use it
Author
Owner

terraform won't delete things it doesn't know about FYI

terraform won't delete things it doesn't know about FYI
thubrecht marked this conversation as resolved
rlahfa force-pushed declarative-buckets from ed50bab459 to 483bf93d26 2024-10-10 12:41:13 +02:00 Compare
rlahfa force-pushed declarative-buckets from 483bf93d26 to a1ace67cbd 2024-10-10 16:45:32 +02:00 Compare
rlahfa force-pushed declarative-buckets from a1ace67cbd to 0acececb31 2024-10-10 16:47:01 +02:00 Compare
rlahfa force-pushed declarative-buckets from 0acececb31 to d5e7ea14e7 2024-10-10 17:04:34 +02:00 Compare
rlahfa force-pushed declarative-buckets from d5e7ea14e7 to 2a89984ad6 2024-10-10 17:07:17 +02:00 Compare
rlahfa force-pushed declarative-buckets from 2a89984ad6 to a37d83c418 2024-10-10 17:30:58 +02:00 Compare
rlahfa force-pushed declarative-buckets from a37d83c418 to 5a14c63ba5 2024-10-10 17:53:06 +02:00 Compare
rlahfa force-pushed declarative-buckets from 5a14c63ba5 to 2ce8c125d4 2024-10-10 17:59:07 +02:00 Compare
thubrecht force-pushed declarative-buckets from 2ce8c125d4 to 822b4f3b83 2024-10-22 13:32:25 +02:00 Compare
Owner

Ce serait tip top de rajouter un poil de documentation sur comment se servir de terraform

Ce serait tip top de rajouter un poil de documentation sur comment se servir de terraform
Some checks are pending
Check meta / check_meta (push) Successful in 15s
Required
Details
Check meta / check_dns (push) Successful in 16s
Required
Details
lint / check (push) Successful in 26s
Check meta / check_meta (pull_request) Successful in 16s
Required
Details
Check meta / check_dns (pull_request) Successful in 16s
Required
Details
build configuration / build_and_cache_storage01 (pull_request) Successful in 1m17s
build configuration / build_and_cache_compute01 (pull_request) Successful in 1m35s
build configuration / build_and_cache_rescue01 (pull_request) Successful in 1m11s
build configuration / build_and_cache_geo01 (pull_request) Successful in 1m7s
build configuration / build_and_cache_geo02 (pull_request) Successful in 1m6s
build configuration / build_and_cache_vault01 (pull_request) Successful in 1m27s
build configuration / build_and_cache_web02 (pull_request) Successful in 1m4s
build configuration / build_and_cache_web01 (pull_request) Successful in 1m50s
build configuration / build_and_cache_web03 (pull_request) Successful in 1m12s
build configuration / build_and_cache_bridge01 (pull_request) Successful in 1m2s
lint / check (pull_request) Successful in 23s
Build all the nodes / *
Required
Run pre-commit on all files / *
Required
Check workflows / *
Required
This pull request has changes conflicting with the target branch.
  • default.nix
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin declarative-buckets:declarative-buckets
git checkout declarative-buckets
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DGNum/infrastructure#145
No description provided.