Jump to content

Cloud-Init


austerus

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines