Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide cloud-init with images #176

Closed
rdab opened this issue Oct 3, 2017 · 18 comments
Closed

Provide cloud-init with images #176

rdab opened this issue Oct 3, 2017 · 18 comments
Assignees

Comments

@rdab
Copy link

rdab commented Oct 3, 2017

Hello:
Is it possible to provide cloud-init packages with images at images.linuxcontainers.org?

Maybe this is too difficult to achieve or people use other methods to provision systems other than Ubuntu from cloud-images.ubuntu.com.

Thanks.

@stgraber stgraber transferred this issue from lxc/lxc-ci May 16, 2019
@stgraber
Copy link
Member

We need to go through all our images and see where cloud-init is available in the distribution's repositories.
Then for all of those we should add it to our images.

After that, we need to make sure that cloud-init doesn't do anything on the LXC image and for the LXD image that it has the needed templates similar to the official Ubuntu images.

@monstermunchkin
Copy link
Member

monstermunchkin commented Jul 10, 2019

Availability of cloud-init

Alpine Linux

cloud-init is currently only available in the testing repo which needs to be added explicitly.

Versions:

  • n/a (3.6)
  • n/a (3.7)
  • n/a (3.8)
  • n/a (3.9)
  • n/a (3.10)
  • 18.5 (edge), 334.72 % increase

Alt Linux

cloud-init is available in the default repos.

Versions:

  • 0.7.6 (p8), 7.84 % increase
  • 18.4 (p9), 8.10 % increase
  • 18.4 (Sisyphus), 8.06 % increase

Arch Linux

cloud-init is only available in the Arch User Repository. We should not support it since it's not an official package.

CentOS

cloud-init is available in the default repos.

Versions:

  • 0.7.5 (6), 10.27 % increase
  • 18.2 (7), 8.51 % increase

Debian

cloud-init is available in the default repos.

Versions:

  • 0.7.6 (8 / jessie), 27.34 % increase
  • 0.7.9 (9 / stretch), 16.13 % increase
  • 18.3 (10 / buster), 15.69 % increase
  • 18.3 (sid), 15.37 % increase

Devuan

cloud-init is available in the default repos.

Versions:

  • 0.7.9 (ascii), 23.84 % increase

Fedora

cloud-init is available in the default repos.

Versions:

  • 17.1 (28), 18.93 % increase
  • 17.1 (29), 25.29 % increase
  • 17.1 (30), 16.10 % increase

Gentoo

cloud-init is available in the default repos.

Versions:

  • 17.2, 4.91 % increase

Kali

cloud-init is available in the default repos.

Versions:

  • 18.3, 17.02 % increase

openSUSE

cloud-init is available in the default repos.

Versions:

  • 18.5 (42.3) (EOL)
  • 18.5 (15.0), 59.39 % increase
  • 18.5 (15.1), 59.20 % increase
  • 19.1 (tumbleweed), 56.88 % increase

openwrt

cloud-init is not available.

Oracle Linux

cloud-init is available in the default repos.

Versions:

  • 0.7.5 (6), 10.18 % increase
  • 18.2 (7), 8.60 % increase

Plamo Linux

cloud-init is not available.

Sabayon

cloud-init is available in the default repos.

Versions:

  • 18.5, 0.72 % increase

Ubuntu

cloud-init is available in the default repos.

Versions:

  • 0.7.5 (14.04 / trusty), 24.95 % increase
  • 19.1 (16.04 / xenial), 22.92 % increase
  • 19.1 (18.04 / bionic), 10.39 % increase
  • 19.1 (18.10 / cosmic), 10.40 % increase
  • 19.1 (19.04 / disco), 10.54 % increase
  • 19.1 (19.10 / eoan), 12.38 % increase

@stgraber
Copy link
Member

For all of those where it's readily available, can you check what versions it is on all the releases we support? I know that the .disabled thing for example is somewhat new, so we may need to exclude more images because of that.

