Google Cloud Platform

I have done some work with the Google Cloud Platform. However in some ways my use currently is quite basic. In short I needed to SSH onto some virtual machines and also copy files.

To do this I first installed the Cloud SDK | Google Cloud Platform. Note that it relies on Python 2.7. With a Mac then I would suggest installing with brew cask install google-cloud-sdk, although you will still need to modify your ".bash_profile" file. I found when doing this I needed to add the execute permission and also make sure the changes to my profile were prefixed with ". " to get the changes to persist.

gcloud init - this is part of the install process but it does allow a new configuration to be setup
gcloud info - display useful information on your installation
gcloud auth list - list known account credentials
gcloud config list - list local configuration
gcloud components update - update any installed GCloud components
gcloud compute ssh hostname --project projectname
gcloud compute ssh hostname - make an SSH connection to hostname in default project
gcloud compute scp /path/localfile.txt hostname:~/. - copy /path/localfile.txt to my home directory on hostname
gcloud compute scp hostname:~/remotefile.txt . - copy remotefile.txt from my home directory on hostname to my current directory
gcloud compute instances list --filter="labels:dev" - list instance details where the label matches, however the : is changing to = but they give different result at the moment. "--sort-by status" can be handy