3rd party abra integration thread #106
Labels
No Label
abra
abra-gandi
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
democracy
design
documentation
duplicate
enhancement
finance
funding
good first issue
help wanted
installer
kadabra
performance
proposal
question
recipes.coopcloud.tech
security
test
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/organising#106
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
VPS providers
DNS providers
(Feel free to edit this post to update!)
abra server new capsul [--instance/-i <instance>] [--token/-t <token>] ...
where if any flags are missing, we prompt for interactive input. We can implement this as a plugin within thego-abra
source tree. Each sub-command such ascapsul
can specify its own flags to match required inputs.I can't edit this post but I would love to see freedns.afraid.org as well as porkbun.com as DNS providers :)fixed!When I was doing this, I decided to base it on Terraform. Terraform has a ton of already supported providers, w/ a nice and easy (open) way to add more. And it's easy-ish to use terraform modules to make it so that apps can require specific records to be created without knowing what provider they will use.
https://git.sequentialread.com/forest/rootsystem/src/branch/master/terraform-modules/gateway-dns
https://git.sequentialread.com/forest/rootsystem/src/branch/master/terraform-modules/dns-gandi
I wrote code that generates the root terraform code file based on the modules:
https://git.sequentialread.com/forest/rootsystem/src/branch/master/automation/terraformCodeGeneration.go#L72
I'm not saying my code is the best way to do this or you should use it, just wanted to share the approach I took.
I also built a UI for the terraform plan and apply process. It generates an SVG diagram of the terraform modules & resources using graphviz
dot
and post-processes the SVG to make it style-able within HTML. then the HTML-based client GUI application applies CSS animations to the SVG elements based on thier current build/apply status.https://git.sequentialread.com/forest/rootsystem/src/branch/master/automation/terraformSvg.go
https://git.sequentialread.com/forest/seedpacket/src/branch/master/webcontent/wizard/launch/infrastructure-provisioning.js#L234
Demo video of this is here: https://picopublish.sequentialread.com/files/automated-server-garden-demo1.mp4
The specific part im talking about starts at 18 minutes in:
Yes this whole process was terribly hacky in more than 1 way, but I did believe in it, and I still do--
I think that building a GUI for these awesome and powerful "enterprise automation" apps like terraform might be decent way to bridge the gap between the "graybeards" and the "soccer moms".
Refs:
TF_IN_AUTOMATION=1 terraform apply -input=false -auto-approve -json -var="x=y"
- runs terraform and spits out everything as JSON which is super easy to parse fromabra
Next steps for the Terraform investigation:
~/.abra/servers/foo/...
folders alongside the existing env files. this fits in with our existing shared git repository workflowI liked how simple it was to spec out creating a Hetzner VPS:
then
terraform init
,terraform plan
andterraform apply
basically.terraform looks really cool as a tool and has a pretty big library of providers from what I see but I have some concerns about hashicorp closing it down at some point, also this opens the door for using AWS, GCP, Azure and other questionable services. I also want to refer to this issue: #91 and the question "how can we keep this anti-capitalist af?".
Even though terraform is unquestionably a cool tool I think we might want to avoid incorporating it in this project. I'm not saying "absolutely no!" though and if it saves us enough time and we can make good use of it i'm ok with going that way
FWIW I like your argumentation @knoflook and am moving on with implementing as-thin-as-possible integrations and leaving Terraform. https://github.com/libdns/libdns seems like a solid general DNS library and I'll get the Gandi implementation done shortly.
awesome! that means we can contribute our code to other projects which is always cool 🖤
are you going to use your private github account for it or is there a co-op cloud github account that we should use for maintaining our providers?
@knoflook I've made a start in:
And storing library code in:
If you're rocking Gandi,
abra domain list -p gandi <zone>
works right nowIf you want to add a separate provider, follow https://github.com/libdns/libdns#implementing-new-providers and host it in a separate repo? Can be under the
coop-cloud/...
namespace or? Like we do withtagcmp
.ah yeah i forgot that you can fork from gitea to github. I started working on porkbun provider but I have to educate myself on how go packages work - i have some library code written but i don't know how to execute it 🤦
Go packages (modules ) are typically git repos -- the package ID is the repo URL.
So you would 1st create the repo, say https://git.coopcloud.tech/coop-cloud/my-thingy
Say that the go source files are located at the root of the repository. Then you would go there and run
go mod init git.coopcloud.tech/coop-cloud/my-thingy
If the source files are in a sub folder, say,
pkg
instead, it would bego mod init git.coopcloud.tech/coop-cloud/my-thingy/pkg
From there you should be able to run
go run
,go build
,go test
, and you should be good to go. Once you push thego.mod
andgo.sum
files thatgo mod init
created, other folks should be able to pull in your package by runninggo get git.coopcloud.tech/coop-cloud/my-thingy
Some other stuff but that basically it 👌
We setup coop-cloud/coopcloud.tech#20 so we can
go install coopcloud.tech/...
stuff because Fux Github.The Gandi implementation is now out on latest, I've just ran:
Probably needs a UI/UIX pass but anyway, functional for now.
I'm gonna switch this issue over to spicing abra up as we've prototyped integrations with 3rd party providers now and people can add their own as needed or convince us to do it if they really need them ;)
I'm moving on.
3rd party go-abra integration threadto 3rd party abra integration threadMaybe gonna close off this mega thread now and we can open specific tickets for specific integrations as needed.