GithubHelp home page GithubHelp logo

Comments (10)

zmarano avatar zmarano commented on July 22, 2024

We would probably want to scope the test to the distros that are expected to have gsutil/gcloud (some won't). But, as far as checking if it up to date- I think that is probably not going to get us very far as it will likely always be out of date (they ship weekly). I think we should instead check if the installed versions work correctly. Probably just do a couple basic things with each to validate that API calls work.

from compute-image-tools.

gut avatar gut commented on July 22, 2024

I see, then could you please suggest some basic "gcloud" commands that would do the trick? If possible, I want to avoid authentication to keep test configurations as simple as possible but I don't know if there would be something meaningful to use without authenticating...
Thanks!

from compute-image-tools.

zmarano avatar zmarano commented on July 22, 2024

The simplest commands are: gcloud info and gsutil version so we can start with those.
However, seeing if authentication works (if you give the VM the right scopes, it uses the service account automatically), is a good test to run here as well and see if you can make a simple list API call:
'gcloud compute images list' and 'gsutil ls' should both be able to succeed if the VM has at least read scopes for compute and storage.

from compute-image-tools.

gut avatar gut commented on July 22, 2024

Alright. Thanks for the hints.

As you said that some distributions will not have them, I'm considering the approach of only running this test if gsutil/gcloud are installed. In another words, the test will only fail if the image have them installed but with a version that is not working anymore. By doing that the test wouldn't need a switch mechanism (e.g: Metadata variable) to indicate if such a test needs to run on the system as it's expected to have functional gsutil/gcloud versions.

What do you think? Would it be ok?

from compute-image-tools.

zmarano avatar zmarano commented on July 22, 2024

That sounds good yes.

from compute-image-tools.

gut avatar gut commented on July 22, 2024

Great, thanks

from compute-image-tools.

gut avatar gut commented on July 22, 2024

quick related question: If gcloud/gsutil are not mandatory on all images, then is the "Ensure apt/yum repos are setup for GCE repos." an optional test as well?

from compute-image-tools.

gut avatar gut commented on July 22, 2024

@zmarano : ping

from compute-image-tools.

zmarano avatar zmarano commented on July 22, 2024

Oh sorry missed that question. Basically its dependent on distro and where it is built right now.

The breakdown is as follows (currently):

  • Debian, CentOS, RHEL will have the SDK installed from the Google Cloud repo and should work.
  • Ubuntu versions before 18.04 will have the SDK installed from the Ubuntu repo but it should work correctly.
  • Ubuntu 18.04+ will have the SDK available via a snap package but the CLI tools (gcloud/gsutil) shoudl be callable as usual.
  • SLES will eventually not have the SDK installed at all so we should not run this test there.
  • Container hosts (CoreOS and COS) will not the SDK installed or usable either.
  • FreeBSD should have a working SDK but it comes from the FreeBSD port but it should work.

Similarly, checking for Google cloud repos would only apply to Debian, CentOS, and RHEL by default. So in both cases, these tests have case by case options.

from compute-image-tools.

gut avatar gut commented on July 22, 2024

roger. Thanks for the overview.

from compute-image-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.