James Shubin
d30ea571f1
misc: Update to golang 1.22
...
Ran:
go get -u ./...
go mod tidy
We also got rid of travis and simplified things a bit.
2025-01-26 17:16:40 -05:00
James Shubin
d30ff6cfae
legal: Remove year
...
Instead of constantly making these updates, let's just remove the year
since things are stored in git anyways, and this is not an actual modern
legal risk anymore.
2025-01-26 16:24:51 -05:00
James Shubin
1d3f2dbe3c
util: Add a pprof helper package
...
As it turns out, there are other helper packages out there. I wrote this
before I realized that, and it didn't take me that long anyways.
2025-01-24 03:06:31 -05:00
James Shubin
ca6e7ad432
lang: types, lang: core: strings: Add a new join_nonempty function
...
Along with a helper function for when we need a []string from a Value.
2025-01-24 00:07:23 -05:00
James Shubin
f92afe9ae4
modules: meta: Add a router meta module
...
Useful for setting up simple routers. Some auto-provisioning polish
would definitely help, but this is pretty useful already.
2025-01-18 01:22:33 -05:00
James Shubin
483cc22c32
lang: core: embedded: provisioner: Add IPXE support
...
This lets you boot from ipxe. You can run the ipxe shell from their
stock image or the netboot.xyz one. For the latter, press "m", then type
"dhcp" (machine is now pingable!) then type "route" to check the ip.
To boot type:
chain http://192.168.42.1:4280/menu.ipxe
and you're off!
Thanks to frebib for finding the workaround to the VFS bug. The answer
is you need to run the imgfree command to unblock the initrd.
2025-01-18 01:07:19 -05:00
James Shubin
2f3bd72491
lang: core: embedded: provisioner: Fix regression in Fedora 41
...
Unfortunately with Fedora 41 and DNF5, this breaks what our host machine
expects. So you now need dnf5+ to make this work, or you can revert this
commit.
2025-01-18 01:02:17 -05:00
James Shubin
6499fcb1e0
modules: dhcp: Support the authoritative setting
...
Quite useful if we plumb it all the way through!
2025-01-18 00:30:46 -05:00
James Shubin
12a0600d38
engine: resources: Improve hostname change message
...
Make it clearer where empty strings are, and that it already happened.
2025-01-17 23:58:26 -05:00
James Shubin
cace2bacb8
lang: core: embedded: provisioner: Add support for module path
...
This is needed for bigger code bases. Remember: this is consulted at the
deploy stage, and the deploy contains the entire tree (including
modules) of everything it needs to run. This is why you don't need to
add a --module-path arg when running mgmt in systemd with the "empty"
frontend.
2025-01-17 23:54:30 -05:00
James Shubin
05d440114a
lang: core: embedded: provisioner: Remove stale comment
2025-01-17 23:49:21 -05:00
James Shubin
b392285e1d
gapi, lang: gapi: Make dir to avoid errors
...
It seems we sometimes need to make the intermediate dir.
2025-01-17 23:32:13 -05:00
James Shubin
a713c08585
engine: resources: Make net and firewalld resources quieter
...
They are too noisy!
2025-01-17 23:32:13 -05:00
James Shubin
8e8e831e73
modules: misc: Switch type to list of strings
...
The DNS entry should be a list of strings. We would have caught this
earlier but this helped us find a type unification issue.
2025-01-17 23:28:05 -05:00
James Shubin
86b95b2c0b
modules: shorewall: Fix type on stoppedrules file
2025-01-17 22:12:55 -05:00
James Shubin
4a578ca40c
lang: core: embedded: provisioner: Handoff a hostname
...
This makes it easier to run config tools if the hostname is already set.
2025-01-17 19:48:23 -05:00
James Shubin
a60148f370
lang: core: net: Add more ip utilities
2025-01-17 18:58:21 -05:00
James Shubin
00366de67b
modules: purpleidea: Update my personal packages
2025-01-17 18:57:18 -05:00
James Shubin
a08ba0b0e9
engine: resources: Tar now accepts dirs without a trailing slash
...
If these are found, then the dir path itself is copied in as well.
2025-01-17 18:15:45 -05:00
James Shubin
81b102ed7f
lang: ast: Allow multiple star imports
...
If more than one star import is present in the same scope, allow it. If
one star import could overwrite something, ordering is not guaranteed.
We allow this for now, but we might create a compiler fix to stop it.
This adds a test to notice both of these behaviours.
2025-01-17 14:03:48 -05:00
James Shubin
c8f911ec5d
lang: core: embedded: provisioner: Fix panic
...
The conditions changed for this one, make it stricter.
2025-01-17 12:35:30 -05:00
James Shubin
7694da4241
lang: core: embedded: provisioner: Skip bmc if empty
2025-01-17 12:34:27 -05:00
James Shubin
a0d500a602
lang: interfaces: Remove dangerous init method
...
This can cause the source to get overwritten and changed and is usually
unnecessary.
2025-01-04 20:56:11 -05:00
James Shubin
553172992f
lang: parser: Typo fix
2025-01-04 20:55:41 -05:00
James Shubin
e6d614f4dd
engine: resources: Add a bmc resource
...
This resource manages bmc devices in servers or elsewhere. This also
integrates with the provisioner code.
2025-01-03 18:19:31 -05:00
James Shubin
3107dfbd08
modules: shorewall: Small fixups to improve the module
...
These are some common fixes and improvements for normal shorewall usage.
As we shake out more uses of this, we find small issues. This lets us
have long rules, and a better default config.
2025-01-02 15:43:27 -05:00
James Shubin
802823dcb0
modules: misc: Support VIP's in network config
2025-01-02 15:42:40 -05:00
James Shubin
5858c8b501
pgraph: Panic if vertex is nil
...
These should be caught early.
2024-12-18 13:49:13 -05:00
James Shubin
2561dba8f5
lang: Increase debugging timeout
2024-12-15 10:39:46 -05:00
James Shubin
f5806e0617
lang: funcs: structs: Add Call and CallStruct methods for composite
...
It might turn out the CallStruct is the API we want. This will depend on
the future iterations of the function engine.
2024-12-08 17:43:41 -05:00
James Shubin
e9dbb7b86c
lang: funcs: structs: Add Call method for const
2024-12-08 16:48:04 -05:00
James Shubin
28f5b8331a
lang: funcs: structs: Improve naming
...
These could print nicer for debugging.
2024-12-08 16:24:42 -05:00
James Shubin
5ff4f0456a
lang: Add mode to overwrite tests
...
This is useful if we need to reformat a bunch of previously passing
tests.
2024-12-08 15:34:28 -05:00
James Shubin
82c614f2d9
engine: resources: Workaround broken debian package when building images
2024-12-06 15:59:39 -05:00
James Shubin
50265d2303
engine: resources: Pull out a distro function for guest
2024-12-06 15:58:51 -05:00
James Shubin
ecee84aa28
docs: New blog post about modules and imports
2024-12-03 03:00:21 -05:00
James Shubin
2e146e8c8e
engine: resources: Fix up some issues with cron
...
This really needs looking at again, since it's so old and buggy or
broken.
2024-12-03 01:52:23 -05:00
James Shubin
097efdd66a
engine: graph: autoedge: Clean up redundant logs
...
They repeat themselves, this is cleaner.
2024-12-03 00:56:22 -05:00
James Shubin
5764c977f1
modules: misc: Don't ignore the router setting
...
This mistake caused us to ignore the router setting when we wanted it!
Woops =D
2024-12-03 00:43:32 -05:00
James Shubin
4d30772b3b
lang: Add test for unused include statements
...
Even if they have no side effect, they aren't legal, since it would be
surprising if suddenly something new got added in one which then broke
the imports.
2024-11-28 19:17:33 -05:00
James Shubin
8472b1ebf2
lang: gapi: Convenience the user by allowing relative dirs in cli
2024-11-28 19:17:17 -05:00
James Shubin
e1070d3e13
lang: ast, download: Improve error messages
2024-11-28 19:17:17 -05:00
James Shubin
98d7f294eb
lang: download: Improve git reliability
...
Fix a small panic that could happen if we had a bad clone, and make
visibility into this operation better. We also make room for future
context cancellation since the library now supports this.
2024-11-28 16:38:33 -05:00
James Shubin
517fc1e05b
lang: gapi: Remap the module path correctly
...
If we've set the --module-path arg, then we expect to rebase that path
out of the deploy, and instead it should show up as /modules/ which is
the standard. Handle this scenario.
2024-11-28 16:29:33 -05:00
James Shubin
c2f75d64a6
util: arch: The Any value should be the same everywhere
...
In 80e8c9cadc when this was ported, the
"Any" value diverged accidentally. This would cause some packages to not
be found, since they didn't match any arch.
Thanks to karpfen to digging into the issue.
2024-11-28 14:55:30 -05:00
James Shubin
380004b1dc
readme, docs: New docs available
2024-11-23 01:25:40 -05:00
James Shubin
28a443d11d
docs: Add a hack for golang functions
2024-11-22 14:20:24 -05:00
James Shubin
a600e11100
cli, docs: Add a docs command for doc generation
...
This took a lot longer than it looks to get right. It's not perfect, but
it now reliably generates documentation which we can put into gohugo.
2024-11-22 14:20:16 -05:00
James Shubin
7b45f94bb0
lang: core: Remove the unnecessary func suffix
...
We don't really need these, it's clear what things are.
2024-11-22 01:18:19 -05:00
James Shubin
acdd6476f2
test: Remove empty variable
...
Copy-pasta bug!
2024-11-21 23:49:32 -05:00