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

Remove images: remote #12748

Merged
merged 10 commits into from
Jan 19, 2024
8 changes: 2 additions & 6 deletions doc/cloud-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ Rebooting the instance does not re-trigger the actions.

## `cloud-init` support in images

To use `cloud-init`, you must base your instance on an image that has `cloud-init` installed:

* All images from the `ubuntu` and `ubuntu-daily` {ref}`image servers <remote-image-servers>` have `cloud-init` support.
However, images for Ubuntu releases prior to `20.04` require special handling to integrate properly with `cloud-init`, so that `lxc exec` works correctly with virtual machines that use those images. Refer to {ref}`vm-cloud-init-config`.
* Images from the [`images` remote](https://images.linuxcontainers.org/) have `cloud-init`-enabled variants, which are usually bigger in size than the default variant.
The cloud variants use the `/cloud` suffix, for example, `images:ubuntu/22.04/cloud`.
To use `cloud-init`, you must base your instance on an image that has `cloud-init` installed, which is the case for all images from the `ubuntu` and `ubuntu-daily` {ref}`image servers <remote-image-servers>`.
However, images for Ubuntu releases prior to `20.04` require special handling to integrate properly with `cloud-init`, so that `lxc exec` works correctly with virtual machines that use those images. Refer to {ref}`vm-cloud-init-config`.

## Configuration options

Expand Down
4 changes: 2 additions & 2 deletions doc/howto/benchmark_performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ For example:
- Description
* - `lxd.benchmark init --count 10 --privileged`
- Create ten privileged containers that use the latest Ubuntu image.
* - `lxd.benchmark init --count 20 --parallel 4 images:alpine/edge`
- Create 20 containers that use the Alpine Edge image, using four parallel threads.
* - `lxd.benchmark init --count 20 --parallel 4 ubuntu-minimal:22.04`
- Create 20 containers that use the Ubuntu Minimal 22.04 image, using four parallel threads.
* - `lxd.benchmark init 2d21da400963`
- Create one container that uses the local image with the fingerprint `2d21da400963`.
* - `lxd.benchmark init --count 10 ubuntu`
Expand Down
2 changes: 1 addition & 1 deletion doc/howto/images_remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To reference an image, specify its remote and its alias or fingerprint, separate
For example:

ubuntu:22.04
images:ubuntu/22.04
ubuntu-minimal:22.04
local:ed7509d7e83f

(images-remote-default)=
Expand Down
6 changes: 0 additions & 6 deletions doc/reference/remote_image_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ The [`lxc`](lxc.md) CLI command comes pre-configured with the following default

See [`cloud-images.ubuntu.com/minimal/daily`](https://cloud-images.ubuntu.com/minimal/daily/) for an overview of available images.

`images:`
: This server provides unofficial images for a variety of Linux distributions.
The images are maintained by the [Linux Containers](https://linuxcontainers.org/) team and are built to be compact and minimal.

See [`images.linuxcontainers.org`](https://images.linuxcontainers.org) for an overview of available images.

(remote-image-server-types)=
## Remote server types

Expand Down
6 changes: 3 additions & 3 deletions doc/rest-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ definitions:
x-go-name: Protocol
server:
description: URL of the source server
example: https://images.linuxcontainers.org
example: https://cloud-images.ubuntu.com/releases
type: string
x-go-name: Server
type: object
Expand Down Expand Up @@ -1088,7 +1088,7 @@ definitions:
x-go-name: Secret
server:
description: URL of the source server
example: https://images.linuxcontainers.org
example: https://cloud-images.ubuntu.com/releases
type: string
x-go-name: Server
type:
Expand Down Expand Up @@ -2125,7 +2125,7 @@ definitions:
x-go-name: Websockets
server:
description: Remote server URL (for remote images)
example: https://images.linuxcontainers.org
example: https://cloud-images.ubuntu.com/releases
type: string
x-go-name: Server
source:
Expand Down
8 changes: 0 additions & 8 deletions lxc/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ var LocalRemote = Remote{
Public: false,
}

// ImagesRemote is the community image server (over simplestreams).
var ImagesRemote = Remote{
Addr: "https://images.linuxcontainers.org",
Public: true,
Protocol: "simplestreams",
}

// UbuntuRemote is the Ubuntu image server (over simplestreams).
var UbuntuRemote = Remote{
Addr: "https://cloud-images.ubuntu.com/releases",
Expand Down Expand Up @@ -57,7 +50,6 @@ var StaticRemotes = map[string]Remote{

// DefaultRemotes is the list of default remotes.
var DefaultRemotes = map[string]Remote{
"images": ImagesRemote,
"local": LocalRemote,
"ubuntu": UbuntuRemote,
"ubuntu-daily": UbuntuDailyRemote,
Expand Down
11 changes: 0 additions & 11 deletions lxc/config/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ func LoadConfig(path string) (*Config, error) {
c.DefaultRemote = DefaultConfig().DefaultRemote
}

// NOTE: Remove this once we only see a small fraction of non-simplestreams users
// Upgrade users to the "simplestreams" protocol
images, ok := c.Remotes["images"]
if ok && images.Protocol != ImagesRemote.Protocol && images.Addr == ImagesRemote.Addr {
c.Remotes["images"] = ImagesRemote
err = c.SaveConfig(path)
if err != nil {
return nil, err
}
}

return c, nil
}

Expand Down
4 changes: 2 additions & 2 deletions lxd-benchmark/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ func main() {
app.Example = ` # Spawn 20 Ubuntu containers in batches of 4
lxd-benchmark launch --count 20 --parallel 4

# Create 50 Alpine containers in batches of 10
lxd-benchmark init --count 50 --parallel 10 images:alpine/edge
# Create 50 Ubuntu Minimal 22.04 containers in batches of 10
lxd-benchmark init --count 50 --parallel 10 ubuntu-minimal:22.04

# Delete all test containers using dynamic batch size
lxd-benchmark delete`
Expand Down
Loading
Loading