Jump to content

Recommended Posts

Posted

Hello,

 

I've fairly new to ArmBian and as I'm trying to setup a cluster of Rock64's, I'm wondering if there's any support for using cloud-init (user-data) to be able to setup a board on boot?

 

Thanks!

Posted

Kind of curious.. what method would you use to provide user data with cloud-init to your SBCs?

Posted (edited)

Hi @lanefu,

 

Thanks for the suggestion, I will look into building my own. I dabbled with putting together ARM distros quite a few years back.

 

Regarding the steps (assuming a distribution comes with cloud-init enabled and configured with NoCloud datasource):

- flash tool provided by the Hypriot team allows embedding a user-data yaml file in the boot partition of the flashed sd card (it works with any image, I actually tried with with armbian as well thinking it had cloud-init)

 

In theory, that should be all that's needed so that the SBC's have the user-data steps provided and executed at startup

Edited by austerus
Posted

In case anyone else is looking to do this, I was able to compile an ubuntu focal server image with cloud-init with the following (after checking https://docs.armbian.com/Developer-Guide_User-Configurations/):

 

Modify userpatches/lib.config to install the cloud-init package:

PACKAGE_LIST_ADDITIONAL="$PACKAGE_LIST_ADDITIONAL cloud-init"

 

I then added my cloud-init files (user-data and meta-data) to the userpatches/overlay/ directory (I put them in a "cloud-init" folder), and added this to userpatches/customize-image.sh:

cp -r /tmp/overlay/cloud-init /boot/cloud-init
echo "extraargs=ds=nocloud;s=/boot/cloud-init/" >> /boot/armbianEnv.txt

 

Probably some extra customization is warranted (I needed to make some other unrelated changes), but this should be enough to enable cloud-init, and you can modify the arguments passed to /boot/armbianEnv.txt to meet your needs if you need a different datasource/whatever.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines