Commit Graph

58 Commits

Author SHA1 Message Date
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
jcsiadal
9b6b93a5cb Rename default to primary in src
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-05-05 03:13:21 +00:00
Gregory Kurtzer
c95c518dde Align boolean prints 2022-04-27 22:33:34 -07:00
Christian Goll
edc7c04bc2 PrintB returns string 2022-04-14 11:43:02 +02:00
Christian Goll
f9848455c7 output ipmi write status 2022-04-14 11:29:24 +02:00
Christian Goll
95050a44ce add user defined keys for networks/netdev
Every network in the profile and for the nodes can have induvidual keys values
pairs, called Tags, which are propergated to the templates. So they can be used
for things like MTU size like
  `wwct node set node01 --nettag mtu=9000`
and in in ifcfg.xml.ww
```
{{ if $netdev.Tags.mtu -}}
<mtu> {{ $netdev.Tags.mtu }} </mtu>
{{ end -}}
```
2022-04-06 21:36:17 +02:00
jcsiadal
bfde70cf8a Error free lint
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-04 17:01:11 +00:00
Christian Goll
4fc56e2cd0 fixed lint 2022-03-15 16:03:53 +01: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
1203186194 Support kernel overrides from the host or other containers 2022-02-17 07:37:04 +00:00
Gregory Kurtzer
104bc7527d Restored deleted kernel components for overrides 2022-02-17 06:21:40 +00:00
Gregory Kurtzer
5a0c13225e Utilize containerized kernel and remove kernel Support 2022-02-15 06:49:24 +00:00
Gregory Kurtzer
ffaf794a42 Changed "key" paramaters to tags and cleaned up interface 2022-02-11 05:52:46 +00:00
Gregory Kurtzer
d9c13c3f36 Initial commit of asset key tag security check 2022-01-24 00:32:02 +00:00
Gregory Kurtzer
f0fa6385eb Add "DEFAULT" to the node and profile list output 2021-12-29 17:50:49 -08:00
Gregory Kurtzer
00d8d42e9d First pass at a rework of the overlay subsystem in Warewulf 2021-12-29 16:11:25 -08:00
Gregory Kurtzer
938511e9cd Merge branch 'main' of github.com:gmkurtzer/warewulf into netdev_refactor 2021-12-28 15:17:21 -08:00
Michael L. Young
12ee1061cf Add some spacing around the IPMI port column 2021-12-07 11:06:37 -05: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
Gregory Kurtzer
20031c2cfb More nomenclature cleanups 2021-09-12 14:25:43 -07:00
Gregory Kurtzer
859bbcc316 Be more consistent with UI nomenclature with kernel and container 2021-09-12 13:35:49 -07:00
Michael L. Young
e171eae858 Clean up typos from copy and paste 2021-08-25 07:59:35 -04:00
Michael L. Young
13ad67e56e Add IPMI Port Configuration
This commit adds the ability to configure the default IPMI port for a
profile or per node. If the port is not set, we default to 623.

Updated some areas to default to 'lan' for IPMI interface if it has not
been set.
2021-08-24 19:11:39 -04:00
Gregory Kurtzer
82696410ed Minor fix of print argument count 2021-08-20 11:53:57 -07:00
Christian Goll
c6b2fc5795 added configureable ipmiinterface used by ipmitool
ipmitool is now searched from $PATH, so that self
compiled ipmitool can be used
2021-08-06 09:22:31 +02:00
Niko Kivel
df1f0bed2f prefix in list-command to identify keys more easily 2021-05-11 08:49:37 +02:00
Niko Kivel
17f26e8bf1 Params-->Keys 2021-05-11 08:45:09 +02:00
Niko Kivel
54b2164c4e custom paramters 2021-05-10 00:12:13 +02:00
Niko Kivel
dd4c075f50 paramters in node 2021-05-08 19:04:37 +02:00
Gregory Kurtzer
4bc523a052 Optimized sorting methods across nodes and profiles 2021-04-25 15:43:35 -07:00
Gregory Kurtzer
a336259ea2 Add a bar separator for wwctl node list 2021-04-25 13:55:52 -07:00
Gregory Kurtzer
5e53ff1b7d Remove useless "Disable" (ref #40) 2021-04-25 13:41:21 -07:00
Gregory Kurtzer
b4a6e45b35 Fixed bug reported by John Linford on wwctl node list -n output 2021-02-28 21:02:13 -08: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
8a419f648b Properly configure a network device to be default 2020-12-22 21:51:05 -08:00
Gregory Kurtzer
780fb4faa8 Move the sort to the constructors. 2020-12-22 21:18:15 -08:00
Gregory Kurtzer
e5be3d8182 Cleaned init subsystem, Ipmi, SELinux, added Root option, and fixed defaults 2020-12-20 22:41:02 -08:00
Shannon V. Davidson
cb8336be8c Merge branch 'main' of github.com:ctrliq/warewulf into main 2020-12-14 09:14:19 -06:00
Gregory Kurtzer
5c23ef9f94 Fininshed with node discovery and service refactoring 2020-12-13 20:20:03 -08:00
Shannon V. Davidson
643a69b75b Added IpmiGateway in case of separate BMC and control network 2020-12-10 09:52:22 -06:00
Gregory Kurtzer
5c995f9d0f Added Init to datastructure, fixups to container interface, and --setdefault to kernel and container build 2020-12-06 22:29:25 -08:00
Gregory Kurtzer
8c11c2b304 Renamed vnfs to container, finished VNFS and kernel refactoring 2020-12-06 00:47:00 -08:00
Gregory Kurtzer
e80878b240 Changed DomainName to ClusterName 2020-12-03 19:37:52 -08:00
Gregory Kurtzer
84bf9fbb43 profile and node commands and DB all working as expected now 2020-12-03 13:49:49 -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
931a3cce05 Sort node output 2020-12-02 11:22:50 -08:00
Gregory Kurtzer
43ad7e570c API updates and fixes to CLI 2020-12-01 23:34:24 -08:00
Gregory Kurtzer
581bc929e0 Add IpmiNetmask configuration 2020-12-01 18:03:22 -08:00
Gregory Kurtzer
4d752a67db Added controllers, services, and lots of various optimizations and fixes 2020-11-30 23:07:42 -08:00