Stefanita Vilcu Posted March 29, 2023 Posted March 29, 2023 Hello, I am planning to create a Kubernetes cluster from 5 Raspberry PI and one of the alternatives mentioned in tags, 9 hosts in total. I want to mount and customize the installation images with ssh keys, static IP address, etc, and to skip the initial script offered at login by the CLI images. Can you point me to the right piece of documentation? Thank you, Stefanita Vilcu 0 Quote
Solution Oscar Linderoth Posted April 30 Solution Posted April 30 Hi Stefanita, I wanted to do something similar with a few HC4's (also to run Kubernetes, incidentally ). I settled on this: - Install authorized_keys in the image using customize-image.sh - https://docs.armbian.com/Developer-Guide_User-Configurations/#user-provided-image-customization-script - SSH to each sbc after first boot, enter a root password and then cancel the rest of the setup script. It looked to me like the script does some important things before that point. - Configure the rest with Ansible. If you found a better way to boot non-interactively I'd be happy to hear! Best regards, Oscar --- userpatches/customize-image.sh.default 2024-04-30 08:20:03.777276669 +0200 +++ userpatches/customize-image.sh 2024-01-28 23:46:07.822794026 +0100 @@ -36,6 +36,12 @@ # your code here ;; esac + + # install ssh keys + mkdir /root/.ssh + chmod 700 /root/.ssh + cat /tmp/overlay/id_ed25519.pub >> /root/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys } # Main InstallOpenMediaVault() { 0 Quote
Stefanita Vilcu Posted April 30 Author Posted April 30 Thank you Oscar! This is exactly what I was looking for. Best Regards, Stefanita 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.