inspec / inspec-gcp

InSpec GCP (Google Cloud Platform) Resource Pack
https://www.inspec.io/
Other
148 stars 74 forks source link

Issue in fetching configurations of VertexAI metadataStore using Client Library in chef inspec #438

Open IpsitaNeogi opened 1 year ago

IpsitaNeogi commented 1 year ago

Hi Team,

I am trying to fetch configurations of VertexAI metadataStore using Google Client Library in chef inspec.

I have gone through the file structures of the library and found that gem folder is present in two locations. • Where ruby is installed - C:\Ruby30-x64\lib\ruby\gems\3.0.0\gems • Where inspec is installed - C:\opscode\inspec\embedded\lib\ruby\gems\3.1.0\gems

To install 'google-cloud-ai_platform' gem in 'C:\opscode\inspec\embedded\lib\ruby\gems\3.1.0\gems', I tried below methods.

  1. Install google-cloud-ai_platform by running below command gem install google-cloud-ai_platform --install-dir "C:\opscode\inspec\embedded\lib\ruby\gems\3.1.0" --ignore-dependencies It is throwing below error while running inspec command 'inspec exec . --input-file=inputs.yml -t gcp://' : C:/opscode/inspec/embedded/lib/ruby/3.1.0/rubygems/specification.rb:1401:in `rescue in block in activate_dependencies': Could not find 'google-cloud-ai_platform-v1' (>= 0.0, < 2.a) among 303 total gem(s) (Gem::MissingSpecError)

  2. Install google-cloud-ai_platform-v1 by running below command gem install google-cloud-ai_platform-v1 --install-dir "C:\opscode\inspec\embedded\lib\ruby\gems\3.1.0" --ignore-dependencies It is throwing below error while running inspec command 'inspec exec . --input-file=inputs.yml -t gcp://' : C:/opscode/inspec/embedded/lib/ruby/3.1.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'gapic-common' (>= 0.18.0, < 2.a) among 304 total gem(s) (Gem::MissingSpecError)

  3. Install gapic-common by running below command gem install gapic-common --install-dir "C:\opscode\inspec\embedded\lib\ruby\gems\3.1.0" --ignore-dependencies It is throwing below error while running inspec command 'inspec exec . --input-file=inputs.yml -t gcp://' : Unable to activate gapic-common-0.18.0, because googleauth-0.14.0 conflicts with googleauth (~> 1.0) (Gem::ConflictError)

  4. Update googleauth by running below command gem update googleauth --install-dir "C:\opscode\inspec\embedded\lib\ruby\gems\3.1.0" It is throwing below error while running inspec command 'inspec exec . --input-file=inputs.yml -t gcp://' : C:/opscode/inspec/embedded/lib/ruby/3.1.0/rubygems/specification.rb:2236:in `raise_if_conflicts': Unable to activate gapic-common-0.18.0, because googleauth-0.14.0 conflicts with googleauth (~> 1.0) (Gem::ConflictError)

  5. Install googleauth by running below command gem install googleauth --install-dir "C:\opscode\inspec\embedded\lib\ruby\gems\3.1.0" --ignore-dependencies It is throwing below error while running inspec command 'inspec exec . --input-file=inputs.yml -t gcp://' : C:/opscode/inspec/embedded/lib/ruby/3.1.0/rubygems/specification.rb:2236:in `raise_if_conflicts': Unable to activate gapic-common-0.18.0, because googleauth-0.14.0 conflicts with googleauth (~> 1.0) (Gem::ConflictError)

Imported lib by adding require "google/cloud/ai_platform" in the ruby script.

Could you please suggest what need to be done?

sa-progress commented 6 months ago

All the resources for Vertex AI are available with the latest version in InSpec-gcp, which is only supported by REST APIs.