James Shubin
219d25b330
engine: resources, modules: virtualization: Add a seeds option
...
This makes it easier to configure the machine by giving it an automatic
initial setup of an mgmt client.
2025-03-11 04:18:02 -04:00
James Shubin
181aab9c81
engine: resources: Fix small cmp typo in virt builder res
2025-03-10 19:01:05 -04:00
Edward Toroshchyn
63d7b8e51e
engine: resources: exec: Fix wrong err variable being checked in test
2025-02-27 14:50:38 -05:00
Edward Toroshchyn
c25a2a257b
misc: Fix typos and spelling errors
2025-02-24 16:01:46 +01:00
Lourenço
b5384d1278
engine: resources: Adding logic for svc unit state
...
This is a small patch that adds logic for checking what's the state of
the unit file and making the CheckApply function more robust
2025-02-18 17:14:27 -05:00
James Shubin
d80ec4aaa7
engine: resources: Detect simple self-referential frags
...
It would be a likely mistake to create a self-referential frag, and mgmt
would spin forever updating the file... We probably don't want this, so
let's just catch this case in Validate.
Of course you could get around this with multiple files, and a fancier
search could statically check the graph, but the goal isn't to prevent
any bad code, since that's not likely to be possible.
2025-02-15 06:58:15 -05:00
James Shubin
82489c3fe0
engine: resources: Add shell field to user resource
2025-02-07 18:08:25 -05:00
James Shubin
f51a1200d1
util: Add a helper to get the users shell entry
2025-02-07 17:57:36 -05:00
James Shubin
096ef4cc66
engine: resources: Modernize the user resource
...
Do some small fixups like adding ctx and fixing obvious bugs.
2025-02-07 17:57:36 -05:00
hades
8cd7fa27e2
engine: resources: exec: Add a bit of documentation to exec res
2025-02-06 08:18:48 -05:00
Edward Toroshchyn
042ae02428
engine: resources: exec: Add tests to check env values
2025-02-06 07:14:12 -05:00
James Shubin
0fb546ad61
engine: resources: Make some svc cleanups
...
We would often actually drop the refresh because of bad checks.
2025-02-02 01:43:14 -05:00
James Shubin
5044ef4e8a
engine: resources: Add a virt builder password selector
...
This is very helpful for debugging, particularly with broken Debian
installs.
2025-01-30 22:56:24 -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
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
a713c08585
engine: resources: Make net and firewalld resources quieter
...
They are too noisy!
2025-01-17 23:32:13 -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
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
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
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
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
69e84fbbed
engine: resources: cron: Add ctx where possible.
...
Lots of the API's here now support this. Here's an example, work on the
others too.
2024-11-06 21:09:50 -05:00
James Shubin
f8b06f32ec
engine: resources: Remove unused wait group
2024-11-06 21:09:50 -05:00
James Shubin
59a20f53eb
lang: core: sys, engine: resource: Update hostname functionality
...
We didn't have a solid resource and sys.hostname() didn't have events!
2024-11-06 21:09:50 -05:00
James Shubin
e4f062b006
engine: resources: Parse distro properly
...
I regressed here when patching this. Here's the fix. Would be beautiful
to have hardware to run end-to-end testing on. If you want to sponsor
this, please let me know!
2024-10-30 16:04:01 -04:00
James Shubin
20d4809e8e
engine: resources: Print netmask nicely for our DHCP resource
...
Makes it easier to see what's going on.
2024-10-29 16:42:15 -04:00
James Shubin
583f90dc7b
util: distro: Rename functions to avoid golang stutter warning
2024-10-25 02:56:12 -04:00
James Shubin
85e1d6c0e8
engine: resources: Make sure to set the netmask
...
Some clients would DECLINE if this was not set. This was reproduced my
using the stock coredhcp DHCPv4 server and disabling the netmask plugin.
One of the clients that would DECLINE is a Lenovo ThinkCentre m90n doing
a UEFI (PXE) netboot.
This was found in 1327752725 and is
hopefully now completely fixed!
2024-10-25 00:57:50 -04:00
James Shubin
067eef9007
util: distro, engine: resources: Update virt-builder res
...
A little easier to maintain if we support more distros eventually.
2024-10-15 20:36:51 -04:00
James Shubin
d403f18b2a
util: distro: Put distro specific data in this util package
...
Try and see if we can put all our distro specific stuff in here...
2024-10-15 19:04:17 -04:00
James Shubin
1f12150d8f
engine: resources, examples: lang: Expand on future deploy ideas
...
This is one idea for reference. But I doubt this is needed anytime soon
since we have a good working solution in the examples.
2024-10-13 20:47:47 -04:00
James Shubin
d3a7cefcc6
engine: resources: Add an archiving, deploy resource
...
This makes a bundle out of the code in the current deploy. Hopefully
this is useful for handoff!
2024-10-13 16:44:23 -04:00
James Shubin
6419f931ee
engine: resources: Add a virt-builder resource
...
This wraps the excellent virt-builder utility which makes setting up new
virtual machines a breeze.
2024-09-26 11:47:40 -04:00
James Shubin
8aac770bcb
engine: resources: pkg: Add a small helper for simple installs
...
Add this utility function for doing single package installs.
2024-09-25 16:26:32 -04:00
James Shubin
80e8c9cadc
util: arch: Use small arch util library
...
Put all of the arch stuff that we can into this library.
2024-09-25 16:25:55 -04:00
James Shubin
b9e093cd6b
engine: resources: svc: Reduce unnecessary logging
2024-09-18 21:47:29 -04:00
James Shubin
06a023ca66
engine: resources: sysctl: Be more careful about dir path
...
More validation is not bad!
2024-09-18 21:39:33 -04:00
James Shubin
ccb4c6244d
engine: resources: exec: Improve the docs for a common scenario
...
I knew this, and now you know it too!
2024-09-18 21:39:03 -04:00
James Shubin
fd508fbc0d
engine: resources: Fix typo in svc
...
It's a typo, right?
2024-09-17 18:10:13 -04:00
James Shubin
a4f368fc9f
engine: resources: Add a sysctl resource
...
Very useful since these are easy to forget!
2024-09-15 23:07:03 -04:00
James Shubin
e7b57a32fd
engine: resources: Add a tar resource
...
This makes tar archives from a list of files and/or directories. It
correctly includes empty directories as well. The code structure is
similar to the gzip resource. While this resource is arguably more
useful than gzip, it was invaluable to write the gzip resource first
since that made writing this one much easier.
2024-09-13 20:04:53 -04:00
James Shubin
e34212a10b
engine: resources: gzip: Check unhandled error
...
This is probably inconsequential, but let's do it since it's not in a
defer.
2024-09-13 19:48:00 -04:00
James Shubin
5f6e07b5e8
engine: resources: gzip: Fix typo
2024-09-13 16:24:01 -04:00
James Shubin
1465c5cdc9
engine: resource: gzip: Remove unneeded waitgroup
...
I think this was a copy+pasta mistake.
2024-09-13 16:13:03 -04:00
James Shubin
5bbc06d8bc
engine: resources: Add new gzip resource
...
This may have lots of uses, particularly for bootstrapping and handoff
if we want to compress payloads. It is also a good model resource for
how to implement such a resource to avoid re-computing the result on
every CheckApply call. Of course if the computation is cheaper than the
hashing of the data this isn't the optimal approach.
2024-09-13 03:32:10 -04:00
James Shubin
1327752725
engine: resources: Special log message for unhandled decline
...
Not sure why a PXE client is sending these... Not sure if it's buggy
firmware or my inability to handle a DHCP corner case.
2024-09-10 23:22:47 -04:00
James Shubin
fd3a2a1f0f
engine: resources: Make consul optional
...
Licensing has made this non-free. Let's put that behind a build tag for
now, and remove it entirely if no suitable libre replacement is found.
2024-09-03 20:26:38 -04:00
James Shubin
c6e9175e3f
engine: resources: Add missing build tag
2024-09-03 20:21:31 -04:00
James Shubin
bfa88e9b1c
engine: resources: Workaround regression in wget2
...
Apparently wget2 has a serious regression that the HTTP 102 header
throws it off... So let's not send this for now... I'm pretty unhappy
about this, wget used to always be rock solid. Maybe curl deserves a
chance? (This works fine with curl btw.)
2024-08-30 20:33:41 -04:00