Commit Graph

75 Commits

Author SHA1 Message Date
Christian Goll
18eb531d4b fixed deletion of network and deletion of tags 2022-09-02 16:45:37 +02: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
925a5a2155 Fix node set 2022-07-26 12:01:13 +02:00
Christian Goll
14b86a5e8e added profile set over API 2022-07-13 15:56:04 +02:00
Christian Goll
f0eb3f8504 fixed embeded init for linitng 2022-07-13 14:43:02 +02:00
Christian Goll
59141a6dac change network hadnling 2022-07-13 11:52:24 +02:00
Christian Goll
c8d70e23ad rebased on new API 2022-07-11 16:34:08 +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
Christian Goll
8cd4b0aa02 Fix wwct node set profile for single profile 2022-06-10 13:39:05 +02: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 M. Kurtzer
9cefa32198 Merge pull request #415 from gmkurtzer/minor_fixups_for_4.3.0
Minor fix ups for 4.3.0
2022-05-03 22:24:44 -07:00
Gregory Kurtzer
dd1cf6f4a5 Don't force LC on node set
This makes it so we can never UNDEF/DELETE an entry as that requires
upper case. So we are doing the lower case now where it matters.
2022-05-03 21:53:47 -07:00
jcsiadal
dbd747788f wwctl profile fixes
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-19 21:59:34 +00: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
c0f7ecf357 store the ovelats as yaml list 2022-03-24 19:45:51 +01:00
Christian Goll
88631a98d3 fixed linting 2022-03-02 21:24:15 +01:00
Christian Goll
5ac75661c9 Only write to IPMI if this is explictly wanted 2022-03-02 21:24:05 +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 M. Kurtzer
d38d023782 Merge pull request #297 from gmkurtzer/discoverable-fix
Discoverable and network fixes
2022-02-11 19:23:46 -08:00
Gregory Kurtzer
1a48bc6ee5 Fixed default network device logic 2022-02-12 03:21:31 +00:00
Gregory Kurtzer
e6a3810d20 Fixing oddball network configuration parameters 2022-02-12 03:08:33 +00:00
Gregory Kurtzer
30994fd60d Setting sane defaults for node and profile selection 2022-02-12 01:27:58 +00:00
Gregory Kurtzer
ffaf794a42 Changed "key" paramaters to tags and cleaned up interface 2022-02-11 05:52:46 +00:00
Gregory Kurtzer
9e943101ec Always use lowercase for hw addresses 2022-01-26 04:02:30 +00:00
Gregory Kurtzer
d9c13c3f36 Initial commit of asset key tag security check 2022-01-24 00:32:02 +00:00
Gregory Kurtzer
9f53bca1bf Various fixes found in testing 2021-12-29 17:16:53 -08:00
Gregory Kurtzer
189df61366 Always set onboot to true for default 2021-12-28 16:13:55 -08:00
Gregory Kurtzer
f5a9c0f933 Fixed backwards compatibility with --netdev and cleanups 2021-12-28 16:07:19 -08:00
Gregory Kurtzer
6acf272ea7 Merge branch 'main' of github.com:hpcng/warewulf into netdev_refactor 2021-10-23 12:33:52 -07:00
Gregory Kurtzer
1370932cd3 Introduction of netname functionality for network devices 2021-10-23 07:12:57 -07:00
Gregory Kurtzer
b90883ad2d Properly increment IP addresses on multi-node set 2021-10-22 16:10:12 -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
60155cf127 these validity checks were causing problems with undefining configurations.
Removing these for now, as we will trust the user with doing the right thing.
2021-09-12 14:15:54 -07:00
WestleyR
4edc16953e Fix linting issues 2021-09-07 20:48:51 -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
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
Gregory M. Kurtzer
53034dd887 Merge pull request #79 from paulscherrerinstitute/duplicateSetType
LGTM, thanks!
2021-05-11 20:30:21 -07: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
7f625d7d02 removed duplicate SetType 2021-05-08 19:12:49 +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
663c31fc7e Added profile UI fixes
Related to #63 and #58.
2021-04-25 13:21:59 -07:00
Cooper, Trevor
ec4ec0e796 restart warewulfd after node and profile set commands 2021-04-15 12:40:36 -07:00
Niko Kivel
09ba69cc79 NIC type for node-->set 2021-03-26 10:38:20 +01:00