netson / ubuntu-unattended

Script to create unattended Ubuntu ISO
MIT License
370 stars 185 forks source link

Reuse netson.seed #39

Closed t3kg33k closed 4 years ago

t3kg33k commented 6 years ago

This is not really an issue but more of a question, and possibly a suggestion... First of all, this is an awesome script; it's exactly what I am looking for. Is there a way to update the netson.seed and recreate the unattended .iso with the updated seed file? The reason I ask is because I want to be able to add services (SSH server, web server, etc.) to my unattended .iso file and the only way I would do that is by updating the seed file. Perhaps you can add an option to the create-unattended-iso.sh script to ask what services you would like to install during the the unattend install? Or, perhaps add the option to the start.sh script to ask what software/services to install? Also, adding the option in the start script to configure network could be an good option also as a DHCP server is not often an option in some networks. I have a network configuration script I have created to setup a static IP if you are interested in having.

netson commented 6 years ago

I think the ideal place for this would be in the start.sh script. I can see if I can change it so that you can provide a download URL for the start.sh script during ISO generation. However, this would only work if your server has a working network connection out of the box (usually through dhcp).

t3kg33k commented 6 years ago

Gotcha. So, what if I wanted to customize with my own preseed to include openssh server, is there a way I could do that? Does that involve me changing your script to include my own preseed file?

netson commented 6 years ago

The preseed file itself is just a set of answers to the default installation questions; the only way to install anything with the preseed is to use the late_command, but since it has a very limited shell, I wouldn't recommend installing any software. Currently the script uses the late_command to download the start.sh file from a fixed location (my github acocunt), which can then be executed to perform further actions.

My suggestion would be to let you provide the URL to the start.sh location during the ISO creation process, so that it will fetch your own start script which can then install anything you want.

However, I would also suggest you look at tools like ansible, chef, puppet (etc), which are fairly easy to use and provide an elegant solution to installing and configuring software once your OS is up and running. For example when using ansible, you would just have to enable openssh from within your start.sh script and then you're good to go to start using ansible. I'm currently in the process of converting all my puppet modules to ansible roles and the idea is to spin up and provision a server from start to finish using ansible.

Dhull442 commented 5 years ago

@t3kg33k Check out my repository. I've given a complete guide to modifying the preseed file.

netson commented 4 years ago

@t3kg33k Check out my repository. I've given a complete guide to modifying the preseed file.

Thanks! Useful info; closing this issue for now!