Database#26
Merged
Merged
Conversation
Co-authored-by: Jonathan Dönszelmann <jonabent@gmail.com>
Co-authored-by: Victor Roest <victor@xirion.net>
Co-authored-by: Victor Roest <victor@xirion.net>
# Conflicts: # .dockerignore # Makefile # control_server/api/boot.go # control_server/httpserver/routes.go # control_server/main.go # go.mod # go.sum # management_os/build/Dockerfile # management_os/entrypoint/api.go # management_os/entrypoint/download.go # management_os/entrypoint/main.go # management_os/entrypoint/upload.go
…e same MAC address to the machine
… username & email
…sByUser Extra documentation for the endpoints with request examples Validates the inputs for a few functions to ensure that the endpoints are called correctly Fixes a bug where it always returned the first item for any Read endpoint Fixes a bug where it would not give an error for non-existing users, images or machines Cleans up the image code by creating helper function which gets variables about the uri Implements an endpoint which gets all the images associated with a user out of the database Implements an endpoint which gets the first image with a given name for a specified user Implements a function to get a user by id which is useful given the database is denormalized
…e not unique; Create an image file when an image is created
…ion bug for uploading images
This was referenced Nov 11, 2021
Integrate the database to the IPXE server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands on the work done last year to create a database for the BAAS project. Combined this merge requests implements a database based on the Gorm ORM which stores the machines, images, users, and various other relevant entities to a Sqlite instance. You can create users who are allowed to create new images associated to their account, they can change their images locally and upload their changed image to the server. Another option is ignoring the generated image and instead uploading a custom image of some sort. Generated images are plain raw disk images with a size of 6 GiB.
Features
Known Issues
Why it should be merged
It features a lot of work done by last years developers and it goes a long way towards the end goal of a user friendly imaging and flashing software. The endpoints we have now are not yet fully sufficient, but would allow a team to create a simple web interface which can create and manage images. More thought and documentation does need to go into this part of the program, but this merge requests offers an excellent base to do so