linuxkit icon indicating copy to clipboard operation
linuxkit copied to clipboard

DigitalOcean Support

Open Immortalin opened this issue 7 years ago • 18 comments

It would be great to add support for digitalocean. This can be done pretty easily by ensuring the right files are in the right places like this: https://github.com/bontibon/digitalocean-alpine

Immortalin avatar Jul 24 '18 04:07 Immortalin

Yes thats pretty much what the Scaleway version does. I have talked to DO people in the past who have promised real installability will happen one day but its not there yet...

On Mon, 23 Jul 2018, 21:19 Immortalin, [email protected] wrote:

It would be great to add support for digitalocean. It can be done pretty easily by ensuring the right files are in place like this: https://github.com/bontibon/digitalocean-alpine

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/linuxkit/linuxkit/issues/3131, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdcPMCBdJVN_IbXf4ZY8DPUkDesqtssks5uJqBTgaJpZM4VcDw6 .

justincormack avatar Jul 24 '18 05:07 justincormack

@justincormack any chance to use code from @bontibon's project? I use it in production and it works pretty well as an alpine distro. I think it should be quite straightforward to add DO support to Linuxkit since it's also built on alpine

Immortalin avatar Jul 24 '18 05:07 Immortalin

The relevant parts are different enough that I am not sure you could reuse the code. I dont think it would be too hard to do though.

On Mon, 23 Jul 2018, 22:33 Immortalin, [email protected] wrote:

@justincormack https://github.com/justincormack any chance to use code from @bontibon https://github.com/bontibon's project? I use it in production and it works pretty well as an alpine distro. I think it should be quite straightforward to add DO support to Linuxkit since it's also built on alpine

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/linuxkit/linuxkit/issues/3131#issuecomment-407286355, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdcPKY1ykAZDwh3-cUapyNC7SYuUbfXks5uJrGhgaJpZM4VcDw6 .

justincormack avatar Jul 24 '18 05:07 justincormack

Any advice where to start? I.e. how to implement the /dev mappings etc.

Immortalin avatar Jul 24 '18 07:07 Immortalin

The scaleway example looks surprisingly sparse

Immortalin avatar Jul 24 '18 07:07 Immortalin

@Immortalin I'm not sure but you could try to do the same as for the Scaleway provider. To build an image on Scaleway it's just a snapshot from a volume. Basically it's just copy the iso on a "build" server, use dd to copy it on an emtpy drive, and make a snapshot then an image of this volume.

Sh4d1 avatar Aug 10 '18 21:08 Sh4d1

But you'll have to check how exactly is a DO droplet booting, you may be running into some issues there

Sh4d1 avatar Aug 10 '18 21:08 Sh4d1

Digital Ocean is enabling the importing of custom images. Could you guys tell me if one of these examples is a good fit? https://github.com/linuxkit/linuxkit/tree/master/examples

douglasmiranda avatar Sep 18 '18 18:09 douglasmiranda

@douglasmiranda do you have more information about DO's custom images?

Sh4d1 avatar Sep 18 '18 19:09 Sh4d1

I'm waiting for a response from DO. I will come back with the details as soon as I know. =]

douglasmiranda avatar Sep 18 '18 19:09 douglasmiranda

Ok, I have some info that may be useful:

Are there limits to the type of images you can import? Yes, you can upload any linux OS that supports ext3/4 file systems and has cloudinit 0.7.5,cloudbase-init, coreos-cloudinit, ignition or bsd-cloudinit installed.

Which type of files can I upload: Currently, raw, qcow, ,qcow2, vhd, vhdx, vdi and vmdk formats. Also accept compressed gzip, and BZip2 compressions. Note that ISO files are not supported at this time, expect ISO support towards the end of 2018.

I can’t SSH into my Droplet started from a custom image, what should I do?

Symptoms: When trying to SSH into a Droplet, you are receiving a prompt to enter a root password even though you don’t have one.

A. This is a known issue with Images that have an older version of cloud init. The quick fix is to update the image with cloudinit 0.7.5 and re-import the Image.

They said these images work: https://docs.openstack.org/image-guide/obtain-images.html

douglasmiranda avatar Sep 24 '18 17:09 douglasmiranda

We don't at present have a version of cloud-init for LinuxKit. The full spec is very complex, it might be worth seeing what the DO cloudinit config actually looks like and implement support just for that subset...

justincormack avatar Sep 24 '18 21:09 justincormack

the coreos cloud init code (written in go) is pretty simple, and is a functional subset. I ended up forking a copy into rancherOS last year to add a few fixes.

that code works well enough for DO, AWS, GCE, Azure, VMWare and i can't recal what else i used to test the heck out of :)

if you don't want to re-write that subset in rust >:} maybe you could work with Darren and the RancherOS crew?

SvenDowideit avatar Sep 25 '18 08:09 SvenDowideit

@SvenDowideit yes definitely it is the only sane version. Didnt realise rancher had a forked version...

justincormack avatar Sep 25 '18 16:09 justincormack

https://blog.digitalocean.com/custom-images/

Immortalin avatar Sep 25 '18 20:09 Immortalin

This is how the API works https://developers.digitalocean.com/documentation/v2/#create-a-custom-image The fact that they require a valid URL means that we need to use their object store as we use s3 for aws.

gianarb avatar Sep 26 '18 09:09 gianarb

@gianarb thats what we already do for the Packet client which uses iPXE over http, it is slightly inconvenient but you can use ngrok or a local server, see https://github.com/linuxkit/linuxkit/blob/master/docs/platform-packet.md#boot

(it may make sense to use the object store though).

justincormack avatar Sep 26 '18 18:09 justincormack

Any update on this for ~2021? @SvenDowideit do you have any more information about how we might go about using RacherOS's cloud-init for linuxkit images?

cdbattags avatar Apr 22 '21 17:04 cdbattags