Sébastien Lucas / Dev wiki
  • Blog Wiki
  • Story book
  • Developers comics
  • Angular
    • Angular CLI + Angular.json
    • ngTemplateOutlet
    • Angular Schematic
    • Interceptor
    • Micro frontend + Mono repo
    • Build a library module
    • Error handling
    • Virtual and infinite scroll
    • Angular i18n
    • Debug Angular
    • Angular LifeCycle Hook
    • Nested forms in Angular
    • Angular Recipes
    • Master component in Angular
    • Perfomance optimization
    • Service Workers + PWA
    • Mobile
    • Electron app / Desktop app
    • Unit test & Angular
      • Unit test recipes (Jasmine / Karma / Angular)
      • Testing services with httpMock
    • Communication between components
    • Angular snippet library
    • Release and version management
    • Angular tutorial selection
    • UI components libraries
    • Angular libraries
    • Angular Tutorials
    • NGRX
      • Angular NGRX / Tips and code examples
      • Angular new Redux (alternative to ngrx)
      • NGRX unit test
      • Angular ngrx / Basics
    • Angular 2/Angular 1 differences
  • Graphql
  • Three.js
  • Ag grid
  • Open source BIM and 3D
  • Javascript
    • Null vs undefined
    • Html API
    • Await API
    • Debug memory leaks
    • Offline and PWA
    • Javascript tutorials
    • Javascript recipes
    • Bluebird missing docs
    • Alternative to lodash with ES6
    • ES6 syntax the best parts
    • Vanilla JS
  • RXJS
    • Docs
    • Recipes
    • Mock API and sandbox
    • Observables rxjs recipes
    • Combination operators
  • NODE.js
    • Environment variables
    • Fix CORS
    • Pagination requests in API
    • API tests
    • Node.js security
    • Learn node.js
    • Best libraries for node.js
    • Mongoose recipe
    • Debug node.js
  • Gatsby / React
    • Hooks
    • React concepts
    • Gatsby internationalisation
  • Ghost blog
  • Services for developers
    • SaaS images services
    • Airtable API examples
  • MISC
    • JIRA debugging
    • Wordpress plugins
    • Interview Sébastien Lucas
    • English expression
    • True recipes
    • Science podcast
  • AI
    • Machine learning open source
    • Tensor flow
    • Machine learning
    • Code examples
    • Courses and tutorials
    • Datasets
    • The Future of AI
    • Learn algo and data structures
  • Typescript
    • Generic types
    • Typescript recipes
    • Advanced types
      • Conditional types
      • Type guards
    • d.ts files
  • Docker
    • Starting with docker
    • Dockerise simple node app
    • Docker by aymen el amri
  • Mongodb
    • Pattern and data modeling
  • Devops
    • Heroku
    • Scaleway
    • Github template
    • Gitlab CI
    • http2
    • nginx
    • zsh
    • CI Continuous integration
    • DNS
    • Devops resources
    • Gcloud useful commands
    • Authenticate Gcloud
    • Documentation generators
    • Firebase database
  • Developers ressources
    • Online platform coding
      • Online courses
      • Coding games
      • Coding test platforms
      • Links to check
    • Good developers blogs
    • Nice open source project / github
  • Tooling
    • The chrome urls
    • Linux Mac tips
    • Webstorm configuration
    • Develop in Windows
    • Mac debug hardware
    • Mac Setup for a developer
    • Chrome extension
    • Develop toolbox
  • HTML / CSS
    • Tailwind
    • Css grid
    • ☘️Nice styles & generators
    • Favicon
    • Flexbox grid
    • Flexbox layout
    • PUG templates tips
    • Html and css references
    • Css snippets
    • SASS-CSS libraries
    • New things in scss
    • SASS best practices
    • Style lint
  • Tests
    • Cypress
      • Learn cypress and more tests
      • Cypress commands
      • Cypress plugins
      • Page object && app actions
      • Flaky tests
    • Mobile test
    • BDD + Cucumber
    • Puppeteer
    • Type of tests + Ressources
    • Jasmine test
    • Mock, fake, stub in unit tests
    • E2e tests with protactor
    • Mocha
  • REVIT & AEC tools
  • Git
    • Git commits
    • Git tips
    • Git hooks
    • Set up a mono repo
  • Design Pattern
    • Functional Programming
  • Job board / Remote jobs
  • SVG
  • JSON
  • Github
    • Forking a github repo
  • NPM
    • Private NPM packages
    • Publish to NPM with np
  • Yarn
    • Yarn evolution / 2, 3...
    • Yarn Linking
Powered by GitBook
On this page
  • Authenticate with your google account
  • List your projects on google cloud
  • Get information about your gcloud environment
  • Open an app in the browser
  • Deploy an app

Was this helpful?

  1. Devops

Gcloud useful commands

PreviousDevops resourcesNextAuthenticate Gcloud

Last updated 6 years ago

Was this helpful?

gcloud is a command line utility very useful to manage you projects on Google cloud.

I am a beginner with google cloud and found the UI quite confusing. A bit less than AWS thought. I do not know why cloud giant (AWS, Google...) cannot hire good designer to craft a simple and efficient UI. Perhaps because the target user are developers and for them the most important is that is works!

They should take example on , that I love and trust a lot. Why? Because it is very elegantly designed.

Anyway when trying to forget all the useless information that is displayed in the UI. And thanks to the tutorials (), I have understood a bit more how the hell it work.

An important utility to manage project is gcloud. So we are going to identify some useful commands to dig a bit more in what it can do.

The full gcloud doc is available .

Authenticate with your google account

gcloud auth login

Open a browser tab displaying an oauth consent screen and ask you to connect to you google account. If you are not logged yet. It is the first step to do, to have authorization to manage your projects.

List your projects on google cloud

gcloud projects list

Display a list of your projects The name if the human name and project_id is an unique project id derived from the human name.

$ gcloud projects list
PROJECT_ID                NAME         PROJECT_NUMBER
api-project-194095586610  API Project  194095586610
bookshelf-153721          bookshelf    723276592807

Get information about your gcloud environment

gcloud info

Display :

  • Installed components

  • Default project

  • Important files (logs...) that you can access

  • ....

Well you have got a problem with your local install, typing this command could be a good start.

Open an app in the browser

gcloud app browse

When inside the app directory, typing this command try to load the online version

Deploy an app

gcloud app deploy

When in the local app code directory upload the files following the guidance of a specific YAML file.

If like me at your first attempt you have the following message

ERROR: (gcloud.app.deploy) You do not have permission to access app [bookshelf] (or it may not exist): Operation not allowed

$ gcloud app deploy --log-http --verbosity=debug

You should try a debug mode as explained .

Digital Ocean
like the hello world in node.js
here
https://cloud.google.com/sdk/gcloud/reference/auth/login
https://cloud.google.com/sdk/gcloud/reference/projects/list
https://cloud.google.com/sdk/gcloud/reference/info
https://cloud.google.com/sdk/gcloud/reference/app/browse
https://cloud.google.com/sdk/gcloud/reference/app/deploy
here