I've created a PR in linuxkit to add support for Hetzner. Opening this issue to have k3os update to a later version of linuxkit's metadata package once that PR is merged and released.
https://github.com/linuxkit/linuxkit/pull/3425
I can see that https://github.com/ibuildthecloud/linuxkit is actually the linuxkit fork that's being used in this project. So maybe that fork could be rebased on https://github.com/linuxkit/linuxkit master or merge my branch https://github.com/zimme/linuxkit/tree/metadata-provider-hetzner
https://github.com/ibuildthecloud/linuxkit doesn't have the issue tracker open so I can't open an issue over there.
/cc @ibuildthecloud
@zimme i've been meaning to moot the use of that fork as it primarily exists to do some early setup (directory creation, mounts, clock, loopback, etc) via a very slightly customized rc.init (invoked from libexec/k3os/bootstrap) that could be less opaque if implemented in bash or maybe multi-call targets within the k3os binary.
In the meantime, it shouldn't be too difficult to whip up a pull-request that replicates https://github.com/rancher/k3os/blob/3c84f561dd048a0bb38fc22058abbc6271c9ddf2/images/02-progs/Dockerfile#L7-L16 but uses the linuxkit/linuxkit source for the metadata compilation. If you care to submit such I would be happy to review it :smiley:
Do you want the change only for the metadata compilation or should I use the upstream linuxkit for both metadata and rc.init?
We'll need to wait for linuxkit/linuxkit#3431 to be merged before proceeding with this one.
Still waiting on linuxkit/linuxkit#3431
linuxkit/linuxkit#3431 and linuxkit/linuxkit#3429 have both been merged so this should be able to move forward now. As linuxkit/linuxkit#3429 also has been merged, support for Scaleway should also be possible.
I also saw that this commit had been added https://github.com/linuxkit/linuxkit/commit/3f56669576bac1a44cd61f5a9fa540976d33eeed which will allow cloud config to be loaded from file. Is there an obvious use case for this in k3os?
I built an ISO using the master branch of linuxkit and hetzner as a default data source and can confirm that it works as intended after hetzners support added it to my account! Thanks @zimme!
But, unless I am missing something, the changes in linuxkit are not released yet? We might want to wait until that is the case?
diff --git a/images/02-progs/Dockerfile b/images/02-progs/Dockerfile
index 952afe4..dabf0f5 100644
--- a/images/02-progs/Dockerfile
+++ b/images/02-progs/Dockerfile
@@ -3,7 +3,7 @@ ARG TAG
ARG VERSION
FROM ${REPO}/k3os-gobuild:${TAG} as gobuild
-ENV LINUXKIT v0.7
+ENV LINUXKIT master
FROM gobuild as linuxkit
RUN git clone --branch $LINUXKIT https://github.com/linuxkit/linuxkit.git $GOPATH/src/github.com/linuxkit/linuxkit
diff --git a/images/07-iso/config.yaml b/images/07-iso/config.yaml
index 26f5c24..c4f9cee 100644
--- a/images/07-iso/config.yaml
+++ b/images/07-iso/config.yaml
@@ -1,3 +1,7 @@
# See https://github.com/rancher/k3os/blob/master/README.md#configuration
# and https://github.com/rancher/k3os/blob/master/README.md#remastering-iso
# This file is a placeholder for custom configuration when building a custom ISO image.
+k3os:
+ data_sources:
+ - hetzner
+ - cdrom
Just tried 0.9.0-rc3 on Hetzner and it's working properly. ~I also see that the loadbalancer is getting the external ip so I believe #208 might be fixed by this.~
Most helpful comment
I built an ISO using the master branch of linuxkit and hetzner as a default data source and can confirm that it works as intended after hetzners support added it to my account! Thanks @zimme!
But, unless I am missing something, the changes in linuxkit are not released yet? We might want to wait until that is the case?