Comments (10)
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.
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.
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.
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.
That sounds good yes.
from compute-image-tools.
Great, thanks
from compute-image-tools.
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.
@zmarano : ping
from compute-image-tools.
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.
roger. Thanks for the overview.
from compute-image-tools.
Related Issues (20)
- panic: runtime error: invalid memory address or nil pointer dereference on Ubuntu 20.04
- Issue with bootstrap_install.ps1 HOT 2
- `import_precheck` fails on CentOS 7 HOT 2
- importing process interrupted when `/etc/netplan` contains subdirectory (Ubuntu 18+) HOT 1
- getting error while importing my ubuntu 2004vmdk into compute instance HOT 1
- Execution fails when shielded VMs org policy is enforced HOT 3
- GCE_Export Release Version access_denied HOT 1
- daisy release version has access denied HOT 1
- Should this be more than 1 GB?
- gcloud compute images import does not allow centos-8 in option --os HOT 1
- Compute engine create with container + SSD
- Could not fetch resource
- Semidev1
- Shared VPC issue during build
- Deployments of UBUNTU with "snapd" (google tool use this snapd?) HOT 3
- windows-startup-script-url: Message: Either the Name or Index parameter is required HOT 2
- Workflow update required for windows-10-20h2-ent-x86
- Fix the setting for 'x86_build' and maybe 'uefi_build' on the 'windows-build-bios.wf.json'
- Create custom Windows BYOL images failed HOT 2
- Image Build Workflows: Add support for custom network/subnetwork as well as customer service account
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compute-image-tools.