[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: User-data And cloud-init



Hi,

In the meantime I wrote a script that updates cloud-init to the latest version.
It looks to work alright right now, feel free to use it.

Best regards,
Michael Kanchuker.

##################################################################################################

#uninstall old version and install dependencies for new version
apt-get purge -y cloud-init
apt install-get -y git python3-pip python3-jsonschema net-tools python3-blinker python3-configobj python3-json-pointer python3-jsonpatch python3-jwt python3-oauthlib python3-prettytable

reboot

#clone repository and build it
cd /usr/src
git clone https://github.com/canonical/cloud-init.git
cd cloud-init/

pip3 install -r requirements.txt
pip3 install --upgrade six

python3 setup.py build

python3 setup.py install --init-system systemd

cloud-init init --local

ln -s /usr/local/bin/cloud-init /usr/bin/cloud-init

#Change ExecStart to /usr/local/bin in the systemd files
sed -i -e "s%/usr/bin%/usr/local/bin%g" /lib/systemd/system/cloud*

systemctl daemon-reload

systemctl unmask cloud-*.service
systemctl enable cloud-*.service

#clean up
cd ~
rm -rf /usr/src/cloud-init

cloud-init clean
cloud-init status
echo "" > /var/log/cloud-init.log
echo "" > /var/log/cloud-init-output.log

##################################################################################################




On Mon, Dec 9, 2019 at 6:30 PM Noah Meyerhans <noahm@debian.org> wrote:
On Mon, Dec 09, 2019 at 06:18:15PM +0200, Michael Kanchuker wrote:
>    Is there an official image like with Jessie or Stretch?

Yes, details are at https://wiki.debian.org/Cloud/AmazonEC2Image/Buster

It is not yet available on the AWS Marketplace because we are still
blocked on some legal details...

Unfortunately, I think even buster does not contain a new enough
cloud-init to support text/jinja2 userdata parts.  At least according to
the cloud-init docs, that feature wasn't added until version 19.3, which
we don't even have in sid yet.  Buster contains 18.3.

text/jinja2 is documented for 19.3 at:
https://cloudinit.readthedocs.io/en/19.3/topics/format.html

And note its absense from the 19.2 docs at:
https://cloudinit.readthedocs.io/en/19.2/topics/format.html

noah


Reply to: