main
  • About
  • Civil Engineering
    • Interview questions
    • Bridge design
  • Google Cloud
    • Code samples
    • kafka
    • Cloud Run
    • persistent disks
    • Spinnaker
    • Assessment questions
    • IAM
    • Cloud Storage
    • VPC
    • Cost optimization
    • Compute Engine
    • App Engine
    • Cloud Vision
    • Spanner
    • Cloud SQL
    • Solutions
      • Static IP - WIP
      • Network performance
      • Building a VPN
      • Build a streaming app
      • ML train with taxi data
    • Dataproc
    • Dataprep
    • BigTable
    • Cloud Fusion
    • Data flow
    • CloudFront
    • APIGEE
    • BigQuery
    • Cloud logging
    • Pubsub
    • Identity Aware Proxy
    • Data center migration
    • Deployment Manager
    • Kubeflow
    • Kubernetes Engine
    • Istio
    • Read the following
    • Storage for cloud shell
    • kms
    • kpt
    • Hybrid cloud with Anthos
    • helm
    • Architecture
    • terraform
    • Network
    • Data studio
    • Actions
    • Jenkins
  • Data Processing
    • Data Lake
    • Data ingestion
    • Data Cleaning - Deduplication
    • Data Cleaning - Transformation
    • Data cleaning - rule definition
    • ETL
  • Machine Learning
    • Tensorflow
    • Tensorflow tips
    • Keras
    • Scikit-learn
    • Machine learning uses
    • Working with Pytorch
    • Federated learning
  • AWS cloud
    • Billing
    • Decrease volume size of EC2
    • Run CVE search engine
    • DataSync
    • EC2 spot instances
  • Java
    • Java
    • NIO
    • System Design
      • Zero trust framework
    • Collections
  • Azure
    • Enterprise Scale
    • API
    • Resource group
    • Create an sql database
  • UBUNTU
    • No Release file
    • STRATO blockchain
    • iperf
    • Rsync
    • curl
    • Shell
    • FAQ - git
  • PH test
    • Syllabus
    • Opportunities
    • Aptitude test
  • Development
    • Course creation
    • web.dev
    • docfx template
  • npm
  • Docker Desktop
  • Nginx
  • English rules
  • Confluent
  • sanity theme
  • Java Native Interface tutorial
  • Putty
  • Personal website host
  • Google search SEO
  • Reading a textbook
  • DFCC Progress
  • STORAGE
    • Untitled
  • Services Definition
    • Cloud VPN and routing
  • Microservices design and Architecture
    • Untitled
  • Hybrid network architecture
    • Untitled
  • Deployment
    • Untitled
  • Reliability
    • Untitled
  • Security
    • Untitled
  • Maintenance and Monitoring
    • Peering
  • Archive
    • parse dml to markdown
Powered by GitBook
On this page

Was this helpful?

  1. Google Cloud

Compute Engine

PreviousCost optimizationNextApp Engine

Last updated 4 years ago

Was this helpful?

IAM role

Monitoring

Startup scripts

#!/bin/bash
export ZONE=us-central1-a
export PROJECT_ID=$\(gcloud info --format='value(config.project)') 
export BUCKET=$PROJECT_ID  
gsutil mb gs://$BUCKET
bq --location=US mk --project_id $PROJECT_ID flights
gsutil cp gs://sureskills-ql/data-science-on-gcp/flights/tzcorr/tzcorr.json tzcorr.json
gsutil -m cp gs://sureskills-ql/data-science-on-gcp/flights/tzcorr/all_flights-* gs://$BUCKET/flights/tzcorr
bq --location=US load --replace flights.tzcorr gs://sureskills-ql/data-science-on-gcp/flights/tzcorr/all_flights-* tzcorr.json
gsutil cp gs://sureskills-ql/data-science-on-gcp/flights/trainday/trainday_schema.json trainday_schema.json
gsutil -m cp gs://sureskills-ql/data-science-on-gcp/flights/trainday/* gs://$BUCKET/flights/trainday/
bq --location=US load flights.trainday gs://$BUCKET/flights/trainday/trainday.csv trainday_schema.json
gsutil -m cp gs://sureskills-ql/data-science-on-gcp/flights/trainday.csv gs://$BUCKET/flights/trainday.csv
gsutil cp gs://sureskills-ql/data-science-on-gcp/flights/bigquery/flights.simevents.schema flights.simevents.schema
gsutil cp gs://sureskills-ql/data-science-on-gcp/flights/chapter8/pom.xml gs://$BUCKET/flights/chapter8/
gsutil cp gs://sureskills-ql/data-science-on-gcp/flights/chapter8/output/* gs://$BUCKET/flights/chapter8/output/
gsutil cp gs://sureskills-ql/data-science-on-gcp/flights/chapter9/linear-model.tar.gz gs://$BUCKET/flights/chapter9/
bq --location=US load --replace --source_format=NEWLINE_DELIMITED_JSON flights.simevents gs://sureskills-ql/data-science-on-gcp/flights/bigquery/short-simevents-*.json flights.simevents.schema

# DEFAULT ML SA WORKAROUND
if [[ $(gcloud services list | grep 'AI Platform') ]] && [[ $(gcloud projects get-iam-policy qwiklabs-gcp-01-cdd1bc83923f | grep 'cloud-ml') ]]; then
  echo "Service Account already exists!"
else
  gcloud services disable ml.googleapis.com --force
  gcloud services enable ml.googleapis.com
fi

vs App Engine

OS Login

Troubleshooting for compute engine.

Used in - Machine Learning with Tensorflow

.

https://google.qwiklabs.com/focuses/3391
https://cloud.google.com/compute/docs/oslogin/troubleshoot-os-login
CPU utilization and Network Bytes