Commit graph

5 commits

Author SHA1 Message Date
Baptiste Daroussin
30346359b3 nuageinit: fix authorized_key test
After miss reading the cloudinit spec I ended up writting a wrong
test for basic ssh key setup, nuageinit has been fixed, but not
the test, here is the actual fix.

Reported by:	markj

(cherry picked from commit 8d7331e62a5aa75760ac54e3cb1594b0001645c6)
2024-06-27 10:56:17 +02:00
Baptiste Daroussin
3cfc085f8a nuageinit: make addsshkey friendly for testsuite
(cherry picked from commit fa07b02f6e09f776b3afe5709e8fee1764c11a2a)
2024-06-27 10:55:07 +02:00
Baptiste Daroussin
12e584c11e nuageinit: use pw(8) instead of getent(1)
pw(8) allows to seek for users in a custom rootdir, which makes it
easier for a testsuite

MFC After:	3 days

(cherry picked from commit 83fcab792c9d7f13f7e8bd73cf1850ba74f49341)
2024-06-27 10:55:06 +02:00
Jeremy Collin
5601feb720 fix (nuageinit): SSH keys are not handled in metadata but in userdata
MFC After: 1 day

(cherry picked from commit 48edad2edf6eb7a539e40dad8e1f87e3fa4973fd)
2024-05-22 08:51:33 +02:00
Baptiste Daroussin
16a6da44e2 nuageinit: add basic support for cloudinit.
this is a very early script to support cloudinit, it does not intend to
be a full featured cloudinit client, but will support a good enough
subset to be viable in most case.

It support nocloud and openstack config-2 config drive mode (iso9660 or
msdosfs)

The following features are currently supported:
- adding users (including a default user named 'freebsd' with password
  'freebsd'
- adding groups
- adding ssh keys
- static ipv4, static ipv6, dynamic ipv4

With this one is able to use the 'bring your own image feature" out of
box.

It is expected that the script grows the support of other clouds
supporting cloud-init, contributions are welcomed.

It is designed to be only run once via the firstboot mecanism.

Sponsored by:	OVHCloud
Differential Revision:	https://reviews.freebsd.org/D44141

(cherry picked from commit a42d6f76018e4ed8324e319ab48aac904bda437c)
(cherry picked from commit c051f22bce42d920abba61bd7cf4ef5b6a270ffa)
(cherry picked from commit b8c053c9a612651d4909f7a323088f3e92485b7b)
(cherry picked from commit 9eae9233fdcc946945f4191e1413f548adfa2943)
2024-04-11 13:52:52 +02:00