Truenas scale automated installation and configuration

tjorvenbuyse

Cadet
Joined
Jan 15, 2024
Messages
6
For a school project I'm trying to set up an automated deployment with truenas. The goal is to have no user input and deploy truenas + services on truenas on a random device (or vm).
Is this a realistic idea? Does anyone have any hints or possible approaches?

For truenas itself I've been looking into editting the iso image and using preseeding or a script to automate the installer prompts but have seen no luck there.

A pxe server seems not possible because it needs to be local and havind one local is not practical for random users wich this is meant for.

To configure the truenas pool and networking I'm looking into using terraform or ansible this is what I'm trying to implement right now with limited succes: https://registry.terraform.io/providers/dariusbakunas/truenas/latest/docs
the services I'm looking to deploy are for example a nextcloud deployment on the truenas system I would also like to do this using terraform or ansible.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Looks like that terraform resource is targeted to CORE, not SCALE, but would possibly work anyway (for what it can do).

What it can't do, it seems, is work with apps, so you're going to need to find one (or create one) that can use the API to interact with apps if you're going to get that to work as you suggest.

Here's the link to the SCALE API, which is what you will need to use (either directly or via a provider like terraform or ansible) to get the results you describe once the install is complete.
 

tjorvenbuyse

Cadet
Joined
Jan 15, 2024
Messages
6
Looks like that terraform resource is targeted to CORE, not SCALE, but would possibly work anyway (for what it can do).

What it can't do, it seems, is work with apps, so you're going to need to find one (or create one) that can use the API to interact with apps if you're going to get that to work as you suggest.

Here's the link to the SCALE API, which is what you will need to use (either directly or via a provider like terraform or ansible) to get the results you describe once the install is complete.
There seems to be very little support for the SCALE version of Truenas in terraform or ansible (wich seems to have none)
 

tjorvenbuyse

Cadet
Joined
Jan 15, 2024
Messages
6
There seems to be very little support for the SCALE version of Truenas in terraform or ansible (wich seems to have none)
Would anyone have expierce in creating such systems ar have a tutorial to point to? Or some github repo I can't find with a half finished solution.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I would say that the API is mostly the same for CORE and SCALE, so you would only need to work on the section that handles charts (apps).

You could use the authentication and examples from the repo of the resource you linked to get a start:

The folks who do this stuff are paid (relatively high) consulting rates to do it, so I don't imagine anyone is interested in sharing or breaking it down in a tutorial for just anyone else to do.

The API reference I already shared is free and I'm sure there is material on how to create a terraform resource out there within googling range. If you were looking for somebody to walk you through your project, you might be out of luck.
 

tjorvenbuyse

Cadet
Joined
Jan 15, 2024
Messages
6
I would say that the API is mostly the same for CORE and SCALE, so you would only need to work on the section that handles charts (apps).

You could use the authentication and examples from the repo of the resource you linked to get a start:

The folks who do this stuff are paid (relatively high) consulting rates to do it, so I don't imagine anyone is interested in sharing or breaking it down in a tutorial for just anyone else to do.

The API reference I already shared is free and I'm sure there is material on how to create a terraform resource out there within googling range. If you were looking for somebody to walk you through your project, you might be out of luck.
Thanks for all the info. I'll see how far I get :)

Maybe get a good job out of it someday :p
 
Top