Commit Graph

28 Commits

Author SHA1 Message Date
Christian Goll
b4acf0fdf2 added hash check for node edit
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-24 19:47:22 +01:00
Christian Goll
d34e496d42 wwctl node add without global variables
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-08 12:33:05 +01:00
Christian Goll
d3af143a5b main_tests are not working as expected
The global values which store the flags are not regenerated during test

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-07 17:01:57 +01:00
Christian Goll
255ff61dc8 adding netname option back 2022-08-31 17:05:28 +02:00
Christian Goll
b485ea999f removed optionStrMap in favor of NodeConf
openStrMap is a map[string]string which is sent arround. This is now
done by using a unmarshalled NodeConf instead.
2022-08-18 19:22:55 +02:00
Christian Goll
d252b974bf Fix Nodeadd with ipaddr count 2022-07-21 08:41:36 +02:00
Christian Goll
26fff30897 node add with all options now 2022-07-18 14:42:00 +02: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
Carter Dodd
379faad51d Refactor of server, logging, building of images, template updates
* Combine provision response handling, add hwaddr and interface to dhcp
* Simplify stage cases, add backward compatible uri parse
* Move control of image compression to client
* Fix kernel search path for ubuntu, buffer template generation
* Implement cpio and gz as functions, add log named functions
* Generalize fs image creation routine
* Combine daemonLogf to generalized wwlog
* Fix template newline insertion, update dhcp and hosts tmpl
* Update IPXE template to handle non-compressed files
* Update DHCP template to set network interfaces and server IP assignment
* Update DHCP/hosts templates to choose a host-name self-consistently
2022-05-13 16:52:59 -05:00
Christian Goll
55bf1695de initial commit of simple ipv6 support
As soon as in warewulf.conf a value for ipaddr6 is defined
all nodes will get a derived ipv6 address if not the ipv6
is not explicitly set.
2022-03-15 15:57:35 +01: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
498515f7b5 Minor usability fixes in network config 2021-10-23 12:25:51 -07:00
Gregory Kurtzer
1370932cd3 Introduction of netname functionality for network devices 2021-10-23 07:12:57 -07:00
Gregory Kurtzer
51c15f3c39 Update CLI to all use the new expand bracket capability 2021-10-15 21:37:47 -07:00
WestleyR
705b321f80 Better error handling for some of wwctl commands
Better error handling, also prints a stack trace for `wwctl` if
`--debug` flag is used.
2021-09-10 21:18:45 -07:00
WestleyR
4edc16953e Fix linting issues 2021-09-07 20:48:51 -07:00
Gregory Kurtzer
a82e1b0ea5 Fixed formatting across entire project 2021-08-21 08:04:47 -07:00
Niko Kivel
cba1e926f9 fixed n.Id.Get() in wwlog.VERBOSE 2021-05-14 15:12:38 +02:00
Niko Kivel
16db64f9dc removed group and controller, added ClusterName 2021-05-14 15:08:58 +02:00
Niko Kivel
3308e76083 NIC type for node-->add 2021-03-26 10:38:31 +01:00
Ian Kaneshiro
846b45524c Tidy up
- Ran goimports to format code and imports
- Removed unused module from go.mod
- Added .editorconfig to keep formatting standard across contributors
2021-02-16 11:54:12 -08:00
Gregory Kurtzer
62a1abaab3 Cleanups and minor fixups 2020-12-13 22:45:08 -08:00
Gregory Kurtzer
eaf6bb1196 This is a work in progress API shift as the data structure has changed and I'm cleaning the interface. 2020-12-03 07:34:26 -08:00
Gregory Kurtzer
4d752a67db Added controllers, services, and lots of various optimizations and fixes 2020-11-30 23:07:42 -08:00
Gregory Kurtzer
e5e23b5868 Changed backend node API to account for default and overrides for UI 2020-11-23 23:11:20 -08:00
Gregory Kurtzer
5cd1dc901e Lots of updates with the node management CLI tools 2020-11-22 20:35:13 -08:00
Gregory Kurtzer
1d1a02b305 Building set commands for nodes and groups and templating out CLI further 2020-11-21 01:48:38 -08:00