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

Need test for baseos image upgrade from within OCI image #539

Open
deitch opened this issue Feb 25, 2021 · 6 comments
Open

Need test for baseos image upgrade from within OCI image #539

deitch opened this issue Feb 25, 2021 · 6 comments

Comments

@deitch
Copy link
Contributor

deitch commented Feb 25, 2021

Per the discussion here, as soon as that PR merges into eve, there will be support for getting a baseos image from within an OCI image. We should have a test for upgrading that way, in addition to the current.

@giggsoff and @sadov, can you point me to where the current baseos image upgrade tests are, and we can add another?

@sadov
Copy link
Contributor

sadov commented Feb 25, 2021

At the moment we have a such test to baseos image upgrade:
https://github.com/lf-edge/eden/blob/master/tests/update_eve_image/testdata/update_eve_image.txt

@deitch
Copy link
Contributor Author

deitch commented Feb 26, 2021

@sadov thanks for the pointer.

  • What do we need to do to add an additional test? I am unsure how the whole test harness works, and what the minimum dependencies are for adding another test?
  • More basically, should we be adding another test, e.g. tests/update_eve_image_oci, or is this another sub-test inside update_eve_image? How would we do that, if that is better?
  • We would need to build an alternate image in docker and load it into the local registry (I sure am glad we have that now :-) ). How do we do that?

@giggsoff
Copy link
Collaborator

Hi, @deitch.
You can try to add your test into separate txt file here. You can take a look onto existing one and change steps of downloading and updating.
But before you do it, you should make sure, that Eden works well with something like ./eden controller edge-node eveimage-update oci://eve:version. If you will have problems on this check (manual one, not in test), feel free to open another issue.

Next, the problem here is in merging your future test and existing one into workflow. We should take into account on this step, that EVE have baseOS testing time. Probably, it will make sense to add some kind of teardown into existing test and future one, where we will ask EVE to return onto IMGA.

@deitch
Copy link
Contributor Author

deitch commented Mar 1, 2021

You can try to add your test into separate txt file here

What is the format of the txt file? Is it its own custom DSL? Or is it using some testing framework?

But before you do it, you should make sure, that Eden works well with something like ./eden controller edge-node eveimage-update oci://eve:version. If you will have problems on this check (manual one, not in test), feel free to open another issue.

It does work. For my test, I ran it with:

  1. I built a new image locally, so it ended up in docker cache
  2. I loaded it with eden registry ...
  3. I updated with eden controller edge-node eveimage-update --registry=local oci://eve:version

I did this for 2 reasons:

  • why hit the actual registry downloading it when unnecessary?
  • the image needs to have the Dockerfile LABELs on them, or it won't work. We only added that a little over a week ago in this eve PR, so images on hub don't have them yet.

I think the right flow is as above, i.e. change something so we get a new version, build an image locally, load it to registry, then update.

How do we do that next?

@zed-sadov
Copy link
Contributor

What is the format of the txt file? Is it its own custom DSL? Or is it using some testing framework?

This is a variant of the EDEN's Go script for writing tests -- Escript:
https://github.com/lf-edge/eden/blob/master/tests/README.md
https://github.com/lf-edge/eden/blob/master/tests/escript/README.md
which mainly uses EDEN commands and binary tests with a little glue logic around them.

@giggsoff
Copy link
Collaborator

Can we close this issue? Seems, it is resolved.

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

No branches or pull requests

4 participants