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

[TRACKER]Chef Workstation 2020 Testing - Knife Google #1182

Closed
dheerajd-msys opened this issue May 13, 2020 · 15 comments
Closed

[TRACKER]Chef Workstation 2020 Testing - Knife Google #1182

dheerajd-msys opened this issue May 13, 2020 · 15 comments
Assignees
Labels

Comments

@dheerajd-msys
Copy link

dheerajd-msys commented May 13, 2020

Description

Parent task

#1167

Reference

https://github.com/chef/knife-google

Chef Workstation Version

Chef Workstation version: 20.5.33
Chef Infra Client version: 16.0.287
Chef InSpec version: 4.18.111
Chef CLI version: 2.0.10
Test Kitchen version: 2.5.0
Cookstyle version: 6.4.4

Platform Version

Aha! Link: https://chef.aha.io/features/SH-1866

@dheerajd-msys dheerajd-msys added the Status: Untriaged An issue that has yet to be triaged. label May 13, 2020
@kapilchouhan99
Copy link

I have run knife google image list --gce_project PROJECT_ID -c "/.chef/knife.rb" and it's giving an error like this:

ERROR: knife encountered an unexpected error
This may be a bug in the 'google image list' knife command or plugin
Please collect the output of this command with the `-VVV` option before filing a bug report.
Exception: NoMethodError: undefined method `check_for_missing_config_values!' for #<Chef::Knife::Cloud::GoogleImageList:0x00000000070aa3f0>

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Image list

knife google image list --gce_project PROJECT_ID

NAME                 PROJECT      FAMILY    DISK SIZE      STATUS
centos-6-v20200505  centos-cloud  centos-6   20 GB        READY 
centos-7-v20200429  centos-cloud  centos-7   20 GB        READY
centos-8-v20200504  centos-cloud  centos-8   20 GB        READY
....
....
....

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Disk list

knife google disk list --gce_project PROJECT_ID --gce_zone ZONE

Zone        Status  Size (GB)  Type             Source Image                                       Attached To                                    
kpl-w-9     ready   60         pd-standard  chef-msys/global/images/kpl-w-image  chef-msys/zones/us-east1-b/instances/kpl-w-9   
kpl-w-t2    ready   60         pd-standard  chef-msys/global/images/kpl-w-image  chef-msys/zones/us-east1-b/instances/kpl-w-t2  
kpl-w-tets  ready   60         pd-standard  chef-msys/global/images/kpl-w-image  chef-msys/zones/us-east1-b/instances/kpl-w-tets

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Region list

knife google region list --gce_project PROJECT_ID 
Region                   Status  Zones                                                                          
asia-east1               up      asia-east1-a, asia-east1-b, asia-east1-c                                       
asia-east2               up      asia-east2-a, asia-east2-b, asia-east2-c                                       
asia-northeast1          up      asia-northeast1-a, asia-northeast1-b, asia-northeast1-c                        
asia-northeast2          up      asia-northeast2-a, asia-northeast2-b, asia-northeast2-c                        
asia-northeast3          up      asia-northeast3-a, asia-northeast3-b, asia-northeast3-c                        
asia-south1              up      asia-south1-a, asia-south1-b, asia-south1-c                                    
asia-southeast1          up      asia-southeast1-a, asia-southeast1-b, asia-southeast1-c                        
australia-southeast1     up      australia-southeast1-a, australia-southeast1-b, australia-southeast1-c         
europe-north1            up      europe-north1-a, europe-north1-b, europe-north1-c                              
europe-west1             up      europe-west1-b, europe-west1-c, europe-west1-d                                 
europe-west2             up      europe-west2-a, europe-west2-b, europe-west2-c                                 
europe-west3             up      europe-west3-a, europe-west3-b, europe-west3-c                                 
europe-west4             up      europe-west4-a, europe-west4-b, europe-west4-c                                 
europe-west6             up      europe-west6-a, europe-west6-b, europe-west6-c                                 
northamerica-northeast1  up      northamerica-northeast1-a, northamerica-northeast1-b, northamerica-northeast1-c
southamerica-east1       up      southamerica-east1-a, southamerica-east1-b, southamerica-east1-c               
us-central1              up      us-central1-a, us-central1-b, us-central1-c, us-central1-f                     
us-east1                 up      us-east1-b, us-east1-c, us-east1-d                                             
us-east4                 up      us-east4-a, us-east4-b, us-east4-c                                             
us-west1                 up      us-west1-a, us-west1-b, us-west1-c                                             
us-west2                 up      us-west2-a, us-west2-b, us-west2-c                                             
us-west3                 up      us-west3-a, us-west3-b, us-west3-c                                             
us-west4                 up      us-west4-a, us-west4-b, us-west4-c 

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Region quotas list

knife google region quotas --gce_project PROJECT_ID 

Region: asia-east1
Quota                                Limit  Usage
Cpus                                 8      0    
Disks Total Gb                       2048   0    
Static Addresses                     1      0    
In Use Addresses                     8      0    
....
.....
.....
.....
.....

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Project quotas list

knife google project quotas --gce_project PROJECT_ID
Quota                        Limit  Usage
Backend Buckets              3      0    
Backend Services             5      0    
Cpus All Regions             12     6    
External Vpn Gateways        5      0    
Firewalls                    100    10   
Forwarding Rules             15     0    
.....
.....
.....
.....

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Server list

knife google server list --gce_project PROJECT_ID --gce_zone ZONE

Instance Name  Status   Machine Type   Internal IP  External IP    Network
kpl-w-9        running  n1-standard-2  10.142.0.29  35.229.48.248  default
kpl-w-t2       running  n1-standard-2  10.142.0.31  34.75.200.89   default
kpl-w-tets     running  n1-standard-2  10.142.0.30  35.229.73.93   default

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Zone list

knife google zone list --gce_project PROJECT_ID

Zone                       Status
asia-east1-a               up    
asia-east1-b               up    
asia-east1-c               up    
asia-east2-a               up    
asia-east2-b               up    
asia-east2-c               up    
....
.....
.....
.....

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Show Instance details

knife google server show kpl-linux --gce_project PROJECT_ID --gce_zone ZONE

Instance Name: kpl-linux
Status: RUNNING
Machine Type: n1-standard-2
Project: PROJECT_ID
Zone: ZONE
Network: default
Private IP: ip.ip.ip.ip
Public IP: ip.ip.ip.ip

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Create disk

knife google disk create kpl-test --gce_project PROJECT_ID --gce_zone ZONE

Creating a 10 GB disk named kpl-test...

Current status: RUNNING.
Waiting for disk to be ready...

Disk created successfully.

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Delete disk

knife google disk delete kpl-test --gce_project PROJECT_ID --gce_zone ZONE

Do you really want to delete disk kpl-test? (Y/N) y
Deleting disk kpl-test...

Disk kpl-test deleted successfully.

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Create server and bootstrap linux node

knife google server create kpl-0 --gce-image centos-8-v20200504 --gce-machine-type n1-standard-1 --gce-public-ip ephemeral --ssh-identity-file /.ssh/id_rsa --gce_project PROJECT_ID --gce_zone ZONE  --connection-port 22 --connection-protocol ssh --image-os-type Linux --connection-user msys -c "/.chef/knife.rb"

....
....
....
....
+---------------------------------------------+
✔ 2 product licenses accepted.
+---------------------------------------------+
Starting Chef Infra Client, version 16.1.0
resolving cookbooks for run list: []
Synchronizing Cookbooks:
Installing Cookbook Gems:
Compiling Cookbooks...
[2020-05-21T06:23:03+00:00] WARN: Node azure-win has an empty run list.
Converging 0 resources

Running handlers:
Running handlers complete
Chef Infra Client finished, 0/0 resources updated in 31 seconds

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Create server and bootstrap windows node

knife google server create kpl-w-t2 --connection-user kapil_chouhan -P "abc123456" --gce_project PROJECT_ID --gce_zone ZONE--gce-image kpl-w-image --image-os-type windows --gce-machine-type n1-standard-2 --gce-boot-disk-size 60 --connection_protocol winrm --gce-email chef-serviceaccount-01@inlaid-hope-241406.iam.gserviceaccount.com --gce-public-ip ephemeral --connection-port 5985 -c /.chef/knife.rb

....
....
....
....
+---------------------------------------------+
✔ 2 product licenses accepted.
+---------------------------------------------+
Starting Chef Infra Client, version 16.1.0
resolving cookbooks for run list: []
Synchronizing Cookbooks:
Installing Cookbook Gems:
Compiling Cookbooks...
[2020-05-21T06:23:03+00:00] WARN: Node azure-win has an empty run list.
Converging 0 resources

Running handlers:
Running handlers complete
Chef Infra Client finished, 0/0 resources updated in 31 seconds

SUCCESS

@kapilchouhan99
Copy link

kapilchouhan99 commented May 21, 2020

Delete server

knife google server delete kpl-w-t2 --gce_project PROJECT_ID --gce_zone ZONE

Instance Name: kpl-w-t2
Status: RUNNING
Machine Type: n1-standard-2
Project: PROJECT_ID
Zone: ZONE
Network: default
Private IP: ip.ip.ip.ip
Public IP: ip.ip.ip.ip
Do you really want to delete this instance? (Y/N) y
Deleting instance kpl-w-t2...

Current status: RUNNING...............
Instance kpl-w-t2 deleted successfully.

SUCCESS

@dheerajd-msys
Copy link
Author

Thank you @kapilchouhan99 working on this. Looks good

@jonsmorrow jonsmorrow added Epic and removed Status: Untriaged An issue that has yet to be triaged. labels Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants