System Architecture Documentation?

flip-dots

Cadet
Joined
Feb 24, 2023
Messages
1
Hi,

I have been looking into adding a new feature into to TrueNAS Scale which I have wanted for a while, specifically encrypted VNC sessions, this is already supported by QEMU. In theory all I should need is to add some UI options to the display device and some code that passes those options to QEMU.

I have already found the WebUI code I need to change and the display.py file that sets the display arguments for QEMU, but I am not sure what I need to change in the middle to make it work.

I have had a look around and not found any documentation that might help me understand how the front end and back ends interact and what else I need to change to make it work. Is there any documentation on how these systems interact that may help me out?

I don't need any super crazy detailed documentation or anything like that, just something to give a general idea of how it works and hopefully somebody to point me in the direction of the right files to modify.

Thanks!
 

dlaflamme

Dabbler
Joined
Jan 17, 2016
Messages
16
Wanted to ask about this too, perhaps from a different angle... is there a developer getting started guide/developer orientation type information that provides a high-level overview of where to look for how the project is structured, where data for the middleware is stored, front-backend interaction, abstraction layer between core and scale, etc.?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
is there a developer getting started guide/developer orientation type information that provides a high-level overview

Not really. The basic system is a relatively generic overlay on top of FreeBSD (and presumably also Linux) that adds a management portal and NAS-specific functionality while also modifying the base system somewhat to make it more of an appliance. That means, for example, IP configuration isn't persisted in /etc/rc.conf{,.local} but rather in the configuration database. When the system starts, it will recreate those files from the configuration database.

how the project is structured,

Extremely vanilla FreeBSD with some local tweaks where vanilla FreeBSD has shortcomings.

abstraction layer between core and scale,

Core and Scale are two completely different things. Both are NAS products. One's on FreeBSD, the other's on Linux.

I think for the most part you're going to need to look at the API and the source code to learn more about the system. Just my opinion.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
@flip-dots
Discord channel is developer oriented.


I'd also suggest making a suggestion in "report a bug".... and writing a document you can post with your recommended changes.. Think about the API changes needed first .. UI can follow.
 

dlaflamme

Dabbler
Joined
Jan 17, 2016
Messages
16
Not really. The basic system is a relatively generic overlay on top of FreeBSD (and presumably also Linux) that adds a management portal and NAS-specific functionality while also modifying the base system somewhat to make it more of an appliance. That means, for example, IP configuration isn't persisted in /etc/rc.conf{,.local} but rather in the configuration database. When the system starts, it will recreate those files from the configuration database.

Extremely vanilla FreeBSD with some local tweaks where vanilla FreeBSD has shortcomings.

Right... stuff like this is exactly what I think would be valuable to have an overview of. Assume the developer knows FreeBSD (or Linux for Scale) and describe how the system is built on top of that.

Core and Scale are two completely different things. Both are NAS products. One's on FreeBSD, the other's on Linux.

Yeah, sorry what I wrote was unclear because it made it sound like there was some layer between Core and Scale, which doesn't make sense, since as you noted they are different things. I was more referring to an abstraction/middleware layer (which I assume exists) that sits between FreeBSD (in the case of Core) and Linux (in the case of Scale) and the higher-level TrueNAS functionality API/UI that sits on top.

I think for the most part you're going to need to look at the API and the source code to learn more about the system. Just my opinion.

Yeah, sounds like that will be the best/only path forward for now.
 
Top