Commit Graph

416 Commits

Author SHA1 Message Date
Christian Goll
510f6a60a9 added excludellist to CreateFlags 2022-07-14 10:40:46 +02:00
Christian Goll
e0c62a81a4 testing profile set 2022-07-14 10:35:27 +02:00
Christian Goll
d10b4c352f new apinode namespace in wwapid 2022-07-13 16:05:16 +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
Christian Goll
29573e26ad added more values 2022-07-07 11:39:02 +02:00
Christian Goll
a37fa71de0 add explicit set of netname 2022-07-07 11:38:19 +02:00
Christian Goll
8902f08c87 added hangling of map[string]*struct 2022-07-07 11:37:18 +02:00
Christian Goll
84d3b72f63 added more abstrac setter for nested structs 2022-07-07 11:29:58 +02:00
Christian Goll
bd2543d484 relection test for comment 2022-07-07 11:28:27 +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
d976e7fc31 Merge pull request #467 from mslacken/single-Overlay
enable overlay rendering
2022-06-24 09:50:14 +02:00
Christian Goll
cc6b75a4f6 bash completion for ssh command 2022-06-22 12:17:04 +02:00
Christian Goll
8cd4b0aa02 Fix wwct node set profile for single profile 2022-06-10 13:39:05 +02:00
Gregory M. Kurtzer
4d44d3a299 Merge pull request #438 from kcdodd/fix/srvdisco
Fix server thread safety of discoverable node and overlay build
2022-06-09 22:18:23 -07:00
Gregory Kurtzer
3cb59b89ea Very minor fix to force minimum args for ssh 2022-06-08 21:43:31 -07:00
Christian Goll
95e03b3df4 get arguments for show --render right 2022-06-08 15:56:10 +02:00
Christian Goll
69c058f106 added bash completion for overlay commands 2022-06-08 15:49:55 +02:00
Christian Goll
53667157c5 parse not own command but show --render 2022-06-08 15:36:20 +02:00
Christian Goll
2f4757600d added quiet option 2022-06-08 15:10:47 +02:00
Christian Goll
312596276e Add source for parse 2022-06-08 15:10:47 +02:00
Christian Goll
98e085c6f2 Trim 'ww' suffix on output 2022-06-08 15:10:46 +02:00
Christian Goll
9e5b2d1aa3 added the wwctl overlay parse command
The `wwctl overlay parse -n NODE FILE` will interpret the given overlay file and print it stdout, via wwlog.PRINTF.
The overlay code had to be refactored for this, but hopefully this makes the code a bit more readable. Also the tstruct has not its own initilization code.
2022-06-08 15:10:46 +02:00
Gregory Kurtzer
3eabf47fc6 Fix dryrun/show for ssh command 2022-06-07 20:34:26 -07:00
Gregory Kurtzer
b4ef712166 Add parallel ssh capability 2022-06-07 20:28:25 -07:00
Carter Dodd
97c24e22f7 fixup for backward compatible case 2022-06-04 12:13:13 -05:00
Carter Dodd
f14f339576 fixups 2022-06-04 11:42:16 -05:00
Carter Dodd
fc8d3863d8 use wwctl to re-build provision overlays, update to pass overlaynames 2022-06-04 11:14:48 -05:00
Gregory Kurtzer
8717b91938 Avoid container build if exit non-zero 2022-05-25 14:46:16 -07:00
Carter Dodd
a36467b2a8 Merge upstream 2022-05-13 19:42:18 -05: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
8e88ac12e0 Merge pull request #404 from mslacken/only-build-assigned-overlays
only build assigned overlays
2022-05-13 10:06:19 +02:00
mslacken
01f2f4fc99 filter out nodes acordiing to their overlays 2022-05-12 21:23:37 +02:00
Christian Goll
76d8fb9088 Merge pull request #422 from mslacken/fix_syncuid
syncucer will only write witrh syncuser switch
2022-05-12 11:59:00 +02:00
Christian Goll
2efcbe0348 syncucer will only write witrh syncuser switch
uid/gid are not synced at container import but checked. An apropriate
message is printed, regarding users which are not present on host.
The `wwctl container syncuser` needs the `--write` switch to actually
write to the container.

The command `wwctl container syncuser` will always operate at the
container level, but as the 'generic` overlay reads in the container
passwd/group, following two steps will update the passwd/group on a
running cluster:
1. Add passwd/group to container
wwctl container syncuser --write CONTAINER
2. Synchronize overlay
wwctl overlay build -N
2022-05-12 11:18:53 +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 M. Kurtzer
d0d5d24884 Merge pull request #412 from mslacken/show-kernel-version
container show prints kernel version
2022-05-03 22:16:55 -07:00
Gregory M. Kurtzer
04decd799f Merge pull request #410 from gmkurtzer/boolean_print_fixes
Align boolean prints
2022-05-03 22:12:39 -07:00
Gregory M. Kurtzer
5257413aea Merge pull request #406 from mslacken/version-vars
more verbose wwctl version
2022-05-03 22:11:37 -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
Gregory Kurtzer
60b586b69a Don't do SyncUids by default always 2022-05-03 21:52:13 -07:00
Christian Goll
1a61b53bb2 container show prints kernel version 2022-05-03 10:27:56 +02:00
mslacken
5643b71de6 fixed linting 2022-04-29 11:18:20 +02:00
mslacken
95c951e673 use bash export syntax for variables 2022-04-29 10:20:56 +02:00
mslacken
0fd8553bad add full output siwtch to wwctl version 2022-04-29 10:07:15 +02:00
Gregory Kurtzer
c95c518dde Align boolean prints 2022-04-27 22:33:34 -07:00
Christian Goll
0a9e4b89a1 fixup format 2022-04-26 11:30:04 +02:00