Gcloud Init


ketan_patel@cloudshell:~ (new-user-learning)$ gcloud init

Welcome! This command will take you through the configuration of gcloud.

Settings from your current configuration [cloudshell-27741] are:
accessibility:
  screen_reader: 'True'
component_manager:
  disable_update_check: 'True'
compute:
  gce_metadata_read_timeout_sec: '30'
core:
  account: ketan.patel@supernal.aero
  disable_usage_reporting: 'True'
  project: new-user-learning
metrics:
  environment: devshell

Pick configuration to use:
 [1] Re-initialize this configuration [cloudshell-27741] with new settings 
 [2] Create a new configuration
Please enter your numeric choice:  1

Your current configuration has been set to: [cloudshell-27741]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.                                                                                                                                                           
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).

Choose the account you would like to use to perform operations for this configuration:
 [1] ketan.patel@supernal.aero
 [2] Log in with a new account
Please enter your numeric choice:  1

You are logged in as: [ketan.patel@supernal.aero].

Pick cloud project to use: 
 [1] dosmic350
 [2] d-dev
 [3] dv
 [4] new-user-learning

 [11] Enter a project ID
 [12] Create a new project
Please enter numeric choice or text value (must exactly match list item):  4

Your current project has been set to: [new-user-learning].

Do you want to configure a default Compute Region and Zone? (Y/n)?  Y

Which Google Compute Engine zone would you like to use as project default?
If you do not specify a zone via a command line flag while working with Compute Engine resources, the default is assumed.
 [1] us-east1-b
 [11] us-west1-b
 [12] us-west1-c
 [13] us-west1-a
 [50] asia-northeast3-a

Did not print [66] options.
Too many options [116]. Enter "list" at prompt to print choices fully.
Please enter numeric choice or text value (must exactly match list item):  13

Your project default Compute Engine zone has been set to [us-west1-a].
You can change it by running [gcloud config set compute/zone NAME].

Your project default Compute Engine region has been set to [us-west1].
You can change it by running [gcloud config set compute/region NAME].

Your Google Cloud SDK is configured and ready to use!

* Commands that require authentication will use ketan.patel@supernal.aero by default
* Commands will reference project `new-user-learning` by default
* Compute Engine commands will use region `us-west1` by default
* Compute Engine commands will use zone `us-west1-a` by default

Run `gcloud help config` to learn how to change individual settings

This gcloud configuration is called [cloudshell-27741]. You can create additional configurations if you work with multiple accounts and/or projects.
Run `gcloud topic configurations` to learn more.

Some things to try next:

* Run `gcloud --help` to see the Cloud Platform services you can interact with. And run `gcloud help COMMAND` to get help on any gcloud command.
* Run `gcloud topic --help` to learn about advanced features of the SDK like arg files and output formatting
* Run `gcloud cheat-sheet` to see a roster of go-to `gcloud` commands.

ketan_patel@cloudshell:~ (new-user-learning)gcloud cheat-sheet



NAME
    gcloud cheat-sheet - display gcloud cheat sheet

SYNOPSIS
    gcloud cheat-sheet [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
    A roster of go-to gcloud commands for the gcloud tool, Google Cloud's
    primary command-line tool.

  Getting started
    Get going with the gcloud command-line tool

      o gcloud init: Initialize, authorize, and configure the gcloud tool.
      o gcloud version: Display version and installed components.
      o gcloud components install: Install specific components.
      o gcloud components update: Update your Google Cloud CLI to the latest
        version.
      o gcloud config set project: Set a default Google Cloud project to work
        on.
      o gcloud info: Display current gcloud tool environment details.

  Help
    Google Cloud CLI is happy to help

      o gcloud help: Search the gcloud tool reference documents for specific
        terms.
      o gcloud feedback: Provide feedback for the Google Cloud CLI team.
      o gcloud topic: Supplementary help material for non-command topics like
        accessibility, filtering, and formatting.

  Personalization
    Make the Google Cloud CLI your own; personalize your configuration with
    properties

      o gcloud config set: Define a property (like compute/zone) for the
        current configuration.
      o gcloud config get: Fetch value of a Google Cloud CLI property.
      o gcloud config list: Display all the properties for the current
        configuration.
      o gcloud config configurations create: Create a new named
        configuration.
      o gcloud config configurations list: Display a list of all available
        configurations.
      o gcloud config configurations activate: Switch to an existing named
        configuration.

  Credentials
    Grant and revoke authorization to Google Cloud CLI

      o gcloud auth login: Authorize Google Cloud access for the gcloud tool
        with Google user credentials and set current account as active.
      o gcloud auth activate-service-account: Like gcloud auth login but with
        service account credentials.
      o gcloud auth list: List all credentialed accounts.
      o gcloud auth print-access-token: Display the current account's access
        token.
      o gcloud auth revoke: Remove access credentials for an account.

  Projects
    Manage project access policies

      o gcloud projects describe: Display metadata for a project (including
        its ID).
      o gcloud projects add-iam-policy-binding: Add an IAM policy binding to
        a specified project.

  Identity & Access Management
    Configuring Cloud Identity & Access Management (IAM) preferences and
    service accounts

      o gcloud iam list-grantable-roles: List IAM grantable roles for a
        resource.
      o gcloud iam roles create: Create a custom role for a project or org.
      o gcloud iam service-accounts create: Create a service account for a
        project.
      o gcloud iam service-accounts add-iam-policy-binding: Add an IAM policy
        binding to a service account.
      o gcloud iam service-accounts set-iam-policy: Replace existing IAM
        policy binding.
      o gcloud iam service-accounts keys list: List a service account's keys.

  Docker & Google Kubernetes Engine (GKE)
    Manage containerized applications on Kubernetes

      o gcloud auth configure-docker: Register the gcloud tool as a Docker
        credential helper.
      o gcloud container clusters create: Create a cluster to run GKE
        containers.
      o gcloud container clusters list: List clusters for running GKE
        containers.
      o gcloud container clusters get-credentials: Update kubeconfig to get
        kubectl to use a GKE cluster.
      o gcloud container images list-tags: List tag and digest metadata for a
        container image.

  Virtual Machines & Compute Engine
    Create, run, and manage VMs on Google infrastructure

      o gcloud compute zones list: List Compute Engine zones.
      o gcloud compute instances describe: Display a VM instance's details.
      o gcloud compute instances list: List all VM instances in a project.
      o gcloud compute disks snapshot: Create snapshot of persistent disks.
      o gcloud compute snapshots describe: Display a snapshot's details.
      o gcloud compute snapshots delete: Delete a snapshot.
      o gcloud compute ssh: Connect to a VM instance by using SSH.

  Serverless & App Engine
    Build highly scalable applications on a fully managed serverless platform

      o gcloud app deploy: Deploy your app's code and configuration to the
        App Engine server.
      o gcloud app versions list: List all versions of all services deployed
        to the App Engine server.
      o gcloud app browse: Open the current app in a web browser.
      o gcloud app create: Create an App Engine app within your current
        project.
      o gcloud app logs read: Display the latest App Engine app logs.

  Miscellaneous
    Commands that might come in handy

      o gcloud kms decrypt: Decrypt ciphertext (to a plaintext file) using a
        Cloud Key Management Service (Cloud KMS) key.
      o gcloud logging logs list: List your project's logs.
      o gcloud sql backups describe: Display info about a Cloud SQL instance
        backup.
      o gcloud sql export sql: Export data from a Cloud SQL instance to a SQL
        file.

EXAMPLES
    To view this cheat sheet, run:

        $ gcloud cheat-sheet

GCLOUD WIDE FLAGS
    These flags are available to all commands: --access-token-file, --account,
    --billing-project, --configuration, --flags-file, --flatten, --format,
    --help, --impersonate-service-account, --log-http, --project, --quiet,
    --trace-token, --user-output-


ketan_patel@cloudshell:~ (new-user-learning)$ gcloud source repos clone simulation --project=new-user-learning

Cloning into '/home/ketan_patel/simulation'...
remote: Total 5 (delta 0), reused 5 (delta 0)
Receiving objects: 100% (5/5), 4.25 KiB | 4.25 MiB/s, done.
Project [new-user-learning] repository [simulation] was cloned to [/home/ketan_patel/simulation].
l

ketan_patel@cloudshell:~ (new-user-learning)$ cd simulation/

ketan_patel@cloudshell:~/simulation (new-user-learning)$ ls

plannerlite.py  planner.m  planner_types.py
ketan_patel@cloudshell:~/simulation (new-user-learning)$

No comments:

Post a Comment

AppEngine - Python

tudent_04_347b5286260a@cloudshell:~/python-docs-samples/appengine/standard_python3/hello_world (qwiklabs-gcp-00-88834e0beca1)$ sudo apt upda...