baas

module
v0.0.0-...-278bb9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2022 License: BSD-3-Clause

README

BAAS

Baremetal As A Service, or abbreviated to BAAS is a project done for the TU Delft to facilitate operating systems research on high-powered machines, by scheduling the access researches have to these machines. This system makes sure each researcher can have full access to the machines in their timeslot, being able to load their own (custom) kernel and have access to all hardware. BAAS makes sure the system is reset a well-known state after every job, to make sure these custom kernels have not messed up the system enough to make further research on them impossible.

Disclaimer: this system is custom-built for the needs of the TU Delft. It is open source, and written to be extensible, but it is unlikely that it will completely fit your needs without changes. We are open to pull requests, but we might not implement suggestions ourselves which are outside the scope of the requirements for the TU Delft.

Documentation

Some documentation about the systems, and building these systems is provided here. In addition, you can generate a website with inline documentation by running godoc and going to this url.

Install

Required software

  • Go
  • cpio
  • goimports
  • libvirt
  • virt-manager/virt-viewer

Installation of the virtual machine

This software works on a client a server-model, where there is a central control server which offers the management OS to one or multiple clients. These are two entirely different systems and hence both testing as well as developing must be done on two separate machines.

Client machine

Normally, you would use a virtual machine to create a client machine and run the server on your hardware. It is recommended to use libvirt for this, which is also what was used for initial development. You can set it up as follows:

First start virt-manager, go to Edit->Connection Details and create a new network, select NAT, set the name as BAASNetwork and set "Forward To" as the network card you typically use (in my case wlan0). Press on finish.

⚠ If you have problems with connecting to the server, double check if there is not a firewall running in the background. Run the following command, after running it, you should be able to boot the virtual machine with the proper network settings.

virt-install --pxe --prompt --memory 2048 --name baas --disk size=30
--boot uefi,network,hd --network network=BAASNetwork --os-variant generic

Finally generate the management operating system which is run on the client machine.

make management_initramfs
Control server

In virt-manager go to view and select Details, press on the light bulb and find the menu item called NIC. From there copy the MAC address and change the value in control_server/main.go to this IP address. You can then run make control_server to run the control server and reboot the virtual machine. If all is well, it should now boot into the management operating system.

License

// TODO

Directories

Path Synopsis
api
Package api provides functions for handling http requests on the control server.
Package api provides functions for handling http requests on the control server.
pixieserver
Package pixieserver starts pixiecore.
Package pixieserver starts pixiecore.
management_os
entrypoint
Adapted: https://stackoverflow.com/questions/48971780/how-to-change-the-format-of-log-output-in-logrus
Adapted: https://stackoverflow.com/questions/48971780/how-to-change-the-format-of-log-output-in-logrus
pkg
api
Package api defines structures which are transferred over the network
Package api defines structures which are transferred over the network
compression
Package compression defines the methods used to compress and decompress file streams.
Package compression defines the methods used to compress and decompress file streams.
database
Package database defines the interface to interact with the database.
Package database defines the interface to interact with the database.
database/sqlite
Package sqlite defines an implementation for the store as an SQLite database
Package sqlite defines an implementation for the store as an SQLite database
fs
Package fs provides utility functions for writing and reading from the filesystem in baas.
Package fs provides utility functions for writing and reading from the filesystem in baas.
httplog
Package httplog provides a log for logrus, which enables log lines to be sent using http requests.
Package httplog provides a log for logrus, which enables log lines to be sent using http requests.
model
Package model stores miscellaneous database entries
Package model stores miscellaneous database entries
model/images
Package images defines the models representing different image types
Package images defines the models representing different image types
model/machine
Package machine declares the entities related to the machines stored in the database
Package machine declares the entities related to the machines stored in the database
model/user
Package user defines the database entities for usersb
Package user defines the database entities for usersb
util
Package util defines various functions and types which are useful throughout the program
Package util defines various functions and types which are useful throughout the program

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL