Oh, I think I understand your request now. First of all, you cannot run commands from within App Engine VMs as these are Google-managed instances. You simply don't have access to download the Cloud SDK inside the VMs for running glcoud or gsutil commands from within them, not even from App Engine Flex which offers some level of access to the VM instance.
But if you looking for a way to script/automate App Engine app deployments? I can recommend two options for that: 1) Google Cloud Functions: This is an event-driven serverless-compute platform that will allow you to deploy lightweight scripts to abstract out your app deployments for your prepackaged deployment files [1]. You won't be spinning up a VM instance for this so you can save a lot of cost this way, also as GCF has a free-tier for compute resource usage [2]. I'm not sure if you misspoke about using Datastore (which is a NoSQL database - not a viable option) but you can definitely use Google Cloud Storage (object storage) as a repository for your app files for which you can deploy a function that runs gsutil cp to upload packaged files to your GCS repo, and a function that listens to changes to this GCS repo and then runs gcloud app deploy to deploy the new app version with the --no-promote and --version flags configured the way that suits. Take a look at this tutorial for more on GCS and GCF integration [3]. 2) Google Cloud Repository integrating with Google Cloud Build and App Engine. This uses the Google's cloud-native source code repo [4] (which can connect with other hosted repos) to supply new commits to Cloud Build which automates new builds of your app in a customizable (scripted) fashion [5] and then deploys new builds to App Engine. Below is a walkthrough on how to automatically deploy an application stored in Cloud Source Repositories to App Engine when there is a new commit [6]. Consider these two options for a method to abstract away the computing resources. There are other Continuous Delivery options you could consider if you want to get even fancier (or not) [7]. [1] Google Cloud Functions: https://cloud.google.com/functions/ [2] Cloud Functions pricing: https://cloud.google.com/functions/pricing#cloud_functions_pricing [3] Cloud Storage trigger function: https://cloud.google.com/functions/docs/tutorials/storage [4] Cloud Source Repositories: https://cloud.google.com/source-repositories/ [5] Cloud Build: https://cloud.google.com/cloud-build/ [6] Automating App Deployments: https://cloud.google.com/source-repositories/docs/quickstart-triggering-builds-with-source-repositories [7] Other CD options: https://cloud.google.com/solutions/continuous-delivery/ -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/46dd0977-29d9-4cf4-b426-64512d5147cf%40googlegroups.com.