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

Create ugrade channels for elemental-teal images #649

Closed
davidcassany opened this issue Feb 6, 2023 · 4 comments
Closed

Create ugrade channels for elemental-teal images #649

davidcassany opened this issue Feb 6, 2023 · 4 comments
Assignees

Comments

@davidcassany
Copy link
Contributor

We need to build a list of available OS images (most likely a JSON) that is compliant with ManagedOSVersionChannel and ManagedOSVersion crds and find a way to distribute it.

I'd suggest to start by creating a dump container image containing such a json and use it for upgrades validation.

IMHO we should have such an image in Staging including the current staging tag and the latest version from stable and an equivalent image in Dev including the latest version from staging and current dev.

Ideally the outcome of this card are some automated images synched in OBS including the mentioned JSON.

I am also wondering we should consider publishing multiple images in Stable are in OBS to mimic IBS and fill the gap until publishing is ready there. I am not completely sure the effort is worth...

@agracey
Copy link

agracey commented Feb 6, 2023

FWIW, this is the ManagedOSVersionChannel spec that I've been demoing with. It seems to work?

spec:
  options:
    args:
    - -c
    - |
      curl -X GET https://registry.opensuse.org/v2/isv/rancher/elemental/teal53/15.4/rancher/elemental-teal/5.3/tags/list | jq '[.tags[] | { metadata: { name: . }, spec: { version: . , type: "container", metadata: { upgradeImage: ["isv/rancher/elemental/teal53/15.4/rancher/elemental-teal/5.3:", .] |join("") }}}]' > /data/output
    command:
    - bash
    envs:
    - name: REGISTRY
      value: registry.opensuse.org
    - name: IMAGE_NAME
      value: isv/rancher/elemental/teal53/15.4/rancher/elemental-teal/5.3
    image: registry.opensuse.org/home/atgracey/containerfile/jq:latest
  type: custom

@davidcassany davidcassany self-assigned this Feb 8, 2023
@davidcassany
Copy link
Contributor Author

FWIW, this is the ManagedOSVersionChannel spec that I've been demoing with

Interesting approach, thanks

@davidcassany
Copy link
Contributor Author

davidcassany commented Feb 8, 2023

All right I finally created an image including an static version of such a JSON. It is in OBS in Dev as dev-channel-image. This image produces managed OS versions for dev, staging and stable. It can be simply included into elemental with

apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSVersionChannel
metadata:
  name: elemental-test-channel
  namespace: fleet-default
spec:
  options:
    image: registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal-channel/5.3:latest
  type: custom

Then the created ManagedOSVersions can be used for update groups as:

apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSImage
metadata:
  name:  my-upgrade
  namespace: fleet-default
spec:
  managedOSVersionName: dev
  clusterTargets:
    - clusterName: <elemental-cluster-to-upgrade>

I did a trial upgrading from stable to dev and it was functional. Then I also created a new upgrade to switch to staging and it worked fine.

I'd say this is can be a good way to test teal upgrades.

I did not manage to create and image with dynamic content (at build time) in OBS and I preferred going with some static approach as this is likely what we will end up doing in IBS or even in Stable. Hence I though there was no point on trying to generate the channel contents dynamically at runtime.

@davidcassany
Copy link
Contributor Author

Closing the issue since this is already available for its use in https://build.opensuse.org/package/show/isv:Rancher:Elemental:Dev:Teal53/dev-channel-image

The channel can be added as

apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSVersionChannel
metadata:
  name: elemental-test-channel
  namespace: fleet-default
spec:
  options:
    image: registry.opensuse.org/isv/rancher/elemental/dev/teal53/15.4/rancher/elemental-teal-channel/5.3:latest
  type: custom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants