1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-14 19:02:45 +03:00

180 Commits

Author SHA1 Message Date
Natanael Copa
11789c272f Autodetect nocloud if CLOUD is unset
Set default CLOUD to 'auto', which will try autodetect the cloud
provider.

Each cloud can have an autodetect script which should print:
  <priority> <cloud>
if cloud was detected.
2024-06-27 21:56:51 +02:00
Natanael Copa
d0a39db18d Automatically setup apk repositories if not specified
Configure network repositories with setup-apkrepos if no repositories
file exists.
2024-06-27 17:49:40 +00:00
Natanael Copa
cd385f5610 Add initial support for alpine autoinstall
Run setup-disk on the biggest empty disk found when autoinstall: true is
set.
2024-06-27 17:27:03 +00:00
Natanael Copa
c39a3a4228 Fix make install
Alpine is no longer a "provider". Adjust the makefile accordingly.

Fixes commit 239cb59a133d (Move alpine provider into nocloud)
2024-06-26 16:23:42 +02:00
Natanael Copa
9d08ab2dbf ci: add test that ensures that we can install 2024-06-26 16:19:52 +02:00
Natanael Copa
239cb59a13 Move alpine provider into nocloud 2024-06-23 20:26:22 +00:00
Natanael Copa
e402fe63e7 Use grep -E instead of egrep 2024-05-25 19:42:25 +00:00
Hugo Rodrigues
2713aac43f Added support to Hetzner 2024-03-10 22:28:36 +00:00
Hugo Rodrigues
119d7a686e Add scaleway support 2024-02-14 15:05:52 +00:00
Natanael Copa
0013a775c6 Fix ephemeral network udhcpc call 3.0.7 2024-01-18 19:49:55 +00:00
Natanael Copa
45cc24696b Configure ephemeral network if needed
Add ipv4 address from dhcp if datasource is from https and no ipv4
address is configured.
3.0.6
2024-01-18 04:02:50 +00:00
Jake Buchholz Göktürk
ac08790a9a OCI userdata needs to be base64 decoded 3.0.5 2024-01-14 00:47:50 +00:00
Jake Buchholz Göktürk
72b419d799 Fix OCI IMDS_USERDATA string 2024-01-14 00:05:27 +00:00
Natanael Copa
e6fb222af3 nocloud: support set data source via smbios in qemu 2023-12-14 00:00:48 +00:00
Natanael Copa
6fb5fa088b Support disabling tiny-cloud via /etc/tiny-cloud.disabled
ref: https://gitlab.alpinelinux.org/alpine/mkinitfs/-/merge_requests/133
ref: https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html
3.0.4
2023-11-28 15:56:35 +01:00
Guido Trotter
8091e3ed84 user-data/alpine-config: remove duplicate declaration 3.0.3 2023-10-14 19:48:26 +00:00
Guido Trotter
2f3ef42d9b Fix typo in sbin/tiny-cloud --disable 2023-10-12 21:16:10 +00:00
Jake Buchholz Göktürk
79e770a8fc Fail on Init Action Failure
* If an init action fails, tiny-cloud should terminate instead of proceeding.
* Also, if bootstrap is incomplete, always re/load user-data, even if user-data file exists.
3.0.2
2023-09-25 18:09:44 +00:00
Jake Buchholz Göktürk
e628e9817d Replace Broken --setup With Working --enable and --disable 2023-06-16 10:04:36 -07:00
Natanael Copa
e7ea0e9e1b nocloud: hide yx errors
hide error message in case key does not exist.
3.0.1
2023-06-12 16:32:35 +02:00
Natanael Copa
d30d2555df Implement ssh_authorized_keys 2023-06-09 14:23:51 +00:00
Natanael Copa
e36abdef4a replace set_nocloud_meta with fake_metadata_nocloud
remove redundand test code
2023-06-07 14:15:07 +02:00
Jake Buchholz Göktürk
d5a5e88b6a Tiny Cloud 3.0.0 (final!) 3.0.0 2023-05-30 16:59:06 -07:00
Jake Buchholz Göktürk
475c3d4642 fix /etc/runlevel --> /etc/runlevels 3.0.0_rc7 2023-05-29 23:21:10 +00:00
Jake Buchholz Göktürk
96e36c251d Final Bits Before 3.0.0 2023-05-29 22:39:36 +00:00
Mark Lavi
82eb4e7d0c Simplify provider description and correct NoCloud URL 2023-05-29 16:18:24 +00:00
Natanael Copa
b571e252c0 Add a fake getent for tests
Avoid tests fail due to existing default user on system. There are more
than one test that is affected of this, so create a fake getent for all.

ref: https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud/-/issues/42
2023-05-24 17:50:12 +02:00
Natanael Copa
85108e958b Fix vim modelines and make more readable
Add missing trailing :

Use filetype=sh instead of ft=sh to make it more readable.
3.0.0_rc6
2023-05-24 14:50:02 +00:00
Natanael Copa
b4776260db Move create_default_user to main phase 2023-05-23 14:28:23 +00:00
Natanael Copa
a042bf8cf1 Consolidate init-*.test into init.test
The separate init-early, init-main and init-final were consolidated in
commit 81869cefccd3 (Consolidate init functionality in /sbin/tiny-cloud)

Do the same with the unit tests for those functions.

No functional changes.
2023-05-22 12:15:57 +02:00
Natanael Copa
3ca6b74a48 Hide mount failures when looking for CIDATA
fixes https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud/-/issues/43
2023-05-22 09:49:23 +00:00
Natanael Copa
40d15db038 Use fake getent to avoid existing system users
The default user may or may not exist on the system running the tests.
Create a fake getent to simulate non-existing user in a consistent way.

fixes https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud/-/issues/42
2023-05-22 11:27:56 +02:00
Jake Buchholz Göktürk
5f26d1f579 Rename Phases & Support doas.conf 2023-05-22 00:34:28 +00:00
Jake Buchholz Göktürk
69733fbedd update tiny-cloud --help slightly and otherwise mostly tab/space adjustments 2023-05-21 14:22:08 -07:00
Natanael Copa
c4195b5e8b Add package_update / package_upgrade
Allows system to be upgraded before installing new.

ref: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#package-update-upgrade-install
2023-05-19 17:50:33 +02:00
Natanael Copa
3837da9471 Re-order functions
Move write_data up below bootcmd, so it is in the order it will execute.

No functional changes
2023-05-19 11:15:02 +02:00
Natanael Copa
000f41a48b Add .editorconfig and replace spaces with tabs 2023-05-19 04:13:16 +00:00
Jussi Nummelin
7d9a280a67 Add support for write_files instructions 2023-05-18 13:31:11 +00:00
Natanael Copa
b63ffb71d0 Refactor imds tests and add tests for azure, gcp and oci 2023-05-18 13:25:27 +00:00
Natanael Copa
0f40c146f2 Refactor aws tests' fake meta-data
Refactor fake wget to use a yaml so we can set aws fake meta-data
similar to how we set nocloud fake meta-data.

Also move fake netcat to tests/bin/nc so its always there and we don't
need to remember to call fake_netcat when needed.
2023-05-17 17:40:43 +00:00
Natanael Copa
a90bf444d3 Unhide imds error messages
imds drivers may print error messages to stderr. Do not hide those.
2023-05-17 14:36:09 +02:00
Natanael Copa
c4d2592e41 Do not show missing user error if there is no ssh-key provided
fixes https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud/-/issues/41
2023-05-16 20:52:13 +00:00
Natanael Copa
fd24be8d96 nocloud: create temp mount dir under /run
The /run is usually a tmpfs which is automatically removed on reboot.
Use this for the temp mount dir so we don't leave any /mnt/cidata-* temp
leftovers.

Also explicitly create the parent directory of the temp dir, which may
no exist.  This solved a weird case where running tests locally ended up
hanging in mount.
2023-05-16 20:47:33 +00:00
Natanael Copa
7745fb6fcc make: run tests in parallel
Speed up the test run by running them in parallel
2023-05-16 16:55:35 +02:00
Jake Buchholz Göktürk
badf0f65d1 Fix UserData Script chmod, etc. 2023-05-15 01:33:57 +00:00
Jake Buchholz Göktürk
e650415799 fix makefile again 3.0.0_rc5 2023-05-13 16:16:44 -07:00
Jake Buchholz Göktürk
4df28f79a6 fix broken Makefile 2023-05-13 16:02:07 -07:00
Jake Buchholz Göktürk
bc6edeeaa5 install user-data handlers, tweak logging 2023-05-13 22:05:58 +00:00
Jake Buchholz Göktürk
13b0eef9fe Add "net" phase to tiny-cloud --setup 3.0.0_rc4 3.0.0_rc3 2023-05-10 19:24:31 +00:00
Jake Buchholz Göktürk
fa3125f0a5 Fix OpenRC Dependencies 2023-05-10 18:16:14 +00:00