Commit Graph

12 Commits

Author SHA1 Message Date
Jonathon Anderson
22910958b5 Replace all instances of wwlog.Printf
wwlog provides named loggers for each level, which requires
less code and is clearer than wwlog.Printf. The code has
included a mix of both, but this commit consolidates existing
code on the per-level functions.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-09-11 08:00:23 -06:00
Christian Goll
d10b4c352f new apinode namespace in wwapid 2022-07-13 16:05:16 +02:00
MatthewHink
d8cd6049ac Initial cut of wwapi.
We need an API for Warewulf in order to automate around it. The initial version of the API will look a lot like wwctl. wwctl will call the API so that we do not need to maintain separate code paths. In this preview wwctl calls the API via direct function call, but we can change that to a gprc or REST call to a Warewulf server in the future.

This commit contains:
wwapid WareWulf API Daemon. A grpc server with mTLS auth.
wwapic WareWulf API Client. A grpc client with mTLS auth. It's just a sample that reads the version from the server.
wwapird WareWulf API Rest Daemon. A http REST reverse proxy to wwapid.
There are also sample insecure and secure curls to test with.

Implemented Functionality:
wwctl node add
wwctl node delete
wwctl node list
wwctl node set
wwctl node status
wwctl container build
wwctl container delete
wwctl container import
wwctl container list
wwctl container show

Some notes on the files:

    Logic that was in wwctl has moved to warewulf/internal/pkg/api. wwctl just calls the API. wwctl functionality is unchanged.
    Everything under the /google directory is copied google proto code to stand up wwapird. It's a bit strange to copy in the code, but that is currently how it's done.
    Everything in warewulf/internal/pkg/api/routes/wwapiv1 is generated code.

There are some loose ends here, such as no service installers. I just ran off the command line for development.
The Makefile could use improvement. I'm building by make clean setup proto all build wwapid wwapic wwapird ; echo $?
I copied the configs from warewulf/etc to /usr/local/etc/warewulf manually.
2022-06-24 08:39:30 -07:00
Gregory Kurtzer
f3854e2ab4 Give a 5 second buffer for all updates to come in. 2022-02-09 20:53:47 +00:00
Gregory Kurtzer
6afb3f3e25 Added filter and sort options for last, check-in, reverse, etc. 2022-01-05 05:20:07 +00:00
Gregory Kurtzer
1ccc65a91e Simple name change on header 2021-12-31 04:53:10 +00:00
Gregory Kurtzer
6313220ca6 Automatically change color based on "UpdateInterval" from config 2021-12-31 03:47:34 +00:00
Gregory Kurtzer
875e37f4de Support node ranges in wwctl node status 2021-12-31 03:38:12 +00:00
Gregory Kurtzer
fdbca2e07d Add color to wwctl node status output and time based filter 2021-12-31 03:24:09 +00:00
Gregory Kurtzer
a788db282c Allow for change of update frequency for watching node status 2021-12-31 02:46:22 +00:00
Gregory Kurtzer
39ec7c0807 A few usability fixes and put full node DB logic into warewulfd 2021-12-31 02:38:48 +00:00
Gregory Kurtzer
525ac1184e Simplified version of node status monitoring with CLI 2021-12-30 23:26:45 +00:00