Once we have that list, we'll also want to know the size delta caused by adding cloud-init.
A size increase by 5% or less is fine for what it brings us, but if we're seeing a bigger impact than that, we'll need to look at it closer.

@monstermunchkin
Copy link
Member

The cloud images so far appear to be more than 7% larger, with Alpine taking the cake: 3.8MB vs. 17MB. I'll post all results once I have them.

@stgraber
Copy link
Member

Ah yeah, Alpine doesn't have python by default I suspect. I don't think we should cloud-init Alpine.

@monstermunchkin
Copy link
Member

Distros which don't have to install python as a dependency of cloud-init:

  • CentOS 6
  • CentOS 7
  • Fedora 28
  • Fedora 29
  • Fedora 30
  • Gentoo
  • Oracle Linux 6
  • Oracle Linux 7
  • Sabayon
  • Ubuntu Xenial
  • Ubuntu Bionic
  • Ubuntu Cosmic
  • Ubuntu Disco
  • Ubuntu Eoan

@monstermunchkin
Copy link
Member

This has been resolved.

@cinnaboot
Copy link

cinnaboot commented Nov 20, 2019

Alpine Linux

cloud-init is currently only available in the testing repo which needs to be added explicitly.

Versions:

* n/a (3.6)

* n/a (3.7)

* n/a (3.8)

* n/a (3.9)

* n/a (3.10)

* 18.5 (edge), 334.72 % increase

Hi, I'm trying to build an alpine image with cloud-init pre-installed, and was wondering how you were able to add it with distrobuilder.

Just adding the testing repo under (packages: repositories: url) doesn't seem to work because there's no RepoHandler defined in https://github.com/lxc/distrobuilder/blob/master/managers/apk.go

"Error: Failed to manage repositories: No repository handler present"

@stgraber
Copy link
Member

We're not currently building cloud-init enabled images for Alpine, probably for this reason.
@monstermunchkin

@monstermunchkin
Copy link
Member

@cinnaboot #265 adds a repo handler for the apk package manager. cloud-init can then be installed with

packages:
  manager: apk
  update: true
  cleanup: true

  sets:
    - packages:
       - cloud-init
      action: install
      variants:
        - cloud
      releases:
        - edge
 
  repositories:
    - name: testing
      url: http://dl-cdn.alpinelinux.org/alpine/{{ image.release }}/testing
      releases:
        - edge
      variants:
        - cloud

@stgraber
Copy link
Member

@monstermunchkin are we going to be adding cloud images for Alpine then?

@monstermunchkin
Copy link
Member

@stgraber I wouldn't add Alpine cloud images as long as the cloud-init package is in testing.

@stgraber
Copy link
Member

Fair enough

@mazerty
Copy link

mazerty commented Nov 22, 2019

cloud-init doesn't seem to be in centos/7 image, is that on purpose ?

@stgraber
Copy link
Member

that's what centos/7/cloud is for

@mazerty
Copy link

mazerty commented Nov 22, 2019

oh great thanks ! i didn't think to look at the variants sorry ^^'

@cinnaboot
Copy link

Thanks @monstermunchkin . I was able to get this to work for alpine.

I'm not sure how to specify the 'variant' property to distrobuilder, but just removing that section seems to work too: https://gist.github.com/cinnaboot/b2aeb1b669933dd78a5dc715fe33ee89#file-alpine-yaml

I also found what looks like a bug in distrobuilder by setting the 'same-as' property to '3.10', but wasn't able to figure out where the concatenation happens.

WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/edge0/main/x86_64/APKINDEX.tar.gz: No such file or directory

@monstermunchkin
Copy link
Member

@cinnaboot the variant is specified in the image section:

image:
  distribution: "alpinelinux"
  variant: "cloud"

I also found what looks like a bug in distrobuilder by setting the 'same-as' property to '3.10', but wasn't able to figure out where the concatenation happens.

Yes, that is indeed a bug. Thanks for that! Here's the fix: #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